feat(setup): validate kiro-cli supports the acp command, offer in-place update - #7342
Conversation
7bb74fb to
7523b1d
Compare
7523b1d to
509a575
Compare
|
CI round — Coverage Gate fix (head The prior round's only failure was the backend per-file Fix (test-only, no production change): added HTTP-level coverage for the new handler in
The handler file now measures 90.4% (66/73), over the floor. Verified locally: the repo's (The one locally-red test, -- gloop glorp written by cabbey's Krewe (version 0.5.0-insider.7 on cabbey-work-mbp, on a scheduled action) |
509a575 to
116101c
Compare
116101c to
81eff7f
Compare
|
blocked until the mess made by @CrysisDeu 's #7424 / #7390 is resolved. |
81eff7f to
ec37746
Compare
This has been resolved. This PR is now as ready as I can make it. |
Design Review (Fable 5, fork) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS Sound gap-closing probe; the risk is running a 120-second binary-swap inside a single HTTP request with no concurrency guard. Watch
Suggestions
[DESIGN-REVIEWED] 7ec6086 |
UX Review (Fable 5, fork) — 🟡 CONCERNSUX-level review of Confirmed the mechanism. UX-Verdict: CONCERNS The screen promises "this page continues on its own" after a manual update, but its poll can never observe one — for every user who reaches it. Watch
Suggestions
[UX-REVIEWED] 7ec6086 |
First Principles Review (Fable 5, fork) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS The detection and remedy both earn their place, but "not generalizable" is contradicted by the doctor's identical blind spot, left unfixed. What this change shipsIntent: stop a signed-in-but-outdated kiro-cli from passing setup and then killing every session opaquely — a FIX (detection) plus a declared ADDITION (the in-place update remedy).
Watch
Subtractions
[FIRST-PRINCIPLES-REVIEWED] 7ec6086 |
Opus 4.8 Review (fork) — ✅ no blocking findingsReviewed Review detailsBoth candidates are falsified:
No Step-2 finding reaches the 80+ bar: No findings. [OPUS-REVIEWED] 7ec6086 |
GPT 5.6 Review (fork) — ✅ no blocking findingsReviewed Review detailsFINDING -- src/kiro_crew/kiro_prerequisite.py:2936 -- Windows skips sandbox preparation, contradicting |
ec37746 to
95b26ee
Compare
Legitimate and reachable, fixed in
-- beep boop written by cabbey's Krewe (version 0.5.0-insider.9 on cabbey-work-mbp, at direct user instruction) |
Fixed in
The update env is now -- gloop glorp written by cabbey's Krewe (version 0.5.0-insider.9 on cabbey-work-mbp, at direct user instruction) |
Fixed in
The terminal audit now selects the reason the way the probe does: -- clickity-clack written by cabbey's Krewe (version 0.5.0-insider.9 on cabbey-work-mbp, at direct user instruction) |
…ce update The first-run readiness gate only checked that kiro-cli was present (--version) and signed in (whoami). A CLI too old to expose the `acp` subcommand — which KiroCrew launches every session through — passed the gate and then failed opaquely at session-create (`process exited (rc=None)`). Add an `acp --help` probe after whoami: a clean "unknown subcommand" rejection sets acp_supported=False and narrows `ready`, while an inconclusive probe (timeout/sandbox refusal) is treated as supported so a healthy install is never blocked. The remedy is an in-place update, not a reinstall — a new owner-gated POST /api/kiro-prerequisite/update-cli runs `kiro-cli update` for the user and re-probes, and the gate shows an "Update Kiro CLI" screen in place of the install offer. Strings added to all 12 locales; the offline fake ACP backend answers `acp --help`.
95b26ee to
7ec6086
Compare
Legitimate and reachable, fixed in
The -- meep moop written by cabbey's Krewe (version 0.5.0-insider.9 on cabbey-work-mbp, at direct user instruction) |
Fixed in
Comment corrected to: -- 🤖 written by cabbey's Krewe (version 0.5.0-insider.9 on cabbey-work-mbp, at direct user instruction) |
bolichen97
left a comment
There was a problem hiding this comment.
Approving on the strength of a full readiness audit of every open PR against main, not a
line-by-line reading of this diff — recording that plainly so the next reader knows what this
stamp does and does not cover.
Verified against this exact head SHA:
readiness: passedpresent, andPR Readiness— the one required status context onmain
(rulesetprotected-branches) — issuccesson this head.- No check run on this head is
failure,cancelled,timed_outor still in flight. Skipped
jobs are path-filtered conditionals, none of them required. mergeable: true, and the head is not far enough behindmainfor its green CI to describe a
base that no longer exists.- No surviving reviewer
CHANGES_REQUESTED: any such review is on an older commit and therefore
already dismissed bydismiss_stale_reviews_on_push. - Every issue comment, inline review comment and review thread was read and classified. Nothing
left is an unresolved human change request — the remainder is bot review-lane output, resolved
or outdated threads, explicitly non-blocking suggestions, and author status notes.
Auto-merge (squash) is armed, so this lands once every other ruleset requirement is met.
Problem / Motivation
The first-run setup gate for Kiro CLI checked only two things: that the binary is present (
kiro-cli --version) and signed in (kiro-cli whoami). It never verified that the installed CLI is new enough to expose theacpsubcommand — which KiroCrew launches every agent session through (kiro-cli acp …, seeacp.client.KIRO_CLI_SUBCMD/acp.runtime.KIRO_CLI_SUBCMD).An outdated-but-signed-in CLI therefore passed the readiness gate cleanly and then failed at session-create with the opaque
process exited (rc=None)— the exact class of silent, hard-to-place failure the rest of this module exists to turn into an actionable card.Why it matters
A user whose
kiro-clipredates theacpsubcommand sees a green setup screen followed by every session dying with an unattributable error, and nothing tells them the cause is an out-of-date CLI. The remedy (an in-place update) is also different from the one the gate would otherwise imply (a reinstall from the setup page).What changed (motivation → approach → change)
Detection. After
whoamisucceeds, the readiness probe now runskiro-cli acp --help(the same read-only, sandboxed techniquecli_doctor.pyalready uses for the KAS engine flag). A clean "unknown subcommand" rejection (a clap CLI too old to haveacp) sets a newacp_supported=Falseand narrowsready— exactly like a rejected agent spec, since such a CLI runs and authenticates but cannot start a single session.The verdict is deliberately conservative in one direction: a probe that merely failed to run (timeout, sandbox refusal, or any unrecognized nonzero exit) is treated as supported, so a healthy, up-to-date install is never blocked behind an update card it does not need. A genuinely-too-old CLI whose rejection wording is unrecognized falls through to the pre-existing session-create error — no worse than before this check existed.
Remedy = update, not reinstall. Unlike the install / sign-in steps (which KiroCrew only names for the user to run), a new owner-gated
POST /api/kiro-prerequisite/update-clirunskiro-cli updatefor the user — the CLI's own in-place self-update, the same command the auto-update path inslack/gateway.pyalready invokes, so it introduces no new privileged surface — then re-probes so a successful update clears the gate. The gate's frontend shows a new CliOutdated screen (an "Update Kiro CLI" button plus the copyable command) in place of the install offer whenacp_supported === false.Offline harness + i18n. The offline fake ACP backend answers
acp --helpdeterministically so the E2E harness still passes the new gate. Eight new gate strings were added toen.manual.jsonand propagated to all 11 shipped non-English locales;en-XAwas regenerated.Tests
TestAcpSubcommandSupportNarrowsReadiness(6 tests): unknown-subcommand narrowsready; a present subcommand stays ready; an inconclusive probe is treated as supported; the probe is gated on a successfulwhoami; andupdate_cliboth re-probes on success and surfaces a failed update's output ascli_update_errorrather than crashing.acp --helpspawn.Manual verification
N/A — unit coverage is sufficient. The probe, the readiness narrowing, and the update path are all exercised by injected
process_runnerstubs; the offline fake backend covers the harness path.Note:
test_timeout_without_a_runnable_candidate_is_still_not_installedfails only on hosts that genuinely havekiro-cliinstalled on PATH (its premise is "no candidate on disk"); it is unrelated to this change.Screenshots / video
Why no screenshot: the new
CliOutdatedgate screen reuses the existingSetupShellchrome,Btn/SendBtn, andCopyCommandcomponents already shown by the sibling gate states in this same file; it introduces no new layout, theme, or component — only a new arrangement of existing primitives driven by a backend flag that cannot be reproduced without an out-of-datekiro-clion the gateway host. The full frontend gate chain (tsc,i18n:render) should be run in CI.Related Issues
no linked issue: reported directly by the maintainer; no tracking issue was filed.
Pattern harvest
Not generalizable: this is a one-off gap in one readiness gate (a capability check that was missing for one subcommand), not an instance of a repeatable defect class.
Checklist
-- 🤖 written by cabbey's Krewe (version 0.5.0-insider.7 on cabbey-work-mbp, at direct user instruction)