Repository navigation
feat(dashboard): host an agent-written dashboard page and let it subscribe (#19060) - #19335
Conversation
b5f6ff9 to
b13fd05
Compare
b13fd05 to
1188667
Compare
17b8859 to
61eaa99
Compare
Sensitive Change ReviewSensitive files changed:
|
GPT 6.1 Review — ✅ human override acceptedHuman judgment by @chenmingwei23 overrides the GPT 6.1 finding for [GPT-OVERRIDE] f4cde7b This comment is updated in place on each push. The model was not re-run because an authorized human decision supersedes it. False positive or not applicable? A repository writer can comment: |
UX Review (Opus 5.5) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS The dispatch-tree gallery page uses words the blind reader didn't know, and the faded "Try again" looks the same whether it is retrying or turned off. Watch
Suggestions
[UX-REVIEWED] f4cde7b Description read[DESCRIPTION-READ] 7d9e8727e614441071281133f72872fd1a83c48d0eb08d7b7fa30381cc6eab19 That sha256 names everything this verdict read: the PR description, plus the 8 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 |
Design Review (Opus 5.5) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS The new store-level dashboard fence rejects Watch
[DESIGN-REVIEWED] f4cde7b Description read[DESCRIPTION-READ] 1953b4ddb09555931e2ff4bb203108e186d67cf781461a676f8e5cf8b66b461b 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 |
1188667 to
c4eb5a8
Compare
First Principles Review (Opus 5.5) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS The fold name Not justified as shipped
What this change shipsInventory (10 items) — 9 justifiedIntent: an owner agent writes its own crewmate dashboard page, and readers see it update live. ADDITION.
[FIRST-PRINCIPLES-REVIEWED] f4cde7b Description read[DESCRIPTION-READ] 3309059fd69bef1a338cc81bf5d5419581395df4875f31bc27123d6cdbc40e5c That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Review detailsThe bound-package route returns a 409 error for any package that uses the older FINDING — src/kiro_crew/dashboard/handlers/member_dashboard_fields.py:499 — a crewmate bound to a package with a blocks-only view ( [OPUS-REVIEWED] f4cde7b Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
c4eb5a8 to
b29a25a
Compare
b29a25a to
6eb2109
Compare
61eaa99 to
a31c23c
Compare
Sensitive change review
|
a31c23c to
a05850c
Compare
Sensitive change review
|
a05850c to
1ff28a3
Compare
Sensitive change review
|
Sensitive change review
|
Sensitive change review
|
Sensitive change review
|
Sensitive change review
|
|
/ai-review override gpt 37129cc: Not a new exposure. main already returns this exact unredacted message at artifacts.py:1272; this PR adds a second copy of it for the snapshot path. The slug in the 409 is the one the caller put in its own request URL, and the route is owner-gated (handlers/artifacts.py:2178), so the only reader is the owner who sent it. Adjudication flagged it as an edge case for the same reason. Redacting both copies, including main's, is a one-line follow-up PR. |
Human judgment recorded@chenmingwei23 marked the gpt AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
Sensitive change review
|
Sensitive change review
|
Sensitive change review
|
Sensitive change review
|
Sensitive change review
|
Sensitive change review
|
Sensitive change review
|
Sensitive change review
|
Sensitive change review
|
Sensitive change review
|
buluoray
left a comment
There was a problem hiding this comment.
Verdict: REQUEST CHANGES — head ccb012a1cc
What it fixes
A crewmate's Dashboard tab can now render a kind="dashboard" package whose view.html the owner agent wrote. The page can also call window.kirocrew.subscribe(name, cb) and redraw from pushed field patches, without reloading. This is the render half of the RFC's decision 3. It serves only a version a person cut, and nothing when no such version exists.
What I verified
- Sandbox: the frame gets
allow-scriptsalone, with noallow-same-origin(website/src/pages/members/CrewDynamicDashboard.tsx:41). It gets an empty sandbox when the server withholds scripts. The frame is keyed on the grant, so revoking scripts remounts it (:948). - CSP:
connect-src 'none',frame-src,form-actionandbase-uriare all'none'(src/kiro_crew/dashboard_frame.py:108-120). - postMessage: the parent drops any message whose
event.sourceis not this frame's window (CrewDynamicDashboard.tsx:343), and the page's own listener requiresevent.source === parent(dashboard_frame.py:445). - Scope: field frames go to the owner only (
ws_event_scope.py,dashboard_fields). Values come only from the model's manifest, rooted at the crewmate's own slot, and are redacted in one place (member_dashboard_fields.py:288-298). The refetch route is owner-gated. - Scripts are withheld unless both the policy and the active profile leave egress unrestricted. Any failure to read either withholds them (
member_dashboard.py:993-1085). - The approval marker requires
by == "user"together with aneditedorrevertedevent (member_dashboard.py:1191,1262-1275). That actor exists only for snapshot writes (artifacts.py:1558-1586). - 581 Python and 36 frontend tests pass on this head. Each of three mutations turned a named test red:
- dropping the
bycheck reddenedtest_an_agent_cannot_spell_its_way_to_an_applied_version; - dropping the absent-token refusal reddened
test_an_absent_token_cannot_flip_the_kind; - letting a restricting profile grant scripts reddened
test_an_open_policy_with_a_restricting_profile_gets_NO_scripts.
- dropping the
- Default users: a crewmate with no binding or with a template is served exactly what it got before. The RFC's second amendment removed the Feature Preview, so no flag is required.
Blocking
-
The owning spec is stale.
docs/system-specs/modules/artifacts.md§ Dashboard packages still says "Two rules differ from every other kind". This PR adds three more, and none of them is documented:- every write to a record of this kind needs a snapshot token;
- the bound-owner write gate, including the new refusal for APP tokens;
- the
view.htmlshape.
Please document all three in that section.
-
The RFC says only the save module's
applycuts a live version. This PR defines "applied" as "a version a person cut". That makes a person's save in the artifact editor an approval. It also means #18851'sdashboard_applywill never render: it is an agent call over MCP, so its version is recorded asby=agent. Please add an amendment to the RFC that states the marker, and howapplyis meant to produce it.
Non-blocking follow-ups
- Merge order. The RFC allows the renderer to land first, and #18851 at
d170224efdstill refuses a package apply. #18851 has to adopt this PR's approval marker before it lifts that refusal. publish_sync.pull_upstreamnow fails on a dashboard record with a generic "write-back failed" (the Design lane flagged this). That is fail-closed. A specific refusal would be clearer.- With scripts withheld, the validator does not refuse
<meta http-equiv="refresh">or a full-page link. Either one lets a page navigate somewhere off the egress ceiling. Consider refusing both in the validator. - The probe frame's
readylistener does not checkevent.source. This predates the PR. - iamwhatever's CHANGES_REQUESTED on
37129cc459had an empty body and no inline comments. The PR author dismissed it without a message. Please ask the reviewer to re-review rather than leaving it dismissed.
Not verified
- No real browser run: the meta-refresh behaviour in a sandboxed frame and the CDN-script path were not exercised.
- I ran no publish or deploy suites.
|
@buluoray thanks for the thorough review and the mutation checks. Blocker 1 (artifacts.md is stale): agreed. The next push documents all three rules in the Dashboard packages section (snapshot token on every write, the bound-owner write gate with the APP token refusal, and the view.html shape). That push is needed anyway, since this PR now conflicts with main. Blocker 2 (the RFC amendment for the approval marker): I would like to move this to the change that actually lets an apply go live, for three reasons:
So the plan is: this PR ships the renderer with the conservative marker, #18851 ships staging with apply still refused, and a third PR lifts the refusal, with the RFC amendment as its first commit. I will open the tracking issue for that third PR and link it here. Does that work for you? |
…cribe (#19060) A `kind=dashboard` package can carry one `view.html` its owner wrote instead of the block list, and the frame gains `window.kirocrew.subscribe(name, cb)` so a page redraws from the field that moved rather than re-reading everything and losing its own state. It also carries the tree READ path (`read_tree_projection`, `fold_tree_checkpoint`, `tree_fold_units`), which moved here from #18777 so it sits beside its only caller, `member_dashboard_fields.LivePage`. That reader is why the worktree fold's binding is admitted here too. The tree key kind joins `manifest.FOLD_NAMES` -- the set the save gate accepts a block's `source.fold` from -- in the same change that brings something able to resolve the value, which is the pairing #18777 deferred. The catalogue's `advertised` flag is derived from that same gate set, so it turns over on regeneration rather than being edited: the catalogue cannot offer a binding the gate would refuse, or withhold one it would accept.
|
/ai-review override gpt f4cde7b: No new reach. A page script runs only when the owner agent's egress is unrestricted (member_dashboard.py:1531, fails closed). The field the older tab could receive is one the same agent declared in a version a person already applied, and refetch is owner-gated so it reaches only the owner's own browser (:1599). Adjudication flagged it for the same reason. Binding refetch to the displayed layout version is a follow-up. |
Sensitive change review
|
Human judgment recorded@chenmingwei23 marked the gpt AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
Problem / Motivation
Goal: A crewmate's owner agent can write its own dashboard page, and a reader watching that page sees its numbers move as the work moves instead of a snapshot from whenever the tab opened.
A crewmate's Dashboard tab can only show a page that SHIPPED with the product. An owner agent wanting to draw something the shipped templates do not cover -- a dispatch tree, a chart, a scene -- has no way to put it on screen, and the shipped pages refresh by re-reading the whole record, which throws away whatever state the page had built (a scroll position, an animation, a 3D camera).
Why it matters
A crewmate's report is the one surface its owner reads to know what the crew is doing. Restricting it to shipped templates means every new thing worth reporting waits for a product release. And a report that silently stops being current is worse than one that costs a read: the reader cannot tell "nothing moved" from "nothing arrived".
Not a goal
<noscript>.What changed (motivation -> approach -> change)
A
kind=dashboardpackage can carry oneview.htmlits owner wrote instead of the block list. The frame gainswindow.kirocrew.subscribe(name, cb), firing on load and on every push carrying that field, so a page redraws from the field that moved rather than re-reading everything -- which is what keeps its own state.The model is the allowlist throughout:
subscribed_fieldsreads it, the save gate refuses an undeclared binding, the controller resolves every value through it, and a frame carries only fields whose value changed. A write is refused unless the caller is the bound owner, on all three save paths; an APP caller is refused outright. A field NAME travels further than its value, so validation runs each through the same redaction shim. A preview resolves no binding, so it cannot serve the LIVE package page to someone deciding on a staged one. The stale-values Retry repeats the read that failed.A dashboard package is never written against a snapshot that has moved on, and the store is what says so. One rule, stated on the record its own lock loaded: a record whose CURRENT kind is
dashboardis never written without a matching snapshot token, and an ABSENT token is a refusal. The handler classifies nothing; it names the read it authorized against for every write it makes (snapshot_token) andupdatedecides. Scoping this in the handler instead is what kept the hole open across three rounds -- an event type it did not count, then a content-lesskindPATCH, then a read that found prose or nothing and so sent no token at all, which rewrote both the kind and the bytes of whatever the slug held by then. A time-of-check guard in the caller cannot close a time-of-use hole in the store. Scoped to writes that can take the page away -- its kind, its bytes, or any write naming a snapshot -- sopublish_sync's snapshot bump and the deploy route'swebapp_metadatawrite keep last-write-wins, and a metadata-only write on any other kind is never fenced, which the editor's autosave depends on.That fence and the caller's own
expected_tokenare two questions, asked independently. The fence asks whether the write names the record it is landing on, which a request-driven caller can always answer with its own fresh read.expected_tokenasks whether the record still holds what THAT client last saw. Answering the first and skipping the second would let an owner's stale tab overwrite a newer layout with no 409 -- an agent and an open tab editing one dashboard is the ordinary case here, not an extreme one -- so a content write carryingexpected_tokenis compared on every kind, dashboards included.The gallery page's own words, rewritten against the UX review's blind reader -- in the shipped page, not the chrome. The scripts-off notice ended in "open the dispatch tree from a crew whose network access is unrestricted", which names no person and uses the posture's own word; it now says to ask whoever administers the crew's network policy, and carries a rule and a tint instead of the footnote grey it shared with the empty line.
on a cycleandunresolvedbecamedispatched in a loopandwhose parent is missing. A bare9 itemson a parent row read as covering the rows underneath, which their own counts contradicted, so each row says9 own items. Three tests pin the new text and each reddens on the old page. Two states the review could not see are now attached: the page with no rows, andTry againfaded while the whole read is in flight.The person's layout lock outranks package selection, and every name an owner refusal quotes is redacted. Two things the rebase onto main's structure lock exposed. The lock is a ceiling over the crewmate, but the package branch returned before
instance.read, the only reader of it -- so a crewmate writing its ownkind="dashboard"artifact, ordinary agent work, moved the tab off the page the person pinned, and an unapplied package moved it to the empty state. The lock is now read first and the locked record is what is served. Separately,binding_refusalquoted the binding name, the caller's crew and a validation error's value into a sentence the named GET returns as its 403 body, and_BOUND_TO_REaccepts a GitLab-PAT or Slack-bot shape. The redaction went INTO that one function rather than onto the route: three readers of this string had the same defect and two were found one at a time, so the next caller gets the rule for free.A tab showing no package drops that package's pushes rather than letting them through. The frame guard read
mine && fromPackage !== mine, so an emptyminepassed everything -- and the lock fix above makes that reachable: once locked, the gateway stops selecting a package and the body carries nodashboard, while the (crewmate, package) page stays armed. The template's bootstrap then could not place the pushed generation and asked for a whole read with nothing to name, which the route answers 400missing_dashboard, so the stale band returned on every push. The guard now drops wheneverfromPackage !== mine, and the whole-read ask returns early when no package is live.The ambiguous-slug refusal landed on main while this branch was rebasing, so this change yields to it rather than answering the same question twice.
api_artifact_updateon main now validates a submitted binding's TARGET -- a crew member who exists, a slug two of them do not share (dashboard_slug_ambiguous), a live root session -- and answers 400. That is the narrower question and it has a definite answer, so it is asked FIRST; this change's owner gate, which asks the broader question of whether the caller owns the record and cannot always resolve a caller, now runs after it. Asking the broad one first replaced every one of those 400s with a single 403 and hid what the specific gate would have said. Nothing is weakened: the owner gate still refuses a worker rebinding another crewmate's page to a target that happens to be valid, and the snapshot read it depends on still refuses an unreadable or absent record before either gate decides. One narrowing came with it -- an app is identified by its id STRING, where any truthy value in that slot was read as one, which is a broad refusal standing in for an identification the gate never made.This class of defect surfaced in four places --
resolve_bound_slug, the member lookup onartifacts.py, main's target validation, and the owner comparison inbinding_refusal-- because the product resolves a crewmate slug in more than one place and they did not agree on ambiguity. The owner comparison is the last of them and asks the roster the count before it compares: a roster holding bothAtlasandatlasderives one slug from two names, and comparing the caller's slug to the binding's then authorized EITHER of them for the other's package. More than one owner refuses asdashboard_slug_ambiguousand never picks, and the count comes from_member_names_for_slug, the roster's own answer the other three already ask, rather than a fourth spelling of the rule.The script grant is POLICY AND the owner's active PROFILE, tested by archetype and resolved off the event loop. The grant read only the composed ceiling, so an open policy with a profile that restricts
network.egress-- the ordinary shape, and the standalone default where no policy is configured at all -- handed the pageallow-scripts, and a running page can navigate its own frame, carrying fold values, to a host the profile forbids. The profile is resolved for the surface the page belongs to (the crewmate's own slot; without a session key the scope resolves tounknownand no surface profile can match), and it is tested the same way the ceiling is -- is this scope RESTRICTED AT ALL -- because asking whether one host is permitted answers only about that host: a profile denyinggithub.compermits every other name. The resolution runs through_run, since the profile store stats its directory and reloads what moved, which on the loop pauses every other session's chat and the heartbeat. An unresolvable profile withholds script, as an unreadable ceiling already did.And four display defects where the page would show a reader the wrong thing. The applied version's bytes must come from the record the approval was read from (
created_at), because a slug is reusable and a version number restarts at 1, so a delete-and-recreate between the two reads served the replacement's page under somebody else's approval. A page served with no script now has its bound cells filled server-side as escaped text, since the bootstrap is what normally fills them and an empty page with a hidden stale band reads as a current one. A field whose fold path stops resolving now sends a patch even though no value moved, so the stale band is raised instead of the last value standing as current. A refetch no longer spends a patch version, which was putting every other tab on the package one behind and making each of them refetch in turn. And the binding scanner reads an UNQUOTED attribute value, which a browser accepts and the validator was skipping.This also carries the tree READ path beside its only caller,
LivePage. That reader is why the worktree fold's binding joinsmanifest.FOLD_NAMEShere -- the pairing #18777 deferred -- and the catalogue'sadvertisedflag derives from that same set, so it turns over on regeneration rather than by hand.The render path serves a version a person applied. This answers the First Principles block rather than asking for an exception, and each link was measured:
_serve_packagecalledget(package_slug)with no version -- the artifact's CURRENT content, so the page served was whatever the agent wrote last, with no approval step anywhere.snapshot = is_mcp, so an agent writing over MCP cuts a version on every save with no person involved.by=<actor>, derived from how the request authenticated (actor = "agent" if is_mcp else "user", keyed on theX-Internal-Secretheader).byalone is not enough -- it is stamped onreferenced(posted whenever a person OPENS the artifact) andcommenttoo, both at the record's CURRENT version, so a glance would approve the agent's latest draft. The type alone is not enough either:event_typeis body-settable, so an agent can spell its own saveedited. So: the newest version whose event hasby == "user"AND an approving type.edited,reverted), never a denylist of annotations -- a type the store gains later is excluded until somebody decides, which is howreferencedshould have been treated.createdis out because its actor comes fromcreate'ssource, validated againstALLOWED_SOURCES, which has nouser: the event can never carry the marker, so listing it would be a rule matching nothing that reads as "creating approves".get(slug, version=N)), not the current content. No approval, or a version whose event was evicted or bytes pruned, renders nothing.The one leak, and where it is closed.
by == "user"is assigned to a request with noX-Internal-Secret, and an app backend is proxied with that header stripped.package_write_refusalidentifies an app POSITIVELY fromrequest["app"]and refuses before the person's exemption, so an app never falls through as "whoever sent no secret"; closing it in the middleware would change actor derivation for every app artifact write. An agent cannot reach a person's credentials either (httpOnly cookies,KIROCREW_INTERNAL_SECRETstripped bysandbox._AGENT_DENIED_ENV_KEYS,.local_secretdenylisted, CLI minting refused). The marker DEPENDS on that refusal, so a test ties them.Not claimed: the actor is unforgeable from the REQUEST, not against a writer already running as this OS user -- the same residual the stored-bytes read carries, bounded by the frame.
Backwards compatibility
Compatible:
view.htmlis a new opt-in package shape behind the owner binding, and the route keeps the body shape the tab reads. A crewmate that adopted nothing, or adopted a template, is served what it was before.scriptsabsent means allowed.One capability IS narrowed:
package_write_refusalrefuses an APP-token caller writing akind="dashboard"package, which it could do through/api/artifactsbefore. An app has no crewmate identity to check a binding against and the page it writes runs script in a person's tab. Sweep on main: no shipped app writes this kind -- it is introduced by this line, and both writers (the dashboard skill's save path and the owner agent) are owner-token callers. Any other kind is untouched.One assertion is RESTATED, not removed.
test_every_manifest_fold_name_has_a_scoperequired everyFOLD_NAMESentry to have a bus scope, and a tree fold has none by design. It becomes..._is_keyed_or_read_as_a_tree: every accepted name is REACHABLE, by a scope or the tree read. The strictness moves rather than drops --test_a_tree_fold_the_manifest_accepts_has_a_readerrequires no scope AND a real reader, asserted asread_tree_projectionexisting andLivePage._read_treescalling it.The binding lookup is DEDUPED and the shared function got STRICTER, so "deleted a duplicate" must not read as dropped protections.
resolve_bound_slugnow refuses ambiguity (newBindingAmbiguous, a subclass so no caller changes), refuses when an unreadable record follows a match, and skips live-backed records. Every test the copy carried moved onto it, including the two-claimant one.One race closed, and the window is worth seeing without re-deriving it. This route authorizes a dashboard-package write against a snapshot it READ:
handlers/artifacts.pyreads the record at:2028, gates on it at:2081, and writes at:2111. It hands the store that read'scontent_tokenso a rebind landing in the gap becomes a conflict instead of a silent overwrite. ButArtifactStore.update'sguardedcondition requiredcontent is not None(artifacts.py:1257-1261), so akind-only PATCH arrived with the token attached and ignored -- an agent de-authorized by a rebind inside that window could still flip the kind of the package the owner had just taken. No bytes were lost and later writes stayed owner-gated, butdashboardis not a user-selectable kind, so nothing put it back without a human.guardednow also holds when the record's kind ISdashboard, so the comparison runs under the store's own lock -- the only place the record is loaded race-free; the handler's read is a moment earlier by definition. It is scoped by the kind the RECORD holds, never the submitted one: the dangerous PATCH submitsmarkdown, so reading the submitted value would let exactly this write escape the guard it is meant to trip. Metadata-only writes on every other kind stay unguarded, which the editor's autosave and every tag edit depend on.Ownership is read off the stored ENVELOPE, not off a validated package. The write gate authorizes against both bindings and the STORED one decides, because the submitted one is a claim the caller wrote. Reading the stored binding by parsing the package tied it to whether the layout still validates -- and this PR is what makes those diverge: it adds the credential-shaped field-name refusal, so a dashboard stored before it, whose model the old validator accepted, now fails
parse_packageand classified as "not a package". The gate then skipped the stored half entirely, and a worker submitting a package bound to itself could overwrite and rebind a crewmate's page.stored_package_bindingnow decodes the envelope and answers three cases: no dashboard record (nothing to protect), a readable binding (enforced), or a dashboard record whose binding cannot be read (refused, not skipped). Same ruleresolve_bound_slugalready follows, for the same reason: a layout the validator rejects is still somebody's.An undeclared binding name is redacted before it is echoed. A field NAME travels further than its value, so a credential-shaped one is refused as a name and the refusal names it by its redacted spelling. That ran only on declared
model.typesnames, whileview.html's undeclared-binding refusal listed the names it found raw -- and the artifact route returns that string as the HTTP error body, so an agent binding a credential-shaped name it never declared got it echoed back unredacted. Both paths now redact; redaction is identity on an ordinary name, so the author still reads which field to fix.The snapshot fence and the ownership gate classify the stored record the SAME way, off the envelope. Reading it one way to decide who owns the slug and another way to decide whether to forward the read's token is worse than either alone: a legacy package the current validator rejects was enforced by the gate and left unfenced by the token decision, so its former owner's kind-only PATCH passed with nothing guarding it. Both now use
stored_package_binding, and a test asserts the two agree on every shape rather than checking one case.A read answering
state: emptydrops the page it was holding. That state means the record HAS no page (its applied version pruned, or none approved), and returning early on "this body carries no page" left the held document mounted with the grant it loaded under -- so a reader saw a page the record no longer has, and under an egress ceiling restricted since, that document could still navigate its own frame. The empty state is now authoritative: the held page and any probationary candidate are dropped and the script decision is reset. A read that still carries a page is untouched.Removes nothing else: no key, route or public function is withdrawn for an existing caller.
Tests
TestTheRenderPathServesAnAppliedVersion-- on a REALArtifactStore, so the events are the ones the product writes. Agent writes three times, nothing renders; a person's snapshot lands, that page renders; the agent writes again and the person's version still renders, which is the case separating this gate from one that serves the latest write once any approval exists.TestAnAnnotationIsNotAnApproval-- a person opening or commenting on the package does not apply the agent's draft, and does not promote a newer draft over one already applied. Each asserts its own premise first.TestTheGenericSnapshotButtonIsNotAnApproval-- a content-lesssnapshot: truecuts no version for this kind, so the generic Snapshot control cannot publish the agent's page; and a person who SUBMITS bytes does apply them.TestTheApprovingTypeSetIsAnAllowlist-- every name in the set is a real event type, every type the store emits is in the set or excluded with its reason,ALLOWED_SOURCESstill has nouser, and the conjunction is asserted in all four combinations.TestTheAppRefusalIsWhatKeepsTheMarkerHonest-- an app writes a package, the page renders nothing, and the app check provably precedes the person's exemption.TestAStagedPageReachesOnlyItsOwnersPreview-- nine source-level tests enumerating every reader of staged bytes, every page producer, the gate before each, and the order keeping a preview on the staged page.TestABoundPackageWithNothingToServe-- a binding whose package has no record renders the frame's empty state, not a 404 and not the default template.CrewDynamicDashboard.revocation.test.tsx-- a withdrawn script grant REMOUNTS the frame. A sandbox attribute is computed at navigation, so rewriting it on a running document leaves that document with the grants it loaded under; the grant is now part of the frame's identity, and an unchanged grant does not remount.TestAnUntokenedWriteCannotTakeADashboardOver-- the store's own invariant: a record whose CURRENT kind isdashboardis never written without a matching snapshot token, and an ABSENT token is a refusal. Covers the reported PATCH (kindandcontenttogether, which is what gets past the layout validator), a stale token refused the same way, the owner's matching token going through, a metadata-only write naming no snapshot still applying, an ordinary artifact keeping last-write-wins, and the fence not swallowing a caller's own staleexpected_token. Five mutations of the store clause each redden it -- absent-is-a-refusal, the fence's scope, stored-vs-submitted kind, the handler's naming of its read, and collapsing the two questions back into oneelif-- and a run with the clause restored is green.TestWhatTheStaticPageSays-- the scripts-off notice ends in an action a reader can take, uses no posture vocabulary, names no object the UI does not label, and carries its own notice style rather than the muted grey it shared with the empty line.Measured on this head: 1109 passed across the twenty dashboard suites, 1395 across every
test_artifact*suite, and 1147 across the publish and deploy suites -- the three internalupdatecallers that name no snapshot, which is what the invariant's scoping had to leave alone. Frontend: 884 passed across 34 member and dashboard specs withKIROCREW_ACT_STRICT=1;tsc --noEmitandeslintexit 0; black, isort, comment-history and take-away gates clean, and the test-determinism rules report no finding on any file this change touches.Manual verification
Where a staged page can be seen, read off the source: the staged read has ONE call site, inside
if request.query.get("preview") == "1";_preview_recordis the only caller ofinstance.staged_previewoutside the store, where the other isapply_preview, which consumes it. Both page routes return on_owner_onlybefore reaching_serve, so the staged page inherits the applied page's gate. Every non-preview read serves the applied record or the shipped default, both after the preview branch returns. The product emits a page in exactly three places, all in one file.preview_urlis that same gated read, with no capability token.Screenshots were captured in a real Chromium against the REAL component with only the gateway's reads stubbed: the page is the shipped gallery package composed by the production composer. Each state asserts its testid, palette and the frame's own
sandboxattribute before the shot. The stale band is reached the way a reader reaches it -- a patch skipping a version, so the page asks for a whole read, which is refused.On the UX review's "script withdrawal is silent": not for this page. With
scripts: falsethe frame mounts with an empty sandbox and the page's own<noscript>is what renders (third shot).TestWhatTheStaticPageSayspins that text, pins that the two claims only a script could correct ship hidden, and pins that it does not promise the counts are current.The gallery page's words, rewritten against the UX review's blind reader. Three things it could not act on, all in the shipped page rather than the chrome: the scripts-off notice ended in "open the dispatch tree from a crew whose network access is unrestricted", which names no person and uses the posture's own word, so it now says to ask whoever administers the crew's network policy, and carries a rule and a tint instead of footnote grey;
on a cycleandunresolvedbecamedispatched in a loopandwhose parent is missing; and a bare9 itemson a parent row read as covering the rows underneath, which their own counts contradicted, so each row says9 own items. Three tests pin the new text and each one reddens on the old page.The disabled Retry was measured, not assumed. The first capture of the pending state photographed the button at full brightness:
Btnfades todisabled:opacity-30throughtransition-all, so shooting on the disabled flag alone catches it mid-transition. The shot now waits for the computed opacity to settle and asserts it, which is why that image shows an acknowledgement at all.Screenshots / video
Committed under
temp-screenshots/19335/rather than attached:gh pr edit --attachand every otherghwrite on this machine return exit 0 and change nothing, so an attachment could not be produced for this revision. Committed media is the documented alternative and the review lanes read it the same way. All five are re-captured on this head, so the three that existed before now show the rewritten words rather than the ones the UX review quoted.The same page with nothing folded yet, so its own empty line is what a reader meets. Still a live read, which is what separates it from the record-level empty state:
The same page with
scripts: false, the state an admin ceiling that denies the owner agent egress produces:The stale-values notice after the whole read was refused;
Try againrepeats that read:Try againpressed, with that read in flight. The notice stays up until the read arrives, so the faded button is the only thing on screen acknowledging the press:Related Issues
Part of #19060. Split out of #18777, which has merged, so this targets main directly.
Checklist