Repository navigation
fix(acp): warn when kiro-cli, or a KAS relay's kiro-cli, is outside its tested range - #37637
Conversation
…ts tested range Add KIRO_CLI_TESTED_RANGE (2.27.0 to 3.x) to _TESTED_VERSION_RANGES. No CI lane runs a live kiro-cli, so the range is held to the captures instead: test_real_adapter_fixture_pins.py now takes the kiro-cli fixture floor from the range's bottom, asserts that bottom is the highest kiro-cli version gate, that no live kiro or KAS capture is at or past its top, that the top is the major after the newest capture, and that the Docker pin (2.27.1) is inside it. A new kiro-cli chat outside the range gets the same notice row claude and pi get. An older kiro-cli is told to run 'kiro-cli update'; a newer major is told a Kiro Crew update moves the range. A KAS relay session gets the row for the kiro-cli it runs under, recorded at spawn like the agent-prompt notice; the bundle route runs the pinned engine and gets none. The chat still runs. The five KAS str-field forwarders on AcpSessionProvider now share one property factory so the file stays under its line cap. Co-authored-by: Joe Guo <zejiangg@amazon.com>
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS No design-level concerns: kiro-cli reports its release in [DESIGN-REVIEWED] cf619e3 Description read[DESCRIPTION-READ] db1121e8a24692ff2397cf8bd80a828fd0a9db4b55b9ba2461f9ee5cd22ec9ae 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 |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Two one-entry lookup tables are built as general tables. Nothing blocks. Notes
What this change shipsInventory (8 items) — 7 justifiedIntent: when a new chat runs on a kiro-cli release Crew has not tested, either directly or under a KAS relay, the user is told once and the chat still runs. This is a FIX (#37636; R-LAU-3 in the gap analysis).
[FIRST-PRINCIPLES-REVIEWED] cf619e3 Description read[DESCRIPTION-READ] 567577039cbac55a99728be7cd1782414e25f089716acb89a47a5e16e5ba41d1 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Code change approver recommendation: ApproveWhy: the decider estimates a 12% chance that this change introduces a defect, within the 12% limit for approving on its own, and every check passes. Adds the kiro-cli range (2.27.0 to 4.0.0, labelled "2.27.0 to 3.x") to _TESTED_VERSION_RANGES under backend id "", with kiro-cli-specific advice for releases above the range and a display name for the notice. KAS relay spawns record a notice from the kiro-cli binary they spawn. The notice is reset at each spawn and on the bundle route, copied to the session handle, and read through a new AcpSessionProvider property and the AcpProvider.tested_version_notice fallback. Checked: notice text for goose/codex/claude/pi is unchanged; the new label branch can't be reached by existing ranges; the Docker pin 2.27.1 and every capture (2.32–3.1) are inside the range; the floor equals max(gates) = 2.27.0; the E2E fake backend reports no version, so it stays silent; the binding test hashes AcpProvider signatures only, so it is unaffected. Tests cover the range, both kinds of advice, the provider row, the KAS forwarding, the bundle-route clear and the PATH-only read, and the fixture-pin test goes red on a 4.x capture. Backend test shards and E2E were still pending; new-test stability passed on Linux and Windows. No regression or trust-boundary problem found. An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
I checked every changed path on this head. Adding kiro-cli to the tested-range table leaves the notice text for goose, codex, claude and pi unchanged. A client that names no backend is no longer read as kiro-cli. The relay notice is cleared on every spawn and on the bundle route, and the version read runs off the event loop. Reverting each behaviour hunk makes a test fail, the tests are deterministic, and PR Readiness is green.
Done well: the range is tied to evidence CI already holds. Every live kiro and KAS capture, plus the Docker pin, must fall inside KIRO_CLI_TESTED_RANGE, and a 4.x capture fails CI until the range moves.
Optional:
kas.py:917reads a PATH-only kiro-cli through a probe that does not wait. That probe returns nothing on its first call, so the first relay spawn can show no notice, and only spawns after the version is cached warn. The PATH-only test stubs the version read, so it only covers a filled cache. You could narrow the "PATH-only install is covered" claim to match.- The
_notice_steer_upgradedocstring inturn_spec_hooks.py:857still lists only goose, codex, claude or pi. The kiro-cli reference README still calls those numbers feature floors, not a range. client_turn_control.py:222repeats the literal "kiro-cli update". The constant KIRO_CLI_UPDATE_COMMAND already exists, and importing it keeps the two in step.
Problem / Motivation
Goal: A new chat on a kiro-cli release Crew has not tested, or a KAS relay running under one, says so once, and the chat still runs.
goose, codex, claude and pi already show one notice row when their installed release is outside the tested range. kiro-cli and KAS show nothing (requirement R-LAU-3,
docs/architecture/harness-gap-analysis.mdrank 6). #36979 left them out (#36976) because CI has no single kiro-cli release: no lane runs a live kiro-cli (it needs a sign-in), the Docker image pins 2.27.1, and the live kiro and KAS captures were taken on 2.32.0 to 3.1.0.Why it matters
kiro-cli updates itself, and 3.1 already changed what it loads (#36125); KAS dropped agent prompts below kiro-cli 2.33.1 (#25171). A release Crew never captured runs with no word. kiro-cli is the default harness, so the range must not warn current installs.
Not a goal
acp/kas_pin.pypins, so it is the tested one; theKIROCREW_KAS_VERSIONdeveloper override is not warned about.What changed (motivation → approach → change)
Symptom: no untested-version notice for kiro-cli or KAS. Cause: no recorded kiro-cli range, so neither is in
_TESTED_VERSION_RANGES. Change: record one range and make CI hold it to the captures.KIRO_CLI_TESTED_RANGE(acp/client_turn_control.py)_TESTED_VERSION_RANGESunder kiro-cli's backend idtest/test_real_adapter_fixture_pins.pypackaging/kiro-cli-version) is insidekiro-cli update; 4.x and up: a Kiro Crew update moves the range (kiro-cli cannot install an older chosen release); the notice nameskiro-cli, since its backend id is""acp/harness/kas.py)resolved_kiro_cli_version, as the route reads it, so a PATH-only install is covered); the bundle route clears it; carried to the session like the agent-prompt noticeAcpProvider.tested_version_noticebackendis no longer read as kiro-cliAcpSessionProviderWhy this range: 3.x is what current installs run (3.1.0 is the newest capture), 2.27.1 is the Docker image, and 2.27.0 is the floor the captures were already held to. A capture on 4.x reds the fixture-pin test until the range moves with it.
Backwards compatibility
Compatible: the notice is a warning row; no session is refused. Kiro-cli 2.27.0 to 3.x and the Docker image see nothing new.
Removes nothing: the forwarder change keeps every property name and value.
Tests
test/test_kiro_cli_tested_version_notice.py(26 tests): 2.27.0 to 3.99.9 silent; unreadable versions silent; older releases told to update; 4.x told Crew must catch up; one notice row on a new kiro-cli session; a client with no backend gets none; a KAS session shows its relay's notice; the relay spawn records it per kiro-cli release; a PATH-only relay is read by the binary it spawns; a bundle respawn clears it.test/test_real_adapter_fixture_pins.py: the range tests above.test/test_goose_tested_version_notice.py: the "other harnesses" set excludes kiro-cli.Proof: not provable -- other: reverting the source removes
KIRO_CLI_TESTED_RANGE, so both test modules fail at import; reverting by hand only the table entry, the KAS handle copy and the provider read fails 12 of the 25 tests the module then had, and reverting the spawned-binary read alone fails the PATH-only test.Manual verification
N/A — unit coverage sufficient: the notice path is the one goose, codex, claude and pi already use.
Related Issues
Fixes #37636
Sibling sweep
Swept:
git grep -n "_TESTED_VERSION_RANGES\|untested_version_issue\|kas_agent_prompt_notice" -- src/Sibling: src/kiro_crew/acp/client_turn_control.py -- changed here
Sibling: src/kiro_crew/providers/acp.py -- changed here
Sibling: src/kiro_crew/acp/harness/kas.py -- changed here
Sibling: src/kiro_crew/agent_sdk/drivers/acp.py -- not affected -- codex-only doctor helper, out of scope
Pattern harvest
Not generalizable: one more member of an opt-in table, with its range tied to the captures the way the lane pins tie the others.
Checklist
Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license.