Skip to content

feat(acp): run a Kiro CLI choice on KAS when kiro-cli offers v3 - #25350

Merged
buluoray merged 1 commit into
mainfrom
fix/25288-kiro-cli-on-kas
Oct 29, 2026
Merged

buluoray merged 1 commit into
mainfrom
fix/25288-kiro-cli-on-kas

Conversation

@buluoray

@buluoray buluoray commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: A user who picked the Kiro CLI harness keeps working when kiro-cli switches its default acp engine to v3 (KAS) on 11/2 and removes v2 at the end of November.

A Kiro CLI pick is launched as a bare kiro-cli acp (src/kiro_crew/acp/client_spawn_env.py:87). Once kiro-cli's default flips, that process runs the v3 engine while Crew still drives it as the v2 harness: per-spawn skill-view aliases, the workspace cli.json effort overlay and re-filtered agent specs, none of which v3 reads. Behaviour then depends on which side each feature consults.

Why it matters

Every install that explicitly chose Kiro CLI (stored agent.acp_backend: "kiro") is hit on 11/2, silently, and loses v2 entirely at the end of November.

Not a goal

  • Removing the Kiro CLI harness, the skill-view aliases or the cli.json overlay (follows once kiro-cli removes v2).
  • Changing what the floor does for a typo'd or policy-denied backend (harness-parity H3): that is not a Kiro CLI pick and keeps the Kiro CLI launch as today.

What changed (motivation → approach → change)

Symptom → cause → change:

  • Load-time remap, positive evidence only. _read_backend_choice (config/loader_builders.py) reads a stored agent.acp_backend: "kiro" as kiro_cli_pick_backend() (agent_sdk/backends.py): KAS once this process recorded confirm_kiro_cli_offers_kas() and while KAS is selectable, Kiro CLI otherwise. The selection gate resolve_selected_backend is unchanged and answers Kiro CLI for Kiro CLI, so a Kiro CLI id it already answered (a degraded member floor, a worker backend) is never moved again. Every capability set reads KAS's membership for the moved pick, with no "picked Kiro" test anywhere (harness-parity H6/H7). Without the evidence — another process, an unknown probe, a kiro-cli without v3, the bundle route, a policy that denies KAS — the pick keeps the v2 launch. No session is refused. config.json keeps "kiro".
  • The gateway's existing KAS floor is the evidence. kas_engine_verdict() (agent_sdk/drivers/acp.py) splits the acp --help probe into supported / unsupported / unknown. apply_kas_cli_floor records the v3 confirmation on any "supported" probe (so a Kiro CLI pick made later in the process moves too) and re-resolves a stored pick to KAS; on "unsupported" it marks KAS unservable and logs KAS_CLI_FLOOR_KIRO_NOTICE (names kiro-cli update); on "unknown" or the bundle route it changes nothing. _start_kas_cli_floor arms a Kiro CLI main backend too; the off-loop declaration read releases it at once unless it is the stored pick, which waits (bounded by the probe timeout) so its first spawn lands on the verdict.
  • The verdict reaches the live factory. After a confirming probe the floor task forces one config-watcher cycle (_reconcile_live_config_with_kiro_verdict) before it ends, so spawn waiters are released only after SessionManager rebuilt its provider factory from a fresh load (the diff names agent.acp_backend), keeping any settings change made while the probe ran.
  • A waiting cold start takes the factory in force. get_or_create re-reads owner._provider_factory after await_kas_floor_verdict, so a spawn that waited for the verdict uses the factory the verdict's reload installed. Not on the bundle route: _read_backend_choice skips the remap when agent.kas_bundle is on, and the notice and panel flag read the loaded field. spliceProbeRow keeps the response's other fields.
  • Told once, one click. kiro_on_kas_notice waits for the floor task, then posts one bell note (system.agent, links /settings/agent) only when the gate answers KAS for the stored pick; an O_EXCL marker in the data home makes it once per install. GET /api/acp-backends adds kiro_selection_runs_on_kas (same answer, so it is false until the floor confirmed v3), and the Agent Harness panel shows one line plus Save Kiro Agent as my setting (the option's visible name), which PATCHes agent.acp_backend=kas and leaves "Saved: Kiro Agent." in its place. The bell note uses the same name.
  • Malformed values stay on the floor. validate_config_data replaces a present non-string agent.acp_backend with MALFORMED_BACKEND_FLOOR rather than "kiro", and _read_backend_choice reads it as the Kiro CLI floor, so a hand-edited bad value is never mistaken for a Kiro CLI pick and never moves onto KAS (harness-parity H3). The member field keeps its existing handling.
  • Both states on screen. The callout leads with "Your setting: Kiro CLI · New sessions use: Kiro Agent", and the Kiro CLI row carries a "Your setting" marker beside the Kiro Agent row's "In use"; both go once KAS is saved (AgentBackendTab.kiroOnKas.test.tsx "names both states and marks the Kiro CLI row", which reddens without the marker).
  • Doctor. kirocrew doctor prints the KAS relay rows for a stored Kiro CLI pick (not on the bundle route), and the engine row offers kiro-cli update instead of "switch to kiro".
  • acp_backend_stored_as_kiro() (config/loader_document.py) is the one reader of the stored pick. knowledge/llm_pool does not warn when a Kiro CLI pick lands back on Kiro CLI there.
  • Decision entry docs/decisions/2026-10-28-a-kiro-cli-choice-runs-on-kas.md. Specs updated in the same commit: harness-parity H1, config, providers, acp-client, model-selection, agent-host-contract, slack-gateway; user doc configuration.md.

This changes what an existing setting does by default. There is no RFC on main for it; the owner's decision is issue #25288, recorded in the decision entry above.

Backwards compatibility

Compatible: no stored value is rewritten or rejected; a Kiro CLI pick still resolves to a startable harness everywhere (KAS only where the gateway confirmed v3, the unchanged Kiro CLI launch otherwise). In that gateway, readers of the resolved field see kas for the pick (the config response, to_dict()), the way a stored kiro member backend already reads as KAS.

Removes nothing: the Kiro CLI harness, its launch, the skill-view aliases and the cli.json overlay all stay and still serve a Kiro CLI pick wherever v3 is not confirmed.

Tests

Proof: not provable -- other: prove.py stops at BASELINE_RED because a changed test file carries host-only reds that also fail on main. Reverted by hand instead: removing the Kiro pick branch in resolve_selected_backend reddens test_acp_backend_kas.py::TestAKiroCliPickRunsOnKasOnceV3IsConfirmed::test_a_confirmed_v3_kiro_cli_runs_the_pick_on_kas, test_kas_cli_floor.py::TestDefaultNoticeWording::test_a_v3_kiro_cli_moves_the_pick_onto_kas, ::TestAKiroCliPickWaitsForTheFloor::test_a_spawn_on_a_kiro_cli_pick_waits_and_lands_on_kas and the note tests; removing the panel callout reddens AgentBackendTab.kiroOnKas.test.tsx "offers one click that saves KAS as the setting".

  • test_acp_backend_kas.py::TestAKiroCliPickRunsOnKasOnceV3IsConfirmed: no evidence → Kiro CLI; confirmed → KAS provider; policy denies KAS → Kiro CLI; a typo still takes the floor.
  • test_acp_backend_kas.py::TestAKiroCliPickRunsOnKasOnceV3IsConfirmed::test_a_degraded_value_takes_the_floor_not_kas covers non-string values (7, true, [], null) with v3 confirmed; reverting the validation marker reddens 4 cases. ::test_a_malformed_value_is_warned_about_once pins a single warning.
  • test_kas_cli_floor.py::TestAResolvedKiroIdIsNeverMovedAgain: a member floor from "not-a-backend" stays Kiro CLI through every re-resolution with v3 confirmed (reverting the gate change reddens 2). ::TestTheVerdictReachesTheLiveFactory: a confirming verdict refreshes the live config before the floor task ends, no refresh without one, and the reload's diff names agent.acp_backend (removing the refresh reddens 1).
  • test_cli_doctor_agent_auth.py::TestDoctorKiroCliPickOnAnOldKiroCli::test_kas_only_rows_run_only_where_the_pick_runs_on_kas: a Kiro CLI pick the gateway keeps on v2 (unknown probe or no v3) gets no KAS permissions or tool-name doctor rows; a KAS pick and a pick on KAS still do (removing the skip reddens 2).
  • test_kas_cli_floor.py::TestAWaitingColdStartUsesTheFactoryInForce: a factory swapped during the wait builds the provider (removing the re-read reddens it). Bundle-route tests in test_acp_backend_kas.py and test_kiro_on_kas_notice.py, and the vitest "keeps the callout when another harness is checked again", each redden without their fix. Test waits are bounded with asyncio.wait_for.
  • test_kas_cli_floor.py: v3 moves the pick; an unknown probe or one without v3 does not; the bundle route never probes; a floor answer that is not a pick is not moved; the old-kiro-cli notice names kiro-cli update (and the KAS member's notice too when both apply); gating per role; a spawn on the pick waits and lands on KAS.
  • test_kiro_on_kas_notice.py: claimed once; nothing without a positive verdict, on an old kiro-cli, under a policy that denies KAS, or after a failed probe; waits for the floor; the panel flag reads the same answer.
  • test_cli_doctor_agent_auth.py: the engine row offers kiro-cli update for a Kiro CLI pick; no KAS block for one on the bundle route.
  • AgentBackendTab.kiroOnKas.test.tsx: the callout and its PATCH; nothing shown when the flag is false or absent.
  • test/conftest.py: the floor's verdicts are per-test process state.

Locally: 294 related backend test files (15,067 passed); every red there also fails on main on this host (Copilot ~/.mcp.json, systemd unit, guest Python). Related frontend tests, tsc -p tsconfig.app.json, black/isort/flake8/mypy, the harness-parity and comment-history gates clean.

Manual verification

  • Rendered the Agent Harness panel against stubbed APIs (light and dark), pressed the button, and saw the PATCH and the callout go away.
  • Not run: a live gateway against a real kiro-cli with and without v3; the probe is the existing apply_kas_cli_floor one and each verdict is covered above.
  • Windows/macOS: unverified; nothing platform-specific was changed.

Screenshots / video

Agent Harness: Your setting: Kiro CLI · New sessions use: Kiro Agent (light)

Same, dark

After pressing Save Kiro Agent as my setting

After save: Saved: Kiro Agent.

The bell note, open in the bell panel before the click (the real NotificationSheet with the note as the gateway posts it; title "Kiro CLI now runs on Kiro Agent", body "Kiro CLI now runs on Kiro Agent, so new sessions already use it. Open Agent Harness to save Kiro Agent as your setting.", link /settings/agent):

Bell panel with the Kiro CLI on Kiro Agent note (light)

Same, dark

Related Issues

Closes #25288

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • 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.

@buluoray
buluoray requested review from a team and KiroCrewCaptain as code owners October 28, 2026 17:42
@buluoray
buluoray requested a review from cruisercohen October 28, 2026 17:42
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 28, 2026
@buluoray
buluoray enabled auto-merge (squash) October 28, 2026 18:53
@buluoray
buluoray force-pushed the fix/25288-kiro-cli-on-kas branch from 2c2a658 to 47f9e7b Compare October 28, 2026 19:00
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 56b4b1c

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

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Oct 28, 2026
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ human override accepted

@buluoray overrode this lane for 56b4b1cde42bf4adca0e97c50722a4c95453cb82 via /ai-review override (this commit only).

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 28, 2026
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)

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

UX-Verdict: PASS

cannot evaluate: missing the bell notification. The new bell note is how users first hear about the switch, and no screenshot shows it. The Agent Harness callout, button, saved state and row marker are all in the screenshots.

Evidence gaps

  • Bell note (kiro_on_kas_notice.py): it has the title "Kiro CLI now runs on Kiro Agent", the body "…Open Agent Harness to save Kiro Agent as your setting." and a link to /settings/agent. It is missing from shot-01 to shot-03. A screenshot of the open bell panel with this note in it, before the click, would close the gap.

Notes

  • The blind reader could not follow kiro_runs_on_kas. They read "Kiro CLI now runs on Kiro Agent" as "a guess", wrote "I do not know how one program can 'run on' another", and could not tell whether these are two products or one. A rewrite that makes the relationship explicit would help: "Kiro CLI has switched to the Kiro Agent engine, so new sessions already use Kiro Agent."
  • That same string ends with "Save Kiro Agent as your setting?", which only repeats the button label next to it. Drop the question.
  • In shot-01 the filled dot is on Kiro Agent while "Your setting" sits on Kiro CLI. The reader "could not say which one the filled dot stands for" and would not risk clicking the Kiro CLI dot. Change the marker text to "Saved setting" so it can't be read the same way as "In use".

[UX-REVIEWED] 56b4b1c

Description read

[DESCRIPTION-READ] a936d83f8e931700d1cac91debae9d0ff7f58a7b00596b95d3f2e4c28d783965

That sha256 names everything this verdict read: the PR description, plus the 6 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

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Nothing blocks: the remap relies only on positive probe evidence, keeps the stored value, falls back to the unchanged v2 launch, and a revert undoes it cleanly.

Notes

  • The evidence is process-local (_kiro_cli_offers_kas), so a stored Kiro CLI pick run outside the gateway (CLI chat, doctor, anything that never runs the floor) still starts a bare kiro-cli acp. After 11/2 that is the same v3-driven-as-v2 mismatch this PR exists to fix. Say so in ## Not a goal, or file a follow-up.
  • The probe checks whether kiro-cli offers v3, not whether v3 is its default. A user who picked Kiro CLI to avoid a KAS problem gets moved before the flip, and the only setting that keeps them on v2 is kas_bundle. Confirm that issue Run a Kiro CLI harness selection on the KAS path once kiro-cli defaults to v3 #25288 / the decision entry accepts this.
  • The Tests section says the reverted branch is in resolve_selected_backend, but the diff keeps the gate unchanged and puts it in _read_backend_choice. Fix the proof line so it names the code that is actually reverted.

[DESIGN-REVIEWED] 56b4b1c

Description read

[DESCRIPTION-READ] a8955b460e9ad3cd3f73f9a42104e6f691f2eb95710641cb77352f89a9960934

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

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ human override accepted

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

Human judgment by @buluoray overrides the Opus 5.5 finding for 56b4b1cde42bf4adca0e97c50722a4c95453cb82; the recorded reason is authoritative for this commit.

[OPUS-OVERRIDE] 56b4b1c

Verdict recorded from an authorized human decision for commit 56b4b1cde42bf4adca0e97c50722a4c95453cb82.

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

@buluoray
buluoray force-pushed the fix/25288-kiro-cli-on-kas branch from 47f9e7b to c570674 Compare October 28, 2026 20:23
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 28, 2026
@buluoray
buluoray force-pushed the fix/25288-kiro-cli-on-kas branch from c570674 to ad6ce52 Compare October 28, 2026 21:09
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 28, 2026
@buluoray

Copy link
Copy Markdown
Contributor Author

🤖 Kiro Crew Auto-Pipeline [operator: buluoray#ce473fca]: Owner decision, posted at @buluoray's direction.

I confirm the product shape of this PR. kiro-cli makes v3 (KAS) its default engine on 11/2 and removes v2 at the end of November. So a user who picks Kiro CLI runs on the KAS path whenever their kiro-cli confirms it offers v3. Only an older kiro-cli that cannot offer v3 stays on v2. Crew never refuses to start a session over this.

This is the intended change, not an accidental product shift. I am releasing the First Principles product-shape finding as the owner.

@buluoray
buluoray force-pushed the fix/25288-kiro-cli-on-kas branch from ad6ce52 to 4cb2f47 Compare October 28, 2026 22:19
@buluoray
buluoray force-pushed the fix/25288-kiro-cli-on-kas branch from 233d3b5 to db957f2 Compare October 29, 2026 05:39
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 29, 2026
…er v3

kiro-cli switches a bare `kiro-cli acp` to its v3 (KAS) engine and is
retiring v2. A stored `agent.acp_backend: "kiro"` now resolves to KAS at
the one selection gate once the gateway's KAS floor confirmed, from a
probe that ran, that the installed kiro-cli offers v3, and while KAS is
selectable. The session then gets KAS's launch, projection, permissions
and compaction. Without that evidence (another process, an unknown
probe, a kiro-cli without v3, the bundle route, a policy that denies
KAS) the pick keeps the v2 launch; no session is refused.

- the gateway arms a Kiro CLI main backend on the floor and holds a
  stored pick until the verdict; a kiro-cli without v3 logs a notice
  naming `kiro-cli update`
- one bell note, once per install, after a confirming verdict; the Agent
  Harness panel offers one click that saves `kas`
- `kirocrew doctor` reports the KAS relay rows for a Kiro CLI pick and
  offers the kiro-cli update
- decision entry docs/decisions/2026-10-28-a-kiro-cli-choice-runs-on-kas.md
  and the owning specs updated

The Kiro CLI harness, skill-view aliases and cli.json overlay stay.

Closes #25288
@buluoray
buluoray force-pushed the fix/25288-kiro-cli-on-kas branch from db957f2 to 56b4b1c Compare October 29, 2026 06:15
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 29, 2026
@buluoray

Copy link
Copy Markdown
Contributor Author

/ai-review override first-principles 56b4b1c owner-decision: The product shape is the owner's recorded choice: a Kiro CLI pick runs on KAS once kiro-cli confirms v3; old kiro-cli stays on v2; no session is refused. Owner decision: #25350 (comment)

@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded

@buluoray recorded a owner-decision release (class owner-decision) for the first-principles AI finding on 56b4b1cde42bf4adca0e97c50722a4c95453cb82.

The product shape is the owner's recorded choice: a Kiro CLI pick runs on KAS once kiro-cli confirms v3; old kiro-cli stays on v2; no session is refused. Owner decision: #25350 (comment)

This decision applies only to this commit. A new push requires a new judgment.

@buluoray

Copy link
Copy Markdown
Contributor Author

/ai-review override fable 56b4b1c owner-decision: Opus blocks only on governance, not code: the decision entry is signed by the project owner, and the Kiro pick now depends on the v3 probe. Both are the owner's recorded choice for the 11/2 KAS switch. Owner decision: #25350 (comment)

@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded

@buluoray recorded a owner-decision release (class owner-decision) for the fable AI finding on 56b4b1cde42bf4adca0e97c50722a4c95453cb82.

Opus blocks only on governance, not code: the decision entry is signed by the project owner, and the Kiro pick now depends on the v3 probe. Both are the owner's recorded choice for the 11/2 KAS switch. Owner decision: #25350 (comment)

This decision applies only to this commit. A new push requires a new judgment.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention labels Oct 29, 2026
@buluoray
buluoray merged commit a66ab5f into main Oct 29, 2026
107 of 116 checks passed
@buluoray
buluoray deleted the fix/25288-kiro-cli-on-kas branch October 29, 2026 16:03
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 29, 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.

Run a Kiro CLI harness selection on the KAS path once kiro-cli defaults to v3

2 participants