Repository navigation
fix(doctor): fail when kiro-cli-chat cannot launch - #23235
Conversation
d01214d to
f6d281f
Compare
UX Review (Opus 5.5, fork) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5, fork) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. One minor note: the new Notes
What this change shipsInventory (6 items) — 5 justifiedIntent:
[FIRST-PRINCIPLES-REVIEWED] 03c9dc8 Description read[DESCRIPTION-READ] a9e90a081f7d85c82b0463a9927a385e4500d131d3ae02e0eb5d73b42a1063a7 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks. The probe looks for the chat binary where Notes
[DESIGN-REVIEWED] 03c9dc8 Description read[DESCRIPTION-READ] 4fcd255a8b3e79efd2b0f55a9a11e8f9c1efe50e638e08280a3dd33d624fd6ca That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed |
GPT 6.1 Review (fork) — ✅ no blocking findings (all downgraded on adjudication)Reviewed Opus 5.5 adjudication downgraded every blocking finding. Downgraded: the remedy each one needs is disproportionate to the harm it prevents. Adjudication downgraded all 1 blocking finding(s): the remedy each one requires is disproportionate to the harm it prevents. Review detailsBLOCKING -- src/kiro_crew/doctor_checks/services.py:194 -- Do not infer an operator wrapper’s delegate from its filename (origin: validation)
Adjudication (Opus 5.5) — is blocking on each finding proportionate?F1 — LOW. Only |
f6d281f to
d6b44a6
Compare
|
Disposition for
Not rebased in that push: main had moved, but the PR was not DIRTY. |
d6b44a6 to
38c58b6
Compare
|
CI note for
|
38c58b6 to
7c5c7f7
Compare
|
CI note for
|
7c5c7f7 to
11f6b72
Compare
|
Rebased once onto main for the #23264 Windows fix. |
11f6b72 to
bc953b9
Compare
|
AI-review disposition for
GPT 6.1: no blocking findings. Design and First Principles: PASS. UX: skipped (no UI). |
bc953b9 to
3af5b69
Compare
|
Rebased once onto main (operator-authorized) to resolve the import conflict in src/kiro_crew/cli_doctor.py; kept main's kas_bundle import and the backend-gated kiro-cli-chat row unchanged. New head 3af5b69. |
3af5b69 to
4612da5
Compare
|
AI-review disposition for
|
|
Disposition for
|
|
Disposition for
|
1b21ebe to
c2fbed8
Compare
|
Disposition for
|
c2fbed8 to
b85d5f8
Compare
|
Disposition for
|
Security Scope Review (fork) — 🔴 BLOCK (blocking)Which legitimate operations does the review scope was never resolved: the generate job did not finish (it timed out, failed or was cancelled), so no leg ran; its log names the step that stopped No |
b85d5f8 to
8ed2c27
Compare
|
CI note for
Local, before pushing: |
|
Holding for a human reviewer. I found no defect. Reviewed head: 8ed2c27 The new doctor row looks correct: it probes the chat binary the launcher actually execs, the probe uses a fixed argv with a 5 s timeout, and the row is fatal only when a kiro-cli-based harness is selected. Every earlier Opus/GPT blocking finding has a disposition naming its fix, and the current-head lanes are clean. Why this needs a person:
Also worth knowing: To clear: a maintainer reviews the spawn allowlist entry and the vault-backed relay-entry logic. — crew-pr-reviewer (r130) |
8ed2c27 to
03c9dc8
Compare
|
Reply to the crew-pr-reviewer HOLD on
Local, before pushing: |
|
Disposition for
|
|
Disposition for
|
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: fix (6 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: adds a doctor check that reports when the kiro-cli-chat binary sessions exec cannot launch.
Problem / Motivation
Goal:
kirocrew doctorfails with "Kiro CLI is broken: reinstall it" when thekiro-cli-chatbinary every session runs cannot start, instead of reporting the install healthy.Doctor's Connectivity row runs
kiro-cli --version. Thekiro-clilauncher answers that itself and never startskiro-cli-chat. On a host where~/.local/bin/kiro-cli-chatlinks to a release an upgrade removed, doctor printskiro-cli: ✅and exits 0, while every session dies withprocess exited (rc=None)/(rc=1).Why it matters
Several users hit this in one week and lost time before someone found that a reinstall fixes it. #22980 made the runtime error name the fix. Doctor is the first thing a user or the on-call runs, and it still says nothing is wrong.
Not a goal
kiro-cli --versionrow.kiro-cli.exewith no separate chat binary.What changed (motivation → approach → change)
Symptom: doctor passes a broken install. Cause: it only asks the launcher, which answers
--versionwithout starting the chat binary.A new Connectivity row,
kiro-cli-chat, runskiro-cli-chat --versionwith a 5-second timeout. It looks for the chat binary where the launcher does:~/.local/bin, thenPATH, never the launcher's own directory. The exception is a macOS launcher insideKiro CLI.app/Contents/MacOS, which runs the chat binary next to it, so that one is probed. A path counts as soon as the link exists, even if it is dangling, so a broken~/.local/binlink is not hidden by a working copy beside the launcher or later onPATH. A bundledkiro-cli-chatentry is probed directly.A missing binary, a dangling link, a non-zero exit or a timeout prints⚠️ "not used by the selected backends" and doctor's exit code is unchanged, like the existing ⚠️ advisory. The row stays silent when there is no kiro-cli, on Windows, and when
❌ Kiro CLI is broken: <reason>with the fix "reinstall Kiro CLI (rerun its installer), then rerun kirocrew doctor". When the harness selected for either role runs kiro-cli (the Kiro CLI backend, or KAS through kiro-cli's relay, asagent.acp_backendor as the crewmate backendagent.member_acp_backend), it is added to doctor's issues and doctor exits 1. For any other harness (Claude, a KAS bundle, others) the same line prints askiro-cli --versionrow. When relay KAS is selected for either role and Crew's vault holds a usable identity, its spawn enters through thekiro-cli-chatbeside the launcher instead of the~/.local/bindelegate (the same swapKasHarness.resolve_spawnmakes, never for an operatorKIROCREW_KIRO_BIN; doctor asks the harness's own override rule through the newkas_operator_overridewrapper insrc/kiro_crew/agent_sdk/kas_bundle.pyrather than keeping a copy).services.kas_relay_entryresolves that binary and doctor probes it on its own, whatever the delegate returned, so a healthy delegate cannot hide a broken relay entry; a broken relay entry is fatal. The delegate is probed as well and is fatal when the Kiro CLI backend is also selected (a mixed selection runs both binaries). With relay KAS alone, a broken delegate next to a working relay entry is reported asKIROCREW_KIRO_BINnames a wrapper whose chat binary cannot be known.Backwards compatibility
Compatible: a healthy install gets one extra ✅ row; doctor now exits 1 only when the selected harness runs kiro-cli and no session can start.
Removes nothing: the change adds a row and removes no row, field or path.
Tests
test/test_doctor_kiro_chat_delegate.pyruns real files: a healthy chat binary passes; a dangling~/.local/binlink, a non-zero exit, a hang past the timeout and a missing binary each report the reinstall fix and add an issue; a dangling link is not skipped for a working copy onPATHor beside the launcher; a bundled chat entry and a macOS.appsibling are probed; withrequired=Falsea broken delegate printstest/test_cli_doctor_refactor_report.py: the frozen report pins the new row's position after thekiro-cliConnectivity row that it shares doctor's issues list, and that it is fatal for the Kiro CLI backend and relay KAS (main or crewmate backend, the latter insrc/kiro_crew/cli_doctor.py) but advisory for a KAS bundle and Claude on both roles.test/spawn_audit_helpers.py: the newkiro-cli-chat --versionspawn is listed inBENIGN_SPAWNSwith its justification (fixed argv, 5s, read-only, the same binary every session start already execs), sotest_spawn_auditkeeps passing.Manual verification
N/A: the unit tests run the probe through a real
execof on-disk scripts and links, which is the behaviour at issue.Related Issues
Closes #23232
Sibling sweep
Swept: git grep -n "resolve_kiro_cli()" -- src/kiro_crew/cli_doctor.py src/kiro_crew/cli_doctor_parts src/kiro_crew/doctor_checks
Sibling: src/kiro_crew/cli_doctor_parts/host_probes.py:57 -- not affected -- runs
whoami, a sign-in question the launcher answers correctlySibling: src/kiro_crew/cli_doctor_parts/kas_relay.py:122 -- not affected -- reads
acp --helpfor relay capability, not launchability; the new row covers the launchPattern harvest
Rule candidate: review-prompt
Pattern: a health check that probes a launcher or wrapper instead of the binary it delegates to
Checklist