Repository navigation
fix(onboarding): hold first run behind kiro sign-in when kas_bundle is on - #31793
dodgeblaster wants to merge 2 commits into
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: it adds one optional status field and a hold behind an existing switch, with a skip exit, and both are easy to undo. Notes
[DESIGN-REVIEWED] f14c98e Description read[DESCRIPTION-READ] 24d4d5bbbee2a49e98d517a9ebb48f87163da681ad66b26e9642e4e5903ebbc2 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 On nightly builds, where Notes
What this change shipsInventory (6 items) — 5 justifiedIntent: a new user on Kiro Crew's own KAS engine signs in before reaching a dashboard whose first chat would fail. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] f14c98e Description read[DESCRIPTION-READ] ba6a35135779ec78fe801f272e6fc16ab003ec30c7ab56a5b8c538e5704e8c77 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: |
|
Backend Tests (3.12, 7) is red on |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks. Screenshots 01 and 02 show "Skip for now" in its normal and disabled states, and the blind reader read it correctly ("the app opens without an account"). Notes
[UX-REVIEWED] f14c98e Description read[DESCRIPTION-READ] 435a8e1117654b1693bbed7c4a97366337e055e7b674fa0e5bde234afbe413f1 That sha256 names everything this verdict read: the PR description, plus the 10 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 |
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: |
96f0351 to
ab45acb
Compare
ab45acb to
85ae55a
Compare
|
Rebased: main moved in .github/workflows and test/test_pull_request_target_allowlist.py (the red-main fix #31803) since this head went green (ea5dedb -> e94281a); CI re-running. This also re-runs the five AI review lanes, which produced no verdict on ab45acb because the shared token hit GitHub's rate limit. |
|
self-added: yes
|
85ae55a to
28d8651
Compare
|
Backend Tests (3.12, 2) is red on test/test_security_gate_liveness.py::test_the_package_stays_within_its_line_budget (package grew to 34855 lines). That is main's red, not this PR's: this PR touches nothing under the security package, and #32183 (auto-merge on) raises the budget to main's measured size. Waiting for it to merge, then rebasing onto it. |
28d8651 to
64a0e4c
Compare
|
Rebased: main moved in test/test_security_gate_liveness.py (#32252 raised the security package line budget, superseding #32183) since this head went red on main's budget test (e30915e -> bab2387); CI re-running. Head 28d8651 -> 64a0e4c; the budget test, this PR's backend and frontend tests, tsc and eslint pass locally. |
64a0e4c to
f8164aa
Compare
|
@bolichen97 the exit you asked for is in 473805e: the held sign-in screen now has a "Skip for now" button that renders the app for that page load and counts as the admission, so the latch keeps it mounted. Covered by |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Thanks for adding the skip exit. The code looks sound, but one item blocks this head.
- Missing screenshots for the new exit (
website/src/components/KasLoginGate.tsx:601-609). This head adds aSkip for nowbutton to the full-screen sign-in chooser.KiroPrerequisiteGate.tsx:1263passesescapableon every hold, so a signed-out owner sees this button on every page load. The four screenshots in the body are dated Nov 6. They were taken before the button existed. As a result, the Design and UX lanes on c7016b3 both report "cannot evaluate" for this button. Their verdicts were recorded as PASS only because of formatting, so nobody has seen the new control rendered. Smallest fix: take screenshots on c7016b3 and attach them. Show the signed-out chooser withSkip for nowvisible, the button disabled while a sign-in request is in flight, and the dashboard after a skip. Then re-run the Design and UX lanes.
The earlier change request about the form having no skip action is also still open. Please reply in that thread and name the commit that adds the exit, so it can be re-reviewed on this head.
Optional:
- The description lags the diff. The KasLoginGate row and the test plan name an
openOnStatusErrorprop that is not in the code (the code shipsescapable). They also leave out the skip button, its two tests, and theshownUnheldlatch. A body edit fixes this. Please leave Goal, Why it matters and Not a goal unchanged. - The Backwards compatibility claim "kas_bundle off (the default)" is out of date. Since #34164, an undeclared
agent.kas_bundleis on by default for nightly builds. The hold also applies to every signed-out load, not only the first run. - The branch has three commits. The contributing rules allow at most two, so please squash the two follow-up fixes on the next push.
c7016b3 to
3c9d270
Compare
|
Addressed on 3c9d270: new screenshots of the Skip for now exit are in the description (chooser with the exit, the exit disabled while a sign-in request is in flight, the dashboard after a skip). The description's KasLoginGate row and test plan now name |
Code change approver recommendation: A person should decideWhy: the decider thinks the change is probably fine but estimates a 17% chance that this change introduces a defect, above the 12% limit for approving on its own. The PR adds a crew_sign_in status field. It is true only for the owner, and only when acp_backend is KAS and kas_bundle resolves on; a non-owner or an unreadable config gets false. All three owner routes build it through one shared helper. Every dashboard admission now goes through KasLoginGate with hold set from that field. I checked that every pass-through path keeps the dashboard in the same slot of the same wrapper, and that all hooks run before any early return, so it does not mount twice. The latches work as described: an admitted dashboard survives a later sign-out, and a dashboard opened with the hold off survives the switch turning on. The escape exits (Skip, unreadable status) are limited to the first-run gate, and the enterprise sign-in-only gate is unchanged in effect. With the hold off, the sign-in status query is disabled. The new backend and frontend tests cover each path. The every-page-load hold on nightly is disclosed and skippable, so it is a note, not a blocker. Tier: 2, held for a person: changes requested. 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 |
|
Follow-up on my change request for c7016b3. Every item from it is resolved on 3c9d270:
What this review checked on this head:
One step remains: @bolichen97's change request on e5161ec is still open. It asked for an exit that works without signing in. The "Skip for now" button in 473805e provides that exit, and a test covers it. Could you re-review on this head? Optional:
|
Withdrawn: every item in this review is fixed or answered on the current head (see the follow-up comment). Other holds on this PR are listed there.
Skip for now is disabled while a sign-in begin is in flight, so its answer cannot start a session nobody watches or drop a refusal's notice. A returning browser let in after a failed setup-status read now latches the unheld app, so a later poll that turns the hold on does not replace it. Two tests notify observers synchronously so a render from the first read cannot land after the second.
3c9d270 to
f14c98e
Compare
|
Follow-up on my earlier change request on c7016b3. Status of each item on this head:
What still holds this PR: @bolichen97's change request on e5161ec is still the latest review from that account. The exit it asked for is in this head. "Skip for now" works without a sign-in, counts as the admission for that page load, and keeps the app mounted. The test "lets the owner skip the sign-in, and keeps the dashboard open afterwards" covers it. Only a re-review from that account can clear it. One question for the maintainer to decide on that re-review. The hold has no first-run condition: Review result on this head: no blocking findings. The new backend test file passes at this head (9 items), and all 9 fail when the handler is reverted to its merge-base version. The owner-only field is false for a non-owner and for an unreadable config. One helper builds the status GET and both remedy POST answers. Every pass-through keeps the app in the same tree slot. Done well: each latch has a test that checks element identity across a later signed-out read, so a remount would fail the test. Optional:
|
Problem / Motivation
Goal: With Kiro Crew's own KAS engine switched on, a new user is held on Kiro sign-in at first run instead of landing in a dashboard whose first chat fails.
With
agent.acp_backend: "kas"andagent.kas_bundle: trueon a fresh data home, first-run setup opens the dashboard without anyone signed in to Kiro Crew. The first chat then fails with "Your session has expired. KAS runs on Kiro Crew's own engine (agent.kas_bundle is on). Not signed in to Kiro. Sign in from Settings → Agent Harness → Kiro sign-in…" — to someone who never signed in. Reproduced on an isolated pod built from main.Why it matters
On that route Kiro Crew's own sign-in is the only credential a KAS session can use, so every new user on it hits a failed first chat and a misleading "expired" message before they find the sign-in card in Settings. This is the first step of the first-run sign-in work (no kiro-cli in onboarding).
Not a goal
agent.kas_bundleis off, including hosts where KAS takes the bundle route automatically because no working kiro-cli runs there: those keep the kiro-cli install and login steps exactly as today.agent.kas_bundle's default.What changed (motivation → approach → change)
Symptom → cause → change: the first-run gate admits KAS on kiro-cli facts only and never asks whether Kiro Crew holds a sign-in, so the bundle route reached the dashboard signed out. The fix holds the existing full-screen Kiro sign-in in front of the dashboard on that route, and only there.
GET /api/kiro-prerequisite(dashboard/handlers/kiro_prerequisite.py)crew_sign_infield: true exactly whenagent.acp_backendis KAS andagent.kas_bundleis on, read from config. False for a non-owner and for an unreadable config, so it can never lock the dashboard. The owner'srepair-specsandupdate-clianswers carry it too, through one shared payload helper, since the gate caches them as the status.KiroPrerequisiteGateKasLoginGatewithhold={crew_sign_in}. Once the dashboard has opened with the hold off, turning the switch on later in that page load does not hold it, so it is not swapped for the sign-in screen with unsaved work in it; the hold applies from the next load. A failed setup-status read that lets a returning browser in counts as such an opening too (shownUnheld).KasLoginGateholdprop. Off, it renders its children straight through and reads no sign-in status. It stays mounted either way, so the dashboard keeps its place in the tree and is not mounted a second time when the status arrives. The hold lasts until the first admission: a later read reporting signed out (a sign-out in another tab or from the CLI) leaves the dashboard and its unsaved work mounted. Newescapableprop, set only by the first-run hold, gives two exits that need no sign-in so the owner can still reach Settings to switch the engine off: a "Skip for now" button on the signed-out chooser (disabled while a sign-in request is in flight), and opening the app when the sign-in status cannot be read. Either counts as the admission, so the latch keeps the app mounted. The LTS sign-in-only gate leaves it off and keeps its error screen.useKasLoginFlowtakesenabled, so with the hold off no sign-in status is read.components.kasLogin.skip_for_nowapi/client/onboarding.tscrew_sign_infield on the status type.kas-auth.mdKeying on the switch rather than on "the vault owns the sign-in" follows the maintainer's ask that both first-run experiences sit behind
agent.kas_bundle: off means kiro-cli's experience, whatever route the host takes.Backwards compatibility
Compatible: with
agent.kas_bundleoff the gate admits exactly as on main. Since #34164 an undeclaredagent.kas_bundleis on in nightly builds, so there the hold applies to every signed-out page load, not only the first run, and "Skip for now" is the way past it, and the new status field is optional, so an older dashboard ignores it and an older gateway's missing field reads as off.Removes nothing: the diff adds a status field, a component prop and a hold that applies only with the switch on.
Tests
test/test_kiro_prerequisite_crew_sign_in.py(new): the field follows the switch for the owner (on, off, and on with a non-KAS backend), ignores what the vault says, is false for a non-owner, and is false when the config cannot be read; therepair-specsandupdate-clianswers carry it with the switch on and off (all 4 fail with those routes' old payload).website/src/test/KiroPrerequisiteGate.crewSignIn.test.tsx(new): signed out with the switch on, the sign-in screen shows and the dashboard does not; signed in, the dashboard opens and the element rendered before the status loaded is the same one afterwards (no second mount); once admitted, a later signed-out read keeps that same element mounted and shows no chooser (fails with the latch removed); opened with the switch off, a later status turning it on keeps that same element mounted and reads no sign-in status (fails with the hold-off latch removed); after a spec repair whose answer has the switch on, the sign-in screen still shows (fails when that answer omits the field); a sign-in status read that fails opens the dashboard and a later signed-out read keeps it (fails withoutescapable); "Skip for now" opens the dashboard and a later signed-out read keeps it; the skip is disabled while a sign-in request is in flight; a returning browser let in after a failed setup-status read stays mounted when a later status turns the hold on (fails with the oldshownUnheldcondition); switch off and non-owner, the dashboard opens and no sign-in status is read.test_kiro_prerequisite*.pyfile.--sequence.shuffle.Proof: not provable -- other: prove.py's throwaway worktree errors at collection from this venv; reverting the handler to origin/main by hand fails 5 of 6 new backend tests, and disabling the hold fails both frontend sign-in tests
Manual verification
On an isolated pod from this branch (fresh data home,
agent.acp_backend: "kas",agent.kas_bundle: true):agent.kas_bundleswitched off and the pod restarted, signed out of Kiro Crew: no sign-in screen; the dashboard opens and chat runs through kiro-cli, as on main.Screenshots / video
The "Skip for now" exit on 3c9d270, rendered from the real gate through the
capture/setup-check-probe-error.htmlharness with fixture API answers (KAS,kas_bundleon, signed out): the chooser with the exit, the exit disabled while a Google sign-in request is in flight, and the dashboard after skipping.Earlier captures (Nov 6, before the exit existed):




Related Issues
Part of #21843
Sibling sweep
Swept: git grep -n "return <>{children}" -- website/src/components/KiroPrerequisiteGate.tsx
Siblings: none -- every dashboard admission in the gate goes through its one app() helper, which the enterprise relock path now uses too
Pattern harvest
Not generalizable: the gate's KAS admission rule predates the bundle route and asked only kiro-cli facts; the fix is specific to where first run admits KAS.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)