Repository navigation
aitools: drop the Proceed? confirm after the agent picker in install - #7478
Conversation
3af19e5 to
2711bbe
Compare
7c162ba to
593c4fe
Compare
✅ Integration test reportCommit: e002fe4
Top 6 slowest tests (at least 2 minutes):
|
2711bbe to
95f78a5
Compare
593c4fe to
deca41f
Compare
95f78a5 to
668167b
Compare
deca41f to
e980d56
Compare
668167b to
eef5046
Compare
e980d56 to
e155c53
Compare
eef5046 to
d0c5cc6
Compare
simonfaltum
left a comment
There was a problem hiding this comment.
🤖 Automated review from simonfaltum's review agent (pr-review skill) at e155c53. Each finding was verified against the code; simonfaltum may follow up.
Not approving yet: 1 blocking issue(s), tagged [blocking]; 2 open design questions.
This PR removes the interactive Proceed? confirm after the agent picker in databricks aitools install. The picker selection now counts as confirmation, the funnel cancel test moves to the picker, and a changelog fragment is added. The commit itself is correct: the picker already hides agents that would be skipped. However, the branch is built on an outdated revision of #7477. It conflicts with the current base, its diff undoes #7477's later fixes, and after a rebase the tests stop compiling until the leftover promptProceed override in TestInstallAgentCallerInPTYNeverPrompts is removed. There are also two open design questions: whether losing the clean decline is intended, and what to do with the plan summary and PLAN_CONFIRMED step that remain.
Questions
- With the confirm gone, an interactive user who sees the plan can no longer back out cleanly. Ctrl-C at the picker exits non-zero (USER_ABORTED), and an empty selection errors, where answering
nused to print "Cancelled." and exit 0. Detected agents start checked, so a single Enter now installs plugins, writes state and cleans up legacy skills.aitools uninstallandcompletion installstill askProceed?. Is losing the clean decline intended? Would you rather keep the confirm, drop it as here, or drop it and show the install scope in the picker title so the scope is still visible before anything runs? - Now that nothing follows the plan summary,
printPlanSummaryrepeats the picker right before the per-agent install lines, and its skip branch can no longer run.PLAN_CONFIRMEDnow fires unconditionally right afterAGENTS_SELECTED, so the new funnel can't show how many users decline at the plan, and the proto comment ("confirmed, by the user or implicitly") no longer describes a real step. Should the summary stay as it is, shrink to just the scope line, or go? And shouldPLAN_CONFIRMEDbe kept, dropped or renamed, with the proto comment and any dashboards updated?
Comments outside the changed lines
- [nice to have]
.github/PULL_REQUEST_TEMPLATE.md:.agents/skills/pr-checklist/SKILL.md:48says to follow.github/PULL_REQUEST_TEMPLATE.mdexactly, with## Changes,## Whyand## Testsin that order and no invented sections such as## Summary. This body uses## Summary,## Evidenceand## Merge Danger, and the agent-disclosure line is not italic as line 54 asks. Please restructure the body under the template headings (the evidence fits under## Tests, the merge-danger notes under## Why) and italicize the disclosure line. - [nit]
cmd/aitools/install.go:184: The comment above the--output jsonflag check still says the flags are required "so no scope prompt, agent picker, or confirm is shown". Install no longer has a confirm, so a reader will look for a prompt that doesn't exist. Drop "or confirm". - [nit]
cmd/aitools/funnel_test.go:277:TestInstallFunnelEmptyPickerSelectionIsCancelledsays it "finishes CANCELLED like a declined confirm", but install no longer has a declined confirm. The(there is no "Proceed?" confirm)note at lines 239-240 also describes removed code rather than the test, so after merge it reads as history. Consider rewording both, for example: the picker is the last prompt before the install. SinceTestInstallFunnelInteractiveCancelnow drives the picker with an error, this test could also become a third row in that table:{name: "nothing selected", err: errNoAgentsSelected, want: "FINISHED:CANCELLED:"}.
| } | ||
| } | ||
|
|
||
| func TestInstallAgentCallerInPTYNeverPrompts(t *testing.T) { |
There was a problem hiding this comment.
[blocking] This branch is built on an older revision of #7477 (eef5046). aitools/no-prompts-for-agents has since been force-pushed (now d0c5cc6), and GitHub reports the PR as conflicting. Measured against the current base, the diff also undoes #7477's review fixes: it brings back the callerIsAgent seam and main_test.go's TestMain, drops startFunnel's interactive argument (agent callers in a PTY are reported Interactive=true again), removes isolateAgents(t) calls and the SDK source-URL comment, and restores stubLegacyCleanup. A rebase alone won't be enough: the new base's TestInstallAgentCallerInPTYNeverPrompts overrides promptProceed with t.Fatal("plan confirm shown to an agent caller"), and that override merges without a textual conflict, but this PR deletes promptProceed. I simulated the rebase and resolved the rename conflict, and go vet ./cmd/aitools/ then fails with install_test.go:873:17: undefined: promptProceed. Please rebase with git rebase --onto origin/aitools/no-prompts-for-agents eef5046e4, delete that override, and keep the base's isolateAgents(t) at the top of TestInstallInteractivePickerWithoutConfirm. CI is green only because it ran on the stale stack.
There was a problem hiding this comment.
Rebased onto the current aitools/no-prompts-for-agents (a791ac7). The diff against the base now only touches the confirm: the promptProceed override in TestInstallAgentCallerInPTYNeverPrompts is gone, isolateAgents(t) stays at the top of the picker test, and TestInstallFunnelInteractiveCancel follows the base's new funnel order (AGENTS_SELECTED fires after the picker, so a picker cancel ends at SCOPE_RESOLVED) and its "prompt failed" row passes an error already tagged by promptError, the way the real picker returns it. go vet ./cmd/aitools/ and go test ./cmd/aitools/... pass.
| } | ||
|
|
||
| func TestInstallInteractivePickerAndConfirm(t *testing.T) { | ||
| func TestInstallInteractivePickerWithoutConfirm(t *testing.T) { |
There was a problem hiding this comment.
[nit] As the PR description notes, TestInstallInteractivePickerWithoutConfirm also passes with the old confirm in place: without a terminal the confirm reads stdin and defaults to Yes. Its name and the // No "Proceed?" confirm follows the picker comment at line 379 claim something it can't detect. Either name it after what it checks (the picked agent gets the plugin) or make it fail if a prompt runs after the picker.
There was a problem hiding this comment.
Renamed it to TestInstallInteractivePickerInstallsPickedAgent and dropped the // No "Proceed?" confirm follows the picker comment (a791ac7). Making it fail when a prompt runs after the picker would need a hook that this PR removes, so the name now says what it checks. On the parent it fails only without a controlling terminal (huh: could not open a new TTY); with one, the old confirm reads stdin and defaults to Yes.
2e61f20 to
6251610
Compare
a791ac7 to
a45b450
Compare
|
Answers to the two questions in the review (a45b450):
The two wording nits are also fixed: the |
6251610 to
bc7b149
Compare
a45b450 to
eb589c2
Compare
bc7b149 to
4a46f77
Compare
eb589c2 to
df49877
Compare
da4d9e2 to
efae3db
Compare
914a32c to
7577e8d
Compare
efae3db to
6aa9729
Compare
7577e8d to
2f670b2
Compare
6aa9729 to
f5bf3ea
Compare
2f670b2 to
c2d7335
Compare
f5bf3ea to
ac0065e
Compare
c2d7335 to
8c2aca6
Compare
ac0065e to
2a658e6
Compare
8c2aca6 to
7a33789
Compare
2a658e6 to
51b22e3
Compare
| // --skills-only detects agents by config dir alone, as the | ||
| // non-interactive run does, so a plugin agent whose CLI is not on | ||
| // PATH starts checked too. | ||
| preselect: a.IsPreselected(ctx) || (skillsOnly && a.Detected(ctx)), |
There was a problem hiding this comment.
[nit] The comment says that --skills-only pre-checks agents "as the non-interactive run does". But IsPreselected is also true for a plugin agent whose CLI is on PATH and that has no config dir (StateAvailable). The non-interactive --skills-only run selects by config dir only (a.Detected), so it does not pick that agent. Under --skills-only, use preselect = a.Detected(ctx) only, and add a test case for a CLI on PATH with no config dir.
There was a problem hiding this comment.
You're right: the comment overstated it. Under --skills-only the picker pre-checks the union of IsPreselected and Detected, so a plugin agent with its CLI on PATH and no config dir starts checked, while the non-interactive --skills-only run, which selects by config dir only, leaves it out. In c635c52 I reworded the comment to describe what the code does: a config dir also pre-checks the agent under --skills-only, and the usual pre-checks still apply.
The behavior itself is approved on this PR, so I left it as is. Switching to preselect = a.Detected(ctx) under --skills-only, with a test for a CLI on PATH and no config dir, can be a follow-up.
7a33789 to
ce44e54
Compare
a4c1544 to
c635c52
Compare
ce44e54 to
88d00f0
Compare
c635c52 to
b09a485
Compare
88d00f0 to
14c2f8d
Compare
b09a485 to
2ee6302
Compare
14c2f8d to
3027224
Compare
2ee6302 to
d105006
Compare
3027224 to
7586075
Compare
d105006 to
924919a
Compare
7586075 to
055533b
Compare
924919a to
05df0d0
Compare
055533b to
22ff761
Compare
05df0d0 to
ea412f5
Compare
22ff761 to
43056d1
Compare
`databricks aitools install` (interactive, no agents on the command line) no longer asks `Proceed?` after the agent picker. Agents that would be skipped are not offered in the picker, so choosing agents already confirms the plan. The install scope moves into the picker title, so it is visible before anything runs, and the plan summary after the picker shrinks to the scope line. ```diff install (interactive picker path) - promptAgentSelection # "Select agents to set up", "enter to confirm" + promptAgentSelection # "Select agents to set up (<scope> scope)", "enter to install" buildPlan - printPlanSummary # "Plan (<scope> scope):" + one line per agent - promptProceed # "Proceed?" — No => "Cancelled.", exit 0 - if !proceed: funnel CANCELLED, return nil funnel PLAN_CONFIRMED + printInstallScope # "Install scope: <scope>" install plugins / skills ``` - `promptProceed` and `defaultPromptProceed` are removed. `promptAgentSelection` takes the scope for its title. - `printPlanSummary` becomes `printInstallScope`. Its per-agent lines repeated the picker, and its skip branch could no longer run. - The picker hint reads "space to toggle, enter to install", since Enter now starts the install. - Under `--skills-only` (and the `databricks skills install` alias), every found agent is labeled "skills" in the picker, skipped rows included, because that is what they get. The removed per-agent summary lines were the only place this showed before. In that mode an agent whose config dir exists also starts checked, so a plugin agent whose CLI is not on PATH is included, as in the non-interactive run. - `PLAN_CONFIRMED` is kept and still follows `AGENTS_SELECTED` right away; its comment in `libs/telemetry/protos` now says the picker selection is the confirmation. - `TestInstallFunnelInteractiveCancel` now cancels at the picker, which is the last prompt before the install. - Changelog fragment: `.nextchanges/cli/aitools-install-drop-proceed-confirm.md`. Co-authored-by: Isaac <no-reply@databricks.com>
❌ Integration test reportCommit: eeb4ef9
55 interesting tests: 43 FAIL, 9 RECOVERED, 3 KNOWN
Top 50 slowest tests (at least 2 minutes):
|
Stacked on #7477.
Stacked on: aitools: never prompt a coding agent caller in install
Summary
databricks aitools install(interactive, no agents on the command line) no longer asksProceed?after the agent picker. Agents that would be skipped are not offered in the picker, so choosing agents already confirms the plan. The install scope moves into the picker title, so it is visible before anything runs, and the plan summary after the picker shrinks to the scope line.promptProceedanddefaultPromptProceedare removed.promptAgentSelectiontakes the scope for its title.printPlanSummarybecomesprintInstallScope. Its per-agent lines repeated the picker, and its skip branch could no longer run.--skills-only(and thedatabricks skills installalias), every found agent is labeled "skills" in the picker, skipped rows included, because that is what they get. The removed per-agent summary lines were the only place this showed before. In that mode an agent whose config dir exists also starts checked, so a plugin agent whose CLI is not on PATH is included, as in the non-interactive run.PLAN_CONFIRMEDis kept and still followsAGENTS_SELECTEDright away; its comment inlibs/telemetry/protosnow says the picker selection is the confirmation.TestInstallFunnelInteractiveCancelnow cancels at the picker, which is the last prompt before the install..nextchanges/cli/aitools-install-drop-proceed-confirm.md.Evidence
go test ./cmd/aitools/ -count=1 -v -run 'TestInstallFunnelInteractiveCancel|TestInstallFunnelEmptyPickerSelectionIsCancelled|TestInstallInteractivePickerInstallsPickedAgent|TestAgentPickerTitleNamesScope|TestPrintInstallScope|TestAgentChoicesSkillsOnly|TestInstallAgentCallerInPTYNeverPrompts'at this head: all pass.TestInstallInteractivePickerInstallsPickedAgentmocks project scope (not the global default) and checks that the picker gets it, thatInstall scope: projectfollows the picker on stderr, and that the picked agent gets the plugin.TestAgentChoicesSkillsOnlyLabelsPluginAgentsSkillschecks that Claude Code is labeled "plugin" normally and "skills" under--skills-only. It fails without the label change.TestAgentChoicesSkillsOnlyLabelsSkippedPluginAgentSkillschecks that a skipped Codex CLI row under--skills-only --scope projectreadsskills · does not support project-scoped skills, andTestAgentChoicesSkillsOnlyPreselectsByConfigDirchecks that Claude Code with no CLI on PATH starts checked under--skills-onlyonly. Both fail without the change.TestAgentPickerTitleNamesScopeandTestPrintInstallScopepin the picker title and the scope line.Proceed?in place, the picker test failed in a shell without a controlling terminal (huh: could not open a new TTY) and passed with one, because the confirm then read stdin and defaulted to Yes. So the test is named after what it checks.go test ./cmd/aitools/... ./libs/telemetry/...and./task test-exp-aitoolspass at this head (Linux). No acceptance test drives the interactive picker, so no acceptance output changes.Merge Danger
Door: two-way
Removes one prompt and shortens the text around the picker. Reverting the commit restores both.
Blast Radius: small
CANCELLED:USER_ABORTEDinstead of the old "Cancelled." with exit 0 andCANCELLEDwith no category.(<scope> scope), its hint saysenter to install,--skills-onlyrows sayskillsinstead ofpluginand are pre-checked by config dir, and thePlan (<scope> scope):block with one line per agent becomes a singleInstall scope: <scope>line.This pull request and its description were written by Isaac.