Repository navigation
feat(pod): a pod's bundled KAS engine can use the host's Crew sign-in - #43525
iamwhatever wants to merge 1 commit into
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the preview is off by default, the host checks the pod's process identity rather than a secret, no refresh token leaves the host, and the patch removes nothing. Notes
[DESIGN-REVIEWED] e98eea5 Description read[DESCRIPTION-READ] a06651fc48d9c58d4c79b33ae5dcffcd6a5da8d9650bce1ff5bd2e3e53d33af9 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) — 🔴 BLOCKUX-level review of UX-Verdict: BLOCK The blind reader would not turn on the new switch. They did not know what "Dev Fleet" is, and the only definition is hidden in the ⓘ tooltip. BlockersThe new switch names an app the row never explains Notes
[UX-REVIEWED] e98eea5 Description read[DESCRIPTION-READ] 02e7decbe9f14e2e3aaac6c633363b5917cbbe3a2806bfaead67b4dd2cf3f7cf That sha256 names everything this verdict read: the PR description, plus the 4 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 The feature stays behind a preview that is off by default and always off on LTS, so nobody gets it without opting in. One part is heavier than the goal needs: the 60-second lend cache in the readiness check. Notes
What this change shipsInventory (8 items) — 7 justifiedIntent: let a test pod's bundled KAS engine run chats on the host's Crew sign-in without a separate sign-in in the pod. This is an ADDITION.
[FIRST-PRINCIPLES-REVIEWED] e98eea5 Description read[DESCRIPTION-READ] a887763320c5fd431094c01e9ff999d82855fbb8b60ace2b8a634c4abf9c1d7f 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: |
9ec1ffa to
b98d587
Compare
self-added: no |
self-added: no |
self-added: yes |
b98d587 to
fdeb21e
Compare
self-added: yes |
self-added: no |
self-added: yes |
fdeb21e to
23fcbff
Compare
self-added: yes |
self-added: yes |
23fcbff to
aaed717
Compare
* feat: grant the pod host sign-in routes Declare /api/pods/host-sign-in/* in permissions.api, matching the Kiro Crew built-in's manifest (kirodotdev/KiroCrew#43525). The routes let a test pod's own gateway borrow the host's Kiro Crew sign-in; the host gateway answers them only while its pod_host_sign_in preview is on and only to the named pod's gateway process, and reads this entry as the owner's grant. * test: match the pod-e2e skill's fixture to the file since 969ae54 969ae54 added a line to skills/pod-e2e/SKILL.md (the same change KiroCrew's built-in got in #37740) without updating tests/fixtures/builtin-skills.sha256, so test_bundled_skills_are_the_builtins_byte_for_byte has failed on main since then. The fixture row now carries the file's current digest; the skill itself is unchanged. --------- Co-authored-by: zejiangg <zejiangg@amazon.com>
27a2903 to
dac48e3
Compare
|
/ai-review override ux dac48e3 The UX finding is about one settings-page line for a feature behind a default-off preview. The line has been revised 11 times; each round's ask conflicts with the GPT wording rules or with an earlier UX round (conflicts listed in the PR comment). GPT, Opus, Design and First Principles all pass on this head. |
|
AI-review override not recorded: the command shape is not recognised. Use |
|
Reviewed the head One blocker before I approve: Real-machine run is needed. The description says
A DevSpace or your own cloud desktop with a Dev Fleet pod is enough. Everything else is non-blocking. AI-assisted review by Bolin Review bot |
Code change approver deep review: Changes still requestedThis follow-up read the description as edited on 12-05, on head Earlier item 1, the real-machine run of the lending path: still stands. Thank you for running it and for reporting the result plainly. The new What is still needed in the description (no code change, unless the run fails):
I checked your explanation of the failed runs against the code and it fits. The pod unit's own boot calls Two things for the maintainer who decides:
One AI review lane was running again when this review read the head. Its result is not part of this review. Optional:
The change request on this commit stays until a new commit or a reply answers these items; a maintainer can still decide. Tier: 2, held for a person: changes requested by the deep review. A deep review by the code change approver, not by a person · commit |
self-added: yes |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
A non-blocking note on the new grant row in the Dev Fleet app.json, "/api/pods/host-sign-in/*".
Today that prefix reaches exactly two routes, POST /api/pods/host-sign-in/token and POST /api/pods/host-sign-in/refused. Both are internal paths gated on the core route grant holder, so nothing else is reachable through it right now. The open end is the namespace itself: any route added under /api/pods/host-sign-in/ later would be covered by grants owners have already approved, with no fresh consent, and /token hands an access token to the grant holder.
Either of these would close that without changing behaviour today:
- list the two routes as exact rows instead of the
/*prefix, or - add a pin test asserting the namespace holds exactly those two routes, so a third one fails CI and forces a fresh consent decision.
This does not block the PR.
|
/ai-review override ux 3bc7312 owner-decision: The UX finding is about one settings-page line for a feature behind a default-off preview. The line has been revised 11 times; each round's ask conflicts with the GPT wording rules or with an earlier UX round (conflicts listed in the PR comment). The same text passed UX on head 5d14163. |
|
AI-review override not recorded: class |
|
/ai-review override ux 3bc7312 owner-decision: Owner decision: #43525 (comment) lists the conflicts. The UX finding is one settings-page line for a feature behind a default-off preview, revised 11 times; each round conflicts with the GPT wording rules or an earlier UX round. The same text passed UX on head 5d14163. |
Human judgment recorded@iamwhatever recorded a owner-decision release (class
This decision applies only to this commit. A new push requires a new judgment. |
|
Re-checked the new head AI-assisted, sent by Bolin Review bot |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Changes requested by the code change approver's deep review, not by a person.
The review found no code defect on head 3bc7312739, and PR Readiness is green. One thing is missing before this can be approved: the real-machine run a maintainer asked for on this head. No code change is needed.
- Real-machine run of the lending path (description,
## Real-machine verification;pod/runtime.py:1551in thekiro_crewpackage). The section says N/A, and "Manual verification" says the end-to-end run with a real host sign-in was not done. The diff runs code at every pod start (pod_host_sign_in.apply_to_pod_env), adds two host routes that return the host's access token, and lets them pass token auth while the preview is on. The tests patch the parts a real run would prove:test/test_pod_host_sign_in.py:140-147patches the preview, the app grant and the pod unit's main pid, and line 156 mounts the handlers with no token-auth middleware. A maintainer asked for this run on 12-02 and again on this head on 12-04. Please run it on a host gateway built from this branch, with a Kiro Crew sign-in, and paste the commands and outputs into the section:- Before (main): start a Dev Fleet pod and show its bundled KAS engine is not signed in.
- After (this head, preview on): the same pod start, the engine signs in through the host, and one model call succeeds.
- Negative: with the preview off, the pod gets nothing. Also show whether a lent token still works after the pod stops, or state how long it stays valid.
- The cleanup line.
What is done well: every refusal in the host handler fails closed, the answer carries no refresh token, and each decision goes to the Security Event Log.
Optional:
apps/builtins/dev_fleet/app.json:41grants the prefix/api/pods/host-sign-in/*, while its neighbours are exact entries. Listing the two routes exactly, or adding a test that pins the namespace to these two routes, keeps a later route from inheriting the grant. An earlier review note on this has no reply.acp/kas_route.py:236treats a pod as signed in whenever it holds the host socket. If the host has no sign-in it can lend (signed in only through kiro-cli, or a company sign-in), the pod may move to the bundled engine and then be refused. Couldhost_socket_for_podalso check that the host holds a lendable sign-in? If the current behaviour is intended, please say so in the description.- Several refusal checks in
dashboard/handlers/pod_host_sign_in.pyhave no negative test that I could find: a gateway that is itself a pod (line 144), the agent-socket and peer-credential refusals (lines 98-101), the start-id read before and after (lines 116, 130), and a namespace result ofNone(lines 133, 135). One test per line would keep a later edit from dropping a refusal unnoticed.
This block is withdrawn automatically when a new commit fixes these items or a reply shows one is wrong: the approver reviews it again. Any maintainer can dismiss this review at any time.
Tier: 2, held for a person: 52 files, more than 20.
Commit 3bc7312739 · 1862 changed lines.
|
Re-checked the new head
The earlier request still stands: the Real-machine verification section needs a before and after run on a real machine. Thanks! |
Problem / Motivation
Goal: A test pod whose KAS runs on Kiro Crew's own engine can sign in with the host's Kiro Crew sign-in, without a separate sign-in inside the pod and without the pod ever holding a refresh token.
A pod has its own data home, so its Crew vault starts empty. The bundled KAS route only takes Kiro Crew's own sign-in, so every new pod on that route needs its own
kirocrew kas loginwith that pod'sKIROCREW_HOMEbefore it can run a chat. That blocks automated pod testing of the bundle route.Why it matters
Pods are how changes are tested end to end before they ship, and more of them now run the bundle route. A sign-in per pod means a person has to act before every automated test run. Lending short-lived access tokens from the host removes that step and keeps the long-lived credential on the host.
Not a goal
_stage_runtime_auth_storestays, because that route still reads kiro-cli's own store.pod up/pod down, the Dev Fleet pod tools or the sign-in hints.What changed (motivation → approach → change)
Approach: the host recognises the pod by its process, not a secret, so nothing is written into the pod.
Preview
pod_host_sign_in("Let Dev Fleet test machines use this computer's sign-in", under Publishing and Sign-in), default off, off on LTS (edition_locks.preview_on):src/kiro_crew/config/sections_dashboard.py, the row inwebsite/src/pages/settings/FeaturePreviewsSection.tsx,website/src/utils/previewFlags.ts, strings inwebsite/src/i18n/locales/(13 locales,en-XAregenerated), search words inwebsite/src/components/commandPalette/settingsKeywords.tswithsettingsRegistry.gen.tsregenerated, plus the regeneratedconfig-baseline.json, settings registry, find_ui index,configuration.mdand a row indocs/feature-map/README.md.Host routes (
dashboard/handlers/pod_host_sign_in.py):POST /api/pods/host-sign-in/tokenandPOST /api/pods/host-sign-in/refused. Token auth lets them through only while the preview is on (token_auth_paths._exact_method_bypass, the same shape as the connector socket). Each request is then checked, fail closed:apps.core_route_grants.core_route_grant, app-agnostic);SO_PEERCREDpid is the named pod unit'sMainPID(the unitexecs the pod gateway), stable across the check, and it shares the host gateway's namespaces on Linux or runs unsandboxed on macOS, so a sandboxed shell inside the pod is refused and a stopped pod has no main process;dashboard/create_rate_limit.py, 30 per 5-minute window).Every decision is audited. The answer comes from the host's Crew vault only (
answer_from_vault, via the newsrc/kiro_crew/agent_sdk/kas_vault_answer.pyseam), never a workload identity, kiro-cli's sign-in or an API key, and is cut toaccessToken,expiresAt,profileArn,provider,authMethod. No refresh token, client secret or other field leaves; renewal stays on the host. A company (edition) sign-in on the host is never lent: 403host_sign_in_not_lendable, the same refusal a local agent gets (stored_sign_in_registered). No host sign-in: 409host_not_signed_in, shown in the pod as "runkirocrew kas loginon the host"./refusedanswerssign_in_refusedfor a lent token.Pod side (
src/kiro_crew/pod_host_sign_in.py):active()is true in a pod given the host socket inKIROCREW_POD_HOST_SIGN_IN_SOCKET; it posts over that unix socket only and refuses a listener that is not this user.Bundle-route readiness and models. With an empty pod vault and the host socket,
kas_crew_signin_readyinsrc/kiro_crew/dashboard/kiro_readiness.pyasks the host for a token instead of refusing,_vault_signed_ininsrc/kiro_crew/dashboard/handlers/models_kas_bundle.pycounts the borrowed sign-in, andvault_identityinsrc/kiro_crew/agent_sdk/kas_model_catalog.pykeys the model catalog by the host socket.Bundle only. In
src/kiro_crew/acp/kas_host_auth.py,answer_get_access_tokenandsign_in_refusedask the host only for a bundle engine whose pod vault is empty; the pod's own sign-in wins.src/kiro_crew/acp/harness/kas.pyandsrc/kiro_crew/acp/runtime_session_load.pypassbundlefrom the runtime's spawn route._crew_holds_usable_sign_ininsrc/kiro_crew/acp/kas_route.pycounts the lent sign-in, as it counts a workload identity, so the bundle route can be chosen; the relay shortcut increw_sign_in_starts_spawnandvault_holds_identitystay vault-only.Wiring.
kirocrew pod up(src/kiro_crew/pod/cli.py) records the host's data home asHOST_HOMEin the pod's env file (pod_host_sign_in.host_home_for_pod; empty whenpod upruns inside a pod). The pod unit boots with a clean environment, so the boot (src/kiro_crew/pod/runtime_boot.py) passes that value tobuild_pod_envinsrc/kiro_crew/pod/runtime.py, which callspod_host_sign_in.apply_to_pod_env. It drops any inheritedKIROCREW_POD_HOST_SIGN_IN_SOCKETand sets it to the host gateway's dashboard socket only while the preview is on and Dev Fleet holds the grant in that recorded home (read underconfig.paths.run_with_data_home, without the loader's write-back, so a pod boot never rewrites the host'sconfig.json). No recorded home gives no socket, so a pod started before this change borrows nothing until its nextpod up.pod_context(used bypod exec) drops it again, so only the pod's gateway, the process the host answers, is given the socket.src/kiro_crew/apps/builtins/dev_fleet/app.jsondeclares/api/pods/host-sign-in/*inpermissions.api, the grant step 3 reads, so the routes answer only while the owner has Dev Fleet enabled.Adopted hosts
On a host whose Dev Fleet record was adopted from its own repository, the grant is read from that repository's
app.json, not from the wheel copy this PR edits. KiroCrewCaptain/kirocrew-app-dev-fleet#15 added/api/pods/host-sign-in/*there, but this PR does not change the Dev Fleet pin insrc/kiro_crew/apps/adoption-pins.json.So a host that adopted the external Dev Fleet gets 403
app_not_enabledon the host sign-in route until a separate re-pin PR lands. That re-pin waits until the app repository and this repository's wheel copy match again:mainmoved the live-target cutover into core (#45591), and the app made its own change there, so neither side carries the other's today. The re-pin is a follow-up, not part of this PR. Until then the feature stays behind the default-offpod_host_sign_inpreview, and a host on the built-in Dev Fleet works as described above.App repo: KiroCrewCaptain/kirocrew-app-dev-fleet#15
Backwards compatibility
Compatible: with the preview off (the default, and always on LTS) the two routes meet the ordinary token gate and answer 404, no pod is given the socket, and every sign-in path behaves as on main. The new
bundlekeyword defaults toFalse.Removes nothing: the change adds two routes, a preview and a branch taken only in a pod given the host socket.
Tests
test/test_pod_host_sign_in.pyruns the host routes on a real unix socket and dials them with the pod's own client, so peer credentials are the kernel's; only the pod unit'sMainPIDand the app grant are patched.launchctlfailing): all refused with a code. The rate limit answers 429. Each lend is audited without the token.kirocrew kas login; an ambientKIRO_API_KEYis never lent./api/modelssees the borrowed sign-in; the catalog is keyed by it only when the pod vault is empty.vault_holds_identitystays false;/refusedgoes to the host for a bundle only; the harness passes its spawn route.Mutation check: 18 mutants (each check above removed or loosened, the key list widened or narrowed) all fail at least one of these tests.
build_pod_envapplies it. A host on its ownKIROCREW_HOMElends:pod uprecords that home, and a boot whose own data home has the preview off still gets the host socket from it and leaves the host'sconfig.jsonbyte-identical; an empty or relative home gives none; a pod records no home for its own pods; the boot hands the env file'sHOST_HOMEtobuild_pod_env;pod upwrites it. These failed on3bc731273929and pass now.Determinism: 5 runs with
-n 2, one with-n 0, and one in reversed order with-n 0: 33 passed each time (before this round's readiness, models and catalog tests; the file now has 50). The shared limiter's buckets are reset around every test by the suite's existing fixture.Dev Fleet's permission parity data (
test/test_dev_fleet_permission_parity.py) lists the new grant. Updated fakes intest_kas_spawn.py,test_acp_harness_contract.pyandtest_acp_harness_wire_parity.pyto take the new keyword. Related tests run with-n 2.Manual verification
Feature Previews page in a pod of this branch: the new row renders under Publishing and Sign-in, after "MCP sign-in by Kiro Crew", off, its summary saying that test machines from the Dev Fleet app sign in as you so you don't sign in on each one, that their chats count against your plan, and that your long-term sign-in stays on this computer; its hint saying what Dev Fleet is, that machines on the Kiro CLI or with their own sign-in sign in as before, that a company sign-in is never used, and what Off does.
End-to-end with a real host sign-in was not run: this host has no Kiro Crew sign-in, and the live gateway runs main, which has no host routes.
Real-machine verification
Partial. The full lend (host signed in -> pod borrows -> bundle chat answers) was not observed. What was run, on
dev-dsk(AL2023, Linux 6.12, x86_64), head3bc731273929, 2026-12-05:pr43525-t1on this branch, previewpod_host_sign_inon, Dev Fleet enabled (builtin),agent.kas_bundleonGET /api/kas-login->authenticated: true, provider: Enterprise, usable: true; a bundle chat on T1 itself answeredpod_uptool),agent.kas_bundleonGET /api/kas-login->authenticated: false; bundle chat ->Error: KAS runs on Kiro Crew's own engine (agent.kas_bundle is on). Not signed in to Kiro. ...; T1's Security Event Log has nopod.host_sign_in.*rowpod_host_sign_in_offwhen the gateway is itself a pod,dashboard/handlers/pod_host_sign_in.py:144.)/api/pods/host-sign-in/*in its grant recordkirocrew pod up(seedagent.kas_bundle: true)/api/models->kas_bundle_sign_in_required; bundle chat -> the same "Not signed in to Kiro" error; H's Security Event Log has nopod.host_sign_in.*row, so no request reached HWhy neither run lent: the socket is chosen by
apply_to_pod_envinsidebuild_pod_env, which runs in the pod unit's ownkirocrew pod _run(pod/runtime_boot.py:700). systemd starts that process with a clean environment, and neither the template unit nor the per-pod drop-in pinsKIROCREW_HOME, so it reads the default data home~/.kiro/crew. There the preview is off (that config has nopod_host_sign_in), sohost_socket_for_podreturnsNoneand the pod is never pointed at H's (or T1's) socket. The provider (Enterprise) and the company-sign-in rule were never reached: no request arrived at either host. So a test host on a customKIROCREW_HOMEcannot be the lender. A host on the default data home, the normal case, reads its own config. The same fact meansapply_to_pod_envis not "host side" as its docstring says: it runs under the pod worktree's code and always follows the default data home. The host still checks every request (pod unit main pid, grant, preview), so this was not a bypass, but a host gateway on a non-defaultKIROCREW_HOMEsilently never lent.pod upnow records the host's data home for the boot (see Wiring), and the rerun below uses a host on its own data home.Rerun on the fixed head: pending.
Cleanup: both pods down (data reclaimed), test gateway H stopped, its data home and both worktrees removed. The owner's gateway and data home were not touched.
Screenshots / video
Settings > Developer > Feature previews, with the new "Let Dev Fleet test machines use this computer's sign-in" row (off) under Publishing and Sign-in:
Residual risk
Related Issues
Part of #9211