Repository navigation
feat(kas): insider and stable builds prefer the built-in engine - #39998
Conversation
First Principles Review (Opus 5.5) — ✅ human override accepted@CrysisDeu overrode this lane for |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the default is applied per spawn, a saved Notes
[DESIGN-REVIEWED] 7011136 Description read[DESCRIPTION-READ] 6dcaf55a7fbaacbc50cf7993bc2f1edddd1b303bf05d4cb335d38065a583e99f 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 |
UX Review (Opus 5.5) — ✅ human override accepted@CrysisDeu overrode this lane for |
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: |
b5383cf to
413a74c
Compare
|
Owner decision (product shape): packaged builds (insider and stable, same bytes) prefer Kiro Crew's built-in KAS engine when I reviewed and approved the fallback design ("这个可以保留,开始写代码吧" — keep it, start writing the code) and signed off on #39611: #39611 (comment) This decision stands in for an RFC for the First Principles lane. |
|
/ai-review override first-principles 413a74c owner-decision: Owner approved packaged builds preferring the built-in KAS engine with this fallback: #39998 (comment) |
Human judgment recorded@CrysisDeu recorded a owner-decision release (class
This decision applies only to this commit. A new push requires a new judgment. |
|
Human judgment recorded, but the following reviewer lane(s) could not be re-run automatically: First Principles Review. Re-run the lane's latest workflow run for |
413a74c to
bbc8372
Compare
bbc8372 to
a5c9fc3
Compare
|
/ai-review override first-principles a5c9fc3 owner-decision: Owner approved packaged builds preferring the built-in KAS engine with this fallback: #39998 (comment) |
Human judgment recorded@CrysisDeu recorded a owner-decision release (class
This decision applies only to this commit. A new push requires a new judgment. |
a5c9fc3 to
cd99f1b
Compare
|
/ai-review override first-principles cd99f1b owner-decision: Owner approved packaged builds preferring the built-in KAS engine with this fallback: #39998 (comment) |
Human judgment recorded@CrysisDeu recorded a owner-decision release (class
This decision applies only to this commit. A new push requires a new judgment. |
cd99f1b to
b9034eb
Compare
|
/ai-review override first-principles b9034eb owner-decision: Owner approved packaged builds preferring the built-in KAS engine with this fallback: #39998 (comment) |
Human judgment recorded@CrysisDeu recorded a owner-decision release (class
This decision applies only to this commit. A new push requires a new judgment. |
|
/ai-review override first-principles 02c2944018f0b8c00e0d5c6c1ea4b1d6a0e6ca21 owner-decision: Owner approved packaged builds preferring the built-in KAS engine with this fallback: #39998 (comment) |
cb31e0d to
02c2944
Compare
|
AI-review override not recorded: |
|
/ai-review override first-principles 02c2944 owner-decision: Owner approved packaged builds preferring the built-in KAS engine with this fallback: #39998 (comment) |
Human judgment recorded@CrysisDeu recorded a owner-decision release (class
This decision applies only to this commit. A new push requires a new judgment. |
|
/ai-review override ux 02c2944 owner-decision: Owner ruled the engine choice labels "Built-in harness" / "Kiro CLI": #39998 (comment) |
Human judgment recorded@CrysisDeu recorded a owner-decision release (class
This decision applies only to this commit. A new push requires a new judgment. |
A packaged build (desktop app, wheel, image; never a source checkout) now prefers Kiro Crew's own KAS engine when agent.kas_bundle is unset. The decision reads the baked distribution, not the release lane, so insider and stable, which ship the same bytes, behave alike. A saved value always wins, and the loaded field is only ever the saved value. KAS takes the engine once Kiro Crew's own sign-in is usable. A host signed in only to kiro-cli stays on kiro-cli, and the chat asks the owner to sign in once; kiro-cli's login is never copied. The default's first move to the engine that fails runs that chat on kiro-cli, with a notice, and new chats retry the engine after 10 minutes. Once the engine has started on a host, a failure is fixed in place instead: three tries 5 s apart, then a plain error and the chat's own Resume, the cause in the log only, and kiro-cli is never offered. The engine choice moves from Feature previews to the KAS row of Settings > Agent Harness, as a two-way choice: built-in engine or Kiro CLI. Closes #39611
With packaged builds preferring the built-in engine, --no-kas must never mean "on but with no engine". It now saves agent.kas_bundle off as well as skipping the engine download, in cli.sh and install.sh, so the install stays on Kiro CLI until the user picks the engine in Settings > Agent Harness.
02c2944 to
7011136
Compare
|
/ai-review override first-principles 7011136 owner-decision: Owner approved packaged builds preferring the built-in KAS engine with this fallback: #39998 (comment) |
Human judgment recorded@CrysisDeu recorded a owner-decision release (class
This decision applies only to this commit. A new push requires a new judgment. |
|
/ai-review override ux 7011136 owner-decision: Owner ruled the engine choice labels "Built-in harness" / "Kiro CLI": #39998 (comment) |
Human judgment recorded@CrysisDeu recorded a owner-decision release (class
This decision applies only to this commit. A new push requires a new judgment. |
Code change approver recommendation: A person should decideWhy: the decider thinks the change is probably fine but estimates a 20% chance that this change introduces a defect, above the 12% limit for approving on its own. Packaged builds (any distribution stamp except Tier: 2, held for a person: security-sensitive path. 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.
Review of 7011136: PR Readiness is green on this head. The code review lanes report no findings and Design passes. A reviewer run of test_kas_build_default_route.py passed 25 of 25. Mutating the preview cooldown check, the engine-ran cooldown exemption and the retry cap each turns a test red. Nothing on main or in another open PR duplicates this change.
Done well: the loaded agent.kas_bundle stays exactly the saved value, and rule 1b applies the build preference per spawn. A saved choice always wins, and nothing is written to disk that the user did not choose.
Security: the change touches the shared sign-in prompt, and the risk is not realized. The prompt reuses the existing sign-in strip and dialog. sign_in_moves_to_engine is shown to the owner only. The kas_engine_ran marker holds no secret, and writing it can only turn off the Kiro CLI fallback. No sandbox, token or gate code changes, and credential choice still goes through resolve_kas_route.
The design is signed off under the standing maintainer sign-off for changes by team members.
Optional:
- runtime_spawn_entry.py:243: the in-place retries and their 5 s waits run while the cold-start admission permit is held. A hung engine can hold a permit for about 280 s and stall other cold starts. Consider releasing the permit between attempts.
- kas_build_default.py:81: LTS wheel and desktop builds also get rule 1b. RFC D6 still lists only two triggers for the engine route. Amend D6, or keep LTS out until its owners decide.
- bootstrap.py:749: on nightly, the boot-time Kiro CLI floor can now move KAS to the Kiro CLI harness before Crew is signed in, which hides the new sign-in prompt. Consider skipping that step while the build default could still take the engine.
Problem / Motivation
Goal: Insider and stable builds run KAS on Kiro Crew's own built-in engine by default, with a fallback that never strands a kiro-cli user.
Only nightly defaults
agent.kas_bundleon today. Insider and stable ship the same bytes, so a lane stamp cannot make insider differ from stable. The default has to come from "this is a packaged build" instead, and the failure cases need defined behaviour first. That behaviour was reviewed and approved by the owner (issue #39611).Why it matters
Bundle-route bugs show up only on nightly, or only after stable. Insider users never open the setting, so they never use the engine. A default switch with no fallback would break kiro-cli users whose Kiro Crew sign-in is missing or whose engine will not start.
Not a goal
What changed (motivation → approach → change)
Goal → the default reads the baked distribution (
beacon.baked_distribution(): a desktop app, wheel or image, neversource), not the release lane, so insider and stable behave alike. A savedagent.kas_bundlealways wins, and the loaded field is only ever the saved value; the build's preference is applied per spawn (kas_routerule 1b, newacp/kas_build_default.py).REASON_BUILD_DEFAULT)kas_engine_ran), or a savedtrue--no-kas(cli.sh,install.sh)agent.kas_bundle: falseand skips the downloadThe engine choice moves from Settings → Developer → Feature previews to the KAS row of Settings → Agent Harness, as a two-way choice (Built-in harness / Kiro CLI). It reuses the shared
KiroSignInStrip/KiroSignInDialogfrom #36888 and #39373 for the sign-in prompt.Product-shape change (a changed default): the owner's sign-off is on #39611 (comment); no RFC is on main, so the First Principles lane may need an owner decision.
Backwards compatibility
Compatible: a saved
agent.kas_bundlekeeps its exact meaning; source checkouts keep today's routing; the loaded field still reads the saved value.Reader: src/kiro_crew/config/loader_document.py:acp_backend_bundle_route -- chat -- now answers only for a saved
true; a defaulted engine leaves a Kiro CLI pick on the v3 relay (test_kas_bundle_nightly_default.py::TestTheLoadedFieldIsOnlyTheSavedValue)Reader: src/kiro_crew/config/loader_builders.py:_resolved_kas_bundle -- chat -- returns the saved value, else
False; the build preference is per spawn (test_kas_bundle_nightly_default.py::TestTheLoadedFieldIsOnlyTheSavedValue::test_load_resolution)Reader: src/kiro_crew/build_channel.py:is_nightly_build -- release -- removed; no reader left on main (
git grep is_nightly_build), and the lane stamp stays baked and read (TestBakedBuildChannel)Reader: src/kiro_crew/config/loader_document.py:kas_bundle_build_default -- chat -- removed; its four callers (
loader.py,loader_builders.py,loader_pipeline.py,sections_agent.pyhelp) now read the saved value, and the build preference isacp/kas_build_default.kas_bundle_preferred_by_build(test_kas_bundle_nightly_default.py::TestAPackagedBuildPrefersTheEngine)Reader: website/src/pages/settings/FeaturePreviewsSection.tsx:KasBundleCard -- crew page -- the card moved to the KAS row of Agent Harness (
AgentBackendTab.detailCard.test.tsx,FeaturePreviewIntro.test.tsx); the all-settings deep link and search entry follow it (config_all_settings.py,settingsRegistry.gen.ts)Reader: cli.sh:--no-kas -- release -- now also saves the Kiro CLI choice (
test_installer_kas_default.py::test_cli_sh_no_kas_means_kiro_cli_only)Tests
test/test_kas_build_default_route.py(new): rule 1b holds only with nothing saved, a packaged build, an open route and a Kiro Crew sign-in; the sign-in-once prompt; a failed first switch runs that chat on kiro-cli and cools down; a host the engine ran on retries 3 times 5 s apart, then fails plainly, never moving to kiro-cli.test/test_kas_bundle_nightly_default.py: every packaged distribution prefers the engine, a source checkout does not, the lane does not decide, an unsupported host does not; the loaded field is only the saved value.test/test_kas_bundle_api.py:engine_choice,choice_saved,sign_in_moves_to_engine.test/test_installer_kas_default.py:--no-kassavesagent.kas_bundle false.KasBundleCard.test.tsx(two-way choice, build's pick unsaved),KiroSignInPrompt.test.tsx,AgentBackendTab.detailCard.test.tsx,FeaturePreviewIntro.test.tsx,previewSurfaces.test.tsx.Proof: not provable -- other: a feature PR with a new route rule, not a fix of an existing defect
Manual verification
Isolated gateways on this host with throwaway
HOMEandKIROCREW_HOME,_build_info.pystampedwheel, main vs head, shots below.Signed-in proofs, run on a fresh throwaway home (
gw7, real kiro-cli 3.5.0, company SSO for both sign-ins,KIRO_HOME=<data home>/kiro), code of head3f1dbc668f:GET /api/kas-bundlesaysengine_choice: kiro_cli,sign_in_moves_to_engine: true; the KAS row shows the reason line with Sign in and the chat shows Sign in to Kiro Crew once (6a; that chat's red row is this test home's missing agent files, fixed before 6b and fix(sandbox): bypass toolbox shim to fix nested sandbox failure on macOS 26 #7). After one Kiro Crew sign-in, a new chat logsKAS route: bundle (... this build's default), replies, and writeskas_engine_ran; the row shows Built-in harness ticked (6b).acp-server.jsreplaced withprocess.exit(1): a new chat logsdid not start on its first try, replies on kiro-cli, and shows the notice. This run found that a chat landing on a later spawn than the failed one showed no notice; head3f1dbc668ffixes it (the cooldown spawn carries the notice too, with a test).Real-machine verification
Machine: cloud desktop, Amazon Linux 2023, aarch64, 16 vCPU / 64 GB
Before (main 56c1969): isolated gateway, engine
acp-server.jsreplaced withprocess.exit(1), send "hello" -> rawprocess exited (rc=1) during initialize ..., one start per messageAfter (head 572ab43): same setup and message -> log shows
did not start (attempt 1 of 3),2 of 3,3 of 3, 5 s apart; chat showsKiro Crew's engine didn't start.with ResumeCleanup: own computer; test gateways and pods are stopped after the PR's last proof, throwaway homes under
~/kc-work/kas-insider/deleted thenScreenshots / video
All shots are full page, on a build stamped as a packaged wheel. Before: main
cbffcd8fcb(this PR's merge base after the last rebase). After: #1-#5 from head02c2944018(head701113614aonly fixes what the built-in choice saves for a Kiro CLI pick, no screen change; engine choice Built-in harness / Kiro CLI, the owner's labels, tick on the selected one; a Chats switch after a restart. line; a Sign in link on the line saying why the built-in harness is not in use yet; Sign in to Kiro Crew once on every signed-out chat prompt). The #6/#7 shots are from the signed-in test home on3f1dbc668f(chats) and91e1d28004(6b Settings, same labels as the head). In #5 the chat already holds earlier "hello" turns from repeated runs on the same throwaway home; the last row is this run.#1 Settings → Agent Harness, KAS row (Kiro Crew signed out, so the choice shows the engine chats really use)
Before:
After:
#2 Settings → Developer → Feature previews (the engine switch leaves this page)
Before:
After:
#3 Chat, kiro-cli store present, Kiro Crew signed out
Before:
After:
#4 Chat, kiro-cli signed out, Kiro Crew signed out
Before:
After:
#5 Chat, engine will not start (host already on the engine)
Before:
After:
#6a Chat, kiro-cli signed in, Kiro Crew signed out (the KAS row in this state is #1)
#6b After one Kiro Crew sign-in: new chat on the engine
#7 First switch fails: this chat on Kiro CLI with the notice
Wording (head 91e1d28): the engine options are Built-in harness / Kiro CLI (UX Review's fix), with a tick on the selected one. The chat prompt says Sign in to Kiro Crew once and does not name the engine (decision
2026-11-18-signed-out-sign-in-prompts-do-not-name-the-engine-route.md).Review answers
test_a_failed_preview_start_keeps_the_relay_for_its_cooldown);?highlight=agent.engineandkey:agent.kas_bundleopen the KAS detail (KasEngineDeepLink); pressing the shown, unsaved choice saves it.test_sign_in_surfaces_never_promise_kiro_cli_on_a_host_the_engine_ran_on).agent_sdk.kas_bundle._retry_wait).Related Issues
Closes #39611
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...); PR Hygiene does not count commitsContribution License Agreement
Contributed under the project's Apache-2.0 license.