Skip to content

fix(acp): warn when kiro-cli, or a KAS relay's kiro-cli, is outside its tested range - #37637

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
fix/kiro-cli-kas-tested-version
Nov 15, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
fix/kiro-cli-kas-tested-version

Conversation

@iamwhatever

Copy link
Copy Markdown
Contributor

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.md rank 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

  • A live kiro-cli lane. It needs a signed-in kiro-cli in CI; the range is held to the captures instead.
  • The KAS bundle route. It runs the engine acp/kas_pin.py pins, so it is the tested one; the KIROCREW_KAS_VERSION developer override is not warned about.
  • deepseek: Crew reads no deepseek version yet.
  • A doctor row. Only codex has one today.

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.

Piece Change
KIRO_CLI_TESTED_RANGE (acp/client_turn_control.py) 2.27.0 to 3.x, in _TESTED_VERSION_RANGES under kiro-cli's backend id
test/test_real_adapter_fixture_pins.py the kiro-cli fixture floor is now the range's bottom; new tests: the bottom equals the highest of the version gates the floor names, no live kiro or KAS capture is at or past the top, the top is the major after the newest capture, the Docker pin (packaging/kiro-cli-version) is inside
notice text below 2.27.0: run kiro-cli update; 4.x and up: a Kiro Crew update moves the range (kiro-cli cannot install an older chosen release); the notice names kiro-cli, since its backend id is ""
KAS relay (acp/harness/kas.py) at spawn, records the notice for the kiro-cli binary it spawns (read by 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 notice
AcpProvider.tested_version_notice reads the KAS field too; a client with no backend is no longer read as kiro-cli
AcpSessionProvider the five KAS str-field forwarders share one property factory, so the file stays under its 2,000-line cap

Why 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

  • At most two commits (one is the norm), with a Conventional Commits title
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license.

…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>
@iamwhatever
iamwhatever requested review from a team and KiroCrewCaptain as code owners November 15, 2026 15:03
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision cf619e3ba1758163bfd38a502ec82dc1d1f10e70 touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of cf619e3ba1758163bfd38a502ec82dc1d1f10e70 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

No design-level concerns: kiro-cli reports its release in agentInfo.version, the range is held to the captures by a test, and the notice only warns, never refuses.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of cf619e3ba1758163bfd38a502ec82dc1d1f10e70 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Two one-entry lookup tables are built as general tables. Nothing blocks.

Notes

  • Item 3 — one consumer, generalized: _NEWER_THAN_TESTED_ADVICE and _NOTICE_NAMES each hold one key, ACP_BACKEND_KIRO. Grepped both names: their only reader is untested_version_issue. Subtraction: delete both dicts and put the two kiro-cli strings behind one backend == ACP_BACKEND_KIRO check in untested_version_issue.

What this change ships

Inventory (8 items) — 7 justified

Intent: 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).

  1. A kiro-cli chat below 2.27.0 or on 4.x and up shows one notice row — justified
  2. A KAS relay chat shows the notice for the kiro-cli binary it spawned; the bundle route clears it — justified
  3. On 4.x the notice says a Kiro Crew update moves the range, not "run update", and it names the backend "kiro-cli" — one consumer, generalized
  4. The range reads as "2.27.0 to 3.x" — justified
  5. A client with no backend no longer gets the kiro-cli range — justified
  6. CI holds the range to the kiro/KAS captures and to the Docker pin — justified
  7. The five KAS notice forwarders become one property factory — rides along (keeps the file under its line cap)
  8. The gap-analysis and harness-parity docs are updated to match — justified

[FIRST-PRINCIPLES-REVIEWED] cf619e3

Description read

[DESCRIPTION-READ] 567577039cbac55a99728be7cd1782414e25f089716acb89a47a5e16e5ba41d1

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed cf619e3ba1758163bfd38a502ec82dc1d1f10e70 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] cf619e3

Verdict parsed from the review's SHA-scoped output markers for commit cf619e3ba1758163bfd38a502ec82dc1d1f10e70.

False positive or not applicable? A repository writer can comment:
/ai-review override fable cf619e3ba1758163bfd38a502ec82dc1d1f10e70 false-positive: <reason, 20 to 500 characters>

@github-actions

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of cf619e3ba1758163bfd38a502ec82dc1d1f10e70 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] cf619e3

False positive or not applicable? A repository writer can comment:
/ai-review override gpt cf619e3ba1758163bfd38a502ec82dc1d1f10e70 false-positive: <reason, 20 to 500 characters>

@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: Approve

Why: 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 cf619e3ba1 · 360 changed lines. If this recommendation is wrong, reply here: replies are how the approver is evaluated.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 15, 2026
@KiroCrewCaptain
KiroCrewCaptain enabled auto-merge (squash) November 15, 2026 16:41

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:917 reads 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_upgrade docstring in turn_spec_hooks.py:857 still 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:222 repeats the literal "kiro-cli update". The constant KIRO_CLI_UPDATE_COMMAND already exists, and importing it keeps the two in step.

@KiroCrewCaptain
KiroCrewCaptain merged commit 1dee6bb into main Nov 15, 2026
98 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the fix/kiro-cli-kas-tested-version branch November 15, 2026 16:42
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warn when kiro-cli, or a KAS relay's kiro-cli, is outside its tested range

2 participants