Repository navigation
feat: crew page work-item board over a masked work-ledger projection - #12792
Conversation
Design Review (Fable 5) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS Every 10-second poll writes an append-only SEL grant row, so routine board reads will drown the audit trail and grow the log without bound. WatchThe GET handler audits every allowed read ( [DESIGN-REVIEWED] be88320 Description read[DESCRIPTION-READ] 966080ca8ebeb5e96c24bc0e70918e8fe578f25a5441513dd6267ba1614d0068 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 (Fable 5) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS Liveness renders as a bare 7px dot — no text, tooltip, or AT exposure — and the blind reader had "no idea" what it meant. Watch
Suggestions
[UX-REVIEWED] be88320 Description read[DESCRIPTION-READ] 1db416cd3f6a15e3d40f111a07eab099cc0b0f35eec236c19f47abbdb4bda6c5 That sha256 names everything this verdict read: the PR description, plus the 13 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 5.6 Review — ✅ no blocking findings (all downgraded on adjudication)GPT 5.6 flagged blocking issues on This comment is updated in place on each push. Review detailsBLOCKING -- src/kiro_crew/dashboard/handlers/work_ledger_board.py:174 -- Same-second decisions remain outstanding
Adjudication (Opus 5) — is blocking on each finding proportionate?LOW — a decided question stays in the "Needs a decision" band; the row carries Conditions confirmed: event stamps are second-precision ( Real fix cost: a second ordering rule — event-tail positions when both sides come from events, timestamps when the ask fell back to [ADJUDICATION] be88320 total=1 uphold=0 downgrade=1 False positive or not applicable? A repository writer can comment: |
First Principles Review (Fable 5) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS The payload ships Not justified as shipped
What this change shipsInventory (10 items) — 8 justifiedIntent: let a human see which of a conductor's work items is stuck waiting on them, without spending a model turn — an ADDITION (RFC Phase 4,
[FIRST-PRINCIPLES-REVIEWED] be88320 Description read[DESCRIPTION-READ] 1bed0ac26f69491e380a75ae4c4ddf1efc243b91a8eeb3961b9ee9883a47a857 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5 Review — ✅ no blocking findingsReviewed Review detailsNothing blocks: no AUTOSDE FINDING — website/src/i18n/locales/ko.json:11357 — the new Korean block spells the worker role FINDING — website/src/pages/crewBoardRows.ts:73 — FINDING — src/kiro_crew/dashboard/handlers/work_ledger_board.py:295 — FINDING — website/src/pages/CrewBoardPage.tsx:78 — FINDING — website/src/pages/CrewBoardPage.tsx:23 — the module docstring states " [OPUS-REVIEWED] be88320 Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
05dafd2 to
3e793ed
Compare
3e793ed to
d5013a8
Compare
d5013a8 to
99c0bc6
Compare
501eec2 to
7316bec
Compare
|
Rendered evidence refreshed for The board, light and dark. The orphaned board, light and dark. The entry point: the A ledger that exists and holds nothing. The goal still shows, so the page says whose board it is. The per-item event tail, opened. A failed Stop: the action route answered 500 and the button was clicked, so this is the page's real error path. A session that keeps no work ledger. The menu entry hides itself for exactly this case. |
GPT 5.6 Review — 🔴 changes requested (blocking)GPT 5.6 found at least one blocking issue that must be resolved before merging This comment is updated in place on each push. BLOCKING -- docs/feature-map/README.md:272 -- The Work ledger row still claims no dashboard page exists
BLOCKING -- website/src/pages/CrewBoardPage.tsx:277 -- Item rows lack the required narrow layout
FINDING -- src/kiro_crew/dashboard/handlers/work_ledger_board.py:103 -- “the button ships disabled” contradicts [BLOCK-MERGE] 7316bec Adjudication (Opus 4.8) — is blocking on each finding proportionate?Both findings are anchored to AUTOSDE rules carrying F1 — F2 — False positive or not applicable? A repository writer can comment: |
7316bec to
960af34
Compare
960af34 to
34359a1
Compare
34359a1 to
2d16efe
Compare
|
🤖 Kiro Crew [operator: dwu96#8c08bee0]: This PR has been inactive for 7+ days. I reviewed the blockers but they require your input:
One thing you can ignore: the single red backend shard, Backend Tests (Windows) (4), failed only on When you've addressed these, the pipeline will re-assess on its next cycle. If you'd prefer no automation on this PR at all, add the |
|
🤖 Kiro Crew [operator: chenmingwei23#de330d0c]: This PR has been inactive for 7+ days with failing CI. I've assessed the blockers and they appear resolvable — I'll push fixes directly to this branch as a co-author. Assessment: Five blockers, all mechanical. (1) Branch is If you'd prefer I don't touch this PR, add the |
Implements Phase 4 ("the surfaces"), Crew page half, of
docs/request-for-change/rfc-conductor-work-ledger.md. The store, tools and the
conductor's own read route shipped in Phases 1, 2 and 2.5; this adds the surface.
/api/work-ledger cannot serve a browser, and not because it lacks a field. It
resolves WHICH ledger to read from the caller's X-Session-Key and takes no
conductor parameter, which is the contract session_ledger.py states outright; a
browser carries a cookie, not a session key, so it cannot name a conductor at
all. Its rows also carry worker_session_key, and the route is MCP-only. So this
adds a second read over the same store for the other caller:
GET /api/crew-board?conductor=KEY masked, cookie-authenticated projection
POST /api/crew-board/action stop or take over one ORPHANED item
A row is WorkItem.to_dict() minus worker_session_key, plus the derived flags the
conductor's read already computes and a server-joined `alive` -- joined here
because the key that resolves it is the field the page may not receive. The mask
names the field to DROP rather than the fields to keep, so an item field added
later reaches the page instead of silently going missing.
Two defects the work surfaced, both of which would otherwise have shipped. The
natural route spelling, /api/work-ledger/board, sits under a prefix already in
_STRICT_INTERNAL_API_PATHS, and that list matches by prefix -- so the board would
have inherited MCP-only auth and 403'd every browser call. And masking the item
field is not enough: a bind event's text IS the worker session key, which a
per-row check passes happily and a whole-payload assertion catches.
The stop delegates to chat_handlers.stop_slot_turn, the single primitive the Stop
button and session_control.stop_target both already use. Not to stop_target
itself: it authorizes through authorize_target -> caller_slot_key, which resolves
a caller only by walking the LIVE slot table, and an orphaned item is by
definition one whose conductor slot is gone -- so that delegation would be
refused caller_unidentified on every request this route accepts. escalate=False
for the reason stop_target documents: a browser whose request timed out re-sends
it, and escalation would discard the worker's queue for a retry.
take_over answers 501 and renders disabled. No primitive exists to delegate to:
session_control has no verb that re-owns a session, and CONDUCTOR_ACTIONS is
{create, bind, decide, verdict, close, goal} with no transfer. The server sends a
stable code and the page renders a translated reason, so the refusal and the
explanation cannot drift apart. Its reason is stated once at board level, because
the unavailability belongs to the gateway rather than to any row; a row states
only its own reason, which is whether its worker session is still open.
The page lifts items waiting on a ruling into a band at the top, because that is
the one question a conductor's board is read to answer. status (worker) and state
(conductor) stay two chips: they are different parties' claims about the same
item and can legitimately disagree, and one merged chip would have to pick a
side. The outstanding rule requires the newest decision to be NEWER than the
report that asked, so a stale ruling does not silence a fresh question, and an
undateable question stays outstanding -- failing toward the human.
Error branches read a rejection's `status` rather than using `instanceof
ApiError`, for the reason isNotFoundError documents next door: an ApiError from a
different transport, or a mocked client, is still a 404 or a 409 and must be read
as one.
The artifact row is sorted by byte order, not localeCompare. Those are keys the
store defines, never translated prose, and a locale collation made the row order
depend on the viewer's browser -- two people reading the same board could see the
same artifacts in different orders.
Screenshots are committed under docs/request-for-change/assets/ and the harness
writes there by default, because Design and UX review read rendered evidence from
the revision itself. The payload they render is verbatim real handler output,
dumped from a seeded store, since a hand-written fixture would agree with the
page by construction. The orphaned scene is its own smaller two-item board rather
than a second recording of the first: two recordings of one board differ by a few
flags, which makes the files near-copies, and a focused board is the clearer
screenshot anyway. The boot-time /api stubs every harness repeats now live in
website/scripts/lib/boot-stubs.mjs beside serve-dist.mjs.
work_ledger_board.py joins _PERMITTED_STORE_IMPORTERS as an argued third seam:
the rule exists so one AGENT session cannot name another's ledger, and this
module's caller is the dashboard owner, who already reads every session here.
bolichen97
left a comment
There was a problem hiding this comment.
Reviewed on behalf of the maintainers (readiness sweep 2026-09-29): readiness passed, the required PR Readiness check is green on this head, no live CHANGES_REQUESTED, no open blocking review threads; where the PR's files also moved on main since its merge-base, the PR's own tests were run on the main+PR merge tree and passed. Approving and squash-merging.



























































Problem / Motivation
Goal: Give a human a dashboard surface that answers "which work item is stuck waiting on me?" without spending a model turn.
A conductor's work ledger has a store, tools and a read route (Phases 1, 2, 2.5), but no surface. The only way to see what a fleet of workers is doing is to call
work_ledger_readfrom an agent session and read the JSON, which means the one question a human actually has, which item is stuck waiting on me?, costs a model turn to answer.The obvious fix does not work.
/api/work-ledgercannot serve a browser for two independent reasons:api_work_ledger_getcalls_caller_key(request)and returns the ledger owned by the calling session, resolved fromX-Session-Key. There is no conductor parameter, and that is deliberate:session_ledger.pystates the contract that the ledger a request touches is derived from the caller's identity, never from the request body. A browser has a cookie, not a session key, so it cannot name a conductor at all.WorkItem.to_dict()includesworker_session_key, and the route is inside_STRICT_INTERNAL_API_PATHS, so it is MCP-only.So this was never a missing field. It was a missing addressing mode plus a different auth principal.
Why it matters
Without a surface, a worker that asks its conductor a question and then waits is indistinguishable from a worker that is busy. The conductor notices on its next patrol; a human notices never. The item that most needs a person is the one hardest to find.
Phase 4 also names an orphaned item, one whose conductor session is gone while the item is still open. Nothing is reading that worker's reports, and it keeps writing them. Today nobody can see that state, let alone stop it.
Not a goal
Three things are deliberately out of scope:
session_controlexposescreate_session,stop_target,close_target,send_to_targetandread_messagesand nothing that re-owns a session, andwork_ledger.CONDUCTOR_ACTIONSis{create, bind, decide, verdict, close, goal}with no transfer. Phase 4's own instruction is not to invent a second one. Take-over answers501and renders no control; the code path that renders it is in place for when the primitive lands.main, so nothing here reads them.What changed (motivation → approach → change)
A second read over the same store, for the other caller, plus one action route. The conductor's own route is untouched, so nothing reading it today changes behaviour.
GET /api/crew-board?conductor=KEYis a masked projection behind the dashboard owner gate. A row isWorkItem.to_dict()minusworker_session_key, plus the derived flags the conductor's read already computes and a server-joinedalive. Liveness is joined here precisely because the key that resolves it is the field the page may not receive.Both routes call
require_owner_dashboard_requestbefore the caller's conductor key is read. That ordering is the substance rather than a formality: a ledger is keyed on a URL parameter the caller chooses, so an authenticated-but-not-owner token (a member, an app) could otherwise name any conductor._own_ledgerestablishes that the named key has a ledger, which is not the same question as whether this caller may read it.Four defects the work surfaced, all of which would have shipped:
/api/work-ledger/boardsits under a prefix already in_STRICT_INTERNAL_API_PATHS, and that list matchespath == p or path.startswith(p + "/"), so the board would have silently inherited MCP-only auth. Proven rather than argued: the old spelling is covered by['/api/work-ledger'],/api/crew-boardby[]. Moved off the prefix rather than teaching a security matcher an exception for a read route.bindevent'stextis the worker session key. StrippingWorkItem.worker_session_keyleft the key sitting in the event log, which a per-row check passes happily. The whole-payload assertion caught it. The line is kept, since itskindandtsare when dispatch happened, and only the text goes.work_ledger.conductor_dirrefuses a path separator or a null byte, because either would let the key escape its own directory, and that refusal reached the handler as an exception: an HTTP 500 on an ordinary GET, which reads as a broken board rather than a bad request. Both routes now answer a coded400. Done by CATCHING the store's own error rather than re-testing the shape in the handler: the rule belongs towork_ledger, a copy of it here is a copy that can drift, and a rule the store adds later is covered without a second edit.POST /api/crew-board/actionwith{conductor, item_id, action}carries the stop affordance. The masking is exactly what makes this route necessary: a browser that cannot learn the key cannot stop the session itself, so the server resolves the key from the store and never returns it.The stop delegates to
chat_handlers.stop_slot_turn, the single primitive the Stop button andsession_control.stop_targetboth already use. Not tostop_targetitself, and the reason is the interesting part:stop_targetauthorizes throughauthorize_targetthencaller_slot_key, which resolves a caller only by walking the live slot table. An orphaned item is by definition one whose conductor slot is gone, so a delegation naming the conductor as caller would be refusedcaller_unidentifiedon 100% of the requests this route accepts. The authorization it would have done is performed here instead, by the owner gate plus the ledger lookup.escalate=False, for the same reasonstop_targetpasses it: a browser whose request timed out re-sends it, and an escalation would discard the worker's queue and pending steers for what is a retry rather than a second decision.Accepted only when the item is orphaned;
409otherwise, so a click made from a stale poll is refused rather than quietly doing nothing, and the page re-reads. Every call is SEL-audited with the conductor anditem_id, never the worker key. The response is allow-listed rather than masked, the opposite of the item rows and deliberately so: the row mask is a deny-list, so a field added toWorkItemlater reaches the page by default, whereas the stop primitive's body belongs to another module and a field it gains later must not reach a browser that is not told which session was acted on.The page is
website/src/pages/CrewBoardPage.tsxat/crew-board?conductor=KEY, polling every 10 s through the sharedapiclient. Items waiting on a decision are lifted into a band at the top; everything open follows; terminal items collapse behind an expander viais_terminal.status(worker) andstate(conductor) stay two badges, each with a dim role prefix, because they are different parties' claims about the same item and can legitimately disagree; one merged badge would have to pick a side and would hide exactly that.summaryis the row's last line, standing in for the session ledger'snext, which this store has no equivalent of.staleis a badge; due-in is dropped for the same reason. The goal renders on an empty board too, because it belongs to the ledger rather than to the item list: without it a reader who followed the menu entry lands on a page that names nothing. Theme variables only, and the sharedBadge,Btn,Card/CardTitleandPageHeaderprimitives throughout.Its entry point is
components/CrewBoardMenuItem.tsx, a Crew board item in the session overflow menu. It renders nothing for a session that owns no work ledger, which is most of them: the board is keyed on a conductor, and an always-present entry would lead almost everyone to an empty page. Only a404hides it; any other failure renders the sharedErrorNoticeplus the siblingErrorNoticeMenuItemhand-off, because hiding on both would turn a 500 or a dropped connection into "this session has no board" -- a wrong answer the reader has no way to question. The existence test is the projection itself, so opening the menu warms the page's cache rather than adding a round trip, and a Radix menu mounts its content only while open, so nothing is fetched until someone opens it.The outstanding rule is stricter than "has a decision": an item can be decided, handed back, and ask something new, so the newest
decisionmust be newer than the report that asked. Timestamps are parsed rather than string-compared, because two different offsets sort wrongly as text, and an undateable question is left outstanding, failing toward the human.GPT 5.6 findings, latest round
backend-security-controls, security-class, blocking). The owner gate returnsNoneon a grant and writes no SEL line, and a safeGETskips the dashboard chain's audit middleware, so the allowed read of a conductor's ledger was recorded nowhere. ThePOSTaction did audit, but with the selected conductor key as the caller — attributing the permission decision to the subject being read rather than to the operator who made it. Both routes now derivecaller = request["user"](the authenticated dashboard owner, the same identity the owner gate itself checks) after the gate passes, and audit with that caller; the conductor key and item id ride inresources(conductor=… item=…:…), never as the caller. The GET now writes acrew_board_read/okgrant line. Two tests pin it: the allowed read is audited to the owner with the conductor as a resource, and a stop action names the owner as caller with the conductor never appearing as the caller.stop_slot_turnstops the slot's TURN, per its own docstring, and this route passesescalate=False, so the action is a cooperative cancel of the work running now -- it does not end the session and nothing about it is irreversible. The label saidStop workerand the line under it said Only the session ends, and it cannot be resumed, which is copy the button cannot keep. The label and the line are corrected across all 12 catalogs plus the generated pseudo-locale.action_stopisStop current turnand the consequence ends This cancels the turn running now, and the session stays open. A test pins both halves.residual/crash-data-loss-corruption, fenced, blocking, prior round). The outcome now comes from the result, with the refusal code inresources. Two tests make the pair discriminating: the reachable case auditsok, the unreachable case auditsfailurenamingremote_stop_unreachable.max-two-buttons-per-row, blocking, prior round). The inlineErrorNoticeis a sibling of the button row now, one line below it.Earlier rounds fixed the feature-map row that still denied this page existed (
feature-map-correctness), the item row that had no narrow layout (narrow-viewport-required), the silent board-probe failure (errors-use-error-notice), the bespoke status pill that bypassed the sharedBadge(page-layout-patternitem 6), and the invalid-conductor-key crash, which is a coded 400 with a test on each route.Rebase drive-by:
session_set_modeltitleRebasing onto current
mainpulled in #14508 ("declareTool.titleon the own MCP servers' tools"), which addedtest/test_mcp_tool_titles.pyasserting every listed dashboard tool has a title indata/mcp_tool_titles.json. #14508's table omittedsession_set_model(added to the dashboard server earlier by #14223), so the merge-ref inherited a red onBackend Tests (Windows)(4)and(3.12,4)— the same shardsmain's own newest completed run fails. Since the red blocks PR Readiness on this branch's merge ref and the fix is one table entry, it is completed here:"session_set_model": "Set session model"is added to the dashboard block.test_mcp_tool_titles.pyandtest_titles_are_short_single_line_copyboth pass.UX findings, latest round
The blocking verdict was
cannot evaluate, and the cause was timing rather than the page. The lane finished 22 seconds before this description's attachments were replaced, so the blind reader saw the previous revision's captures. The captures below are rendered from the current head and were attached BEFORE the push that carries it, which is the ordering that keeps the evidence and the code in step.The one finding about the page itself was the 320px capture, and it was a defect in the capture rather than in the layout.
capture-crew-board.mjsclicks eachEventsexpander before shooting, and afullPagescreenshot cannot reach back above a fixed-header scroll offset -- so the card title and the goal line were absent from the image while being present on the page. The harness resets every scroller to the top before each shot; the refreshed 320px capture shows the header, the card title,GOALandRound 0in full.Backwards compatibility
Compatible: this PR adds two new routes (
GET /api/crew-board,POST /api/crew-board/action) and a new page; it does not reject, rename or remove anything main currently accepts. The conductor's own/api/work-ledgerroute is untouched, so every existing MCP caller behaves exactly as before. The masked projection is a strict read-subset ofWorkItem.to_dict()behind the owner gate, adding a field (alive) rather than changing any.Tests
test/test_work_ledger_board.pytest/test_security_posture.pyCrewBoardPage.test.tsx,crewBoardRows.test.ts,CrewBoardMenuItem.test.tsxSessionActionsMenu.errorHandoff,SessionActionsMenu.popout,TagManagerListsrc/i18n/style/(all 11 locale style suites)tsc -bblackgate,flake8,isortcheck_memory_store_seam.py,check_comment_history.py,check_feature_map.py(base ref set)lint:i18nwithI18N_BASE_REF=origin/mainjscpd@3.5.10withwebsite/.jscpd.jsoncheck-bundle-size.mjsThe action-route cases cover what the masking and the gate make load-bearing: that the stop reaches the shared primitive with
escalate=False; that a non-owner subject and an app-scoped token are both refused403on each route before the store is touched; that a key holding a path separator is refused a coded400on each route rather than raising; that another conductor's item is refused404(the lookup is scoped to the named ledger); that a non-orphaned item and a terminal item are both refused409; unknown item; unknown action; an item with no bound worker; a worker whose session has closed; take-over refused with the same code the read advertises; a200carryingok: falsenot read as success; artifact keys redacted, including two keys that redact alike; and a whole-response assertion that nochat-*key appears anywhere in an action reply.Manual verification
Screenshots below are rendered from the real built SPA by
website/scripts/capture-crew-board.mjs, booted throughstubDashboardApiover the verbatim output of the real handler (api_work_ledger_boardcalled in-process over a seeded store bywebsite/scripts/fixtures/regen-crew-board.py). The generator asserts on the bytes it writes that noworker_session_keyand nochat-*worker key is present.Screenshots / video
The ordinary board, light and dark -- the conductor's slot is open, so nothing is orphaned and no row offers an action. Decision band on top, working band, finished collapsed. Both themes, so the theme-variable claim is checked rather than asserted.
Orphaned, with the affordances, light and dark -- the conductor's slot is gone, so every open item is orphaned.
Stop current turnis live on the item whose worker still runs; on the item whose session has closed the button is disabled. No take-over control renders on either row.The entry point.
Crew boardin a conducting session's overflow menu, betweenReveal in sidebarandPop out to window.A ledger that exists and holds nothing, which is a different answer from a session that keeps no ledger at all. The goal still renders, so the page says whose board it is.
The per-item event tail, opened.
A failed Stop. The action route is answered
500and the button clicked, so this is the page's real error path.A session that keeps no work ledger. The route answers
no_ledgerand the page renders an expected gap rather than a failure.At 320px, the narrowest width
narrow-viewport-requirednames. Each row's two metadata rails sit under the title instead of squeezing it, and the event tail wraps.The same images are also committed under
docs/request-for-change/assets/, where the harness writes them by default, so the repository keeps a durable copy that survives an attachment expiring.Related Issues
Implements Phase 4 of the work-ledger crew board RFC under
docs/request-for-change/.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)