Repository navigation
feat(shared-crew): let a relay teammate read a roster Bot's Dashboard - #37385
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. The base spec said teammates could not read a Bot's Dashboard because "session counterparts are owner-only too". That reason was only symmetry, and the PR reverses it with a linked issue (#37376). What this change shipsInventory (6 items) — 6 justifiedIntent: let a relay teammate on a team Crew see the Dashboard page of a Bot in their roster, as they already open its chat — ADDITION.
[FIRST-PRINCIPLES-REVIEWED] 398813c Description read[DESCRIPTION-READ] fe3a7bf414361d956341f89a3fdc59cb90d24325e920c58643cc83267895c265 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the teammate read reuses the chat routes' Notes
[DESIGN-REVIEWED] 398813c Description read[DESCRIPTION-READ] f6f332334d91445dff9238a147fe607d670d2933760a7f98db96f7f68a13216e 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 |
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: |
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: |
22b2462 to
db368d2
Compare
|
self-added: no
|
|
Rebased: main moved in docs/system-specs/modules (acp-client, app-kit-platform, governance, messaging, ops-mission-control, platform-context, security, session) and src/kiro_crew/dashboard/handlers (credential_redaction.py, updates.py, updates_streams.py), plus src/kiro_crew/dashboard/warm_task_brief.py and 16 more, since this head went green (46f62de -> b81cf5a); CI re-running. |
db368d2 to
a3e2997
Compare
Code change approver recommendation: A person should decideWhy: the decider estimates a 12% chance that this change introduces a defect, within the 12% limit for approving on its own, but it changes 439 lines, more than the 400 it may approve on its own. The PR lets a relay teammate read a roster Bot's applied Dashboard page through _teammate_reader. It refuses ?preview=1 first, then defers to the existing _teammate_admitted check (relay-verified Kiro human, Bot in their roster, audited as allowed). Every other caller still goes through _owner_only unchanged. Refetch and preview apply/discard stay owner-only. In _serve_package the teammate path never pops or writes the shared live-page store, uses a send callback that does nothing, and arms and disarms inside one worker call with try/finally, so the owner's armed page, version counter and language are untouched; a framing failure also keeps the owner's page. Field frames go only to owner-registered sockets (broadcast_ws_owners, registered via is_owner_dashboard_request), and relay admission gives a teammate a subject distinct from the owner's, so teammate tabs get no pushes. The response tag is scoped to the reader's identity. Specs are updated to match. Tests use the real relay ingress and cover the read, the audit row, every refusal, a Bot outside the roster, a header-spoofing non-owner, and the owner-page invariants, including an arm that raises. 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 |
|
The red |
a3e2997 to
398813c
Compare
tim-finnigan
left a comment
There was a problem hiding this comment.
Looks good. Same admission as Bot chat, a one-shot read that leaves the owner's live page alone, and refetch/staged/apply stay owner-only. One question, not blocking: each teammate tab does a full arm/disarm on the 60s fallback refetch. Fine at a few teammates, but is that OK cost-wise with a dozen or so tabs open?
Problem / Motivation
Goal: A relay teammate on a team Crew sees a roster Bot's Dashboard page instead of "Only this bot's owner can see its dashboard."
A teammate who comes in through the Kiro relay can open a roster Bot's chat and run its turns. Its Dashboard tab still answers 403
owner_only. The Dashboard is often the main thing a Bot produces, such as a garage of generated cars or a leaderboard, so the teammate who asked the Bot to build it cannot see the result.Why it matters
Shared Crew's promise is that teammates use a team Crew's Bots as they use its sessions. A teammate already has the owner's access to run work on the Bot and can ask it for any value its page shows, so the 403 protects nothing and hides the Bot's output from everyone but the owner.
Not a goal
GET /api/chat/slots/{slot}/dashboard) or the work ledger board to teammates.?preview=1) or letting them Keep or Discard it.What changed (motivation → approach → change)
A relay teammate on a Bot in their roster now reads that Bot's applied Dashboard page, as they already open its chat. Everyone else meets the owner gate as before.
GET .../dashboard(applied page)members.dashboardPOST .../dashboard/refetch?preview=1, preview apply and discardThe gate is one helper in
member_dashboard.py,_teammate_reader, which refuses a staged page and otherwise calls the samemembers_access._teammate_admittedcheck the chat routes use; anyone it does not admit meets_owner_onlyas before. A teammate's read is a one-shot page of its own, armed and disarmed in one worker call, so it never replaces the live page the owner's tabs are pushed from: that page keeps the owner's language and version counter. A teammate's tab therefore gets no pushed frames and stays current through the tab's own timed re-read, and the refetch that recovers a gap in those pushes stays owner-only. The member-event-log spec says which Dashboard reads a teammate reaches.Backwards compatibility
Compatible: the owner's answers are unchanged, and the only new answer is a 200 to a relay teammate on a roster Bot who was refused before.
Removes nothing: the change only admits a caller; no route, field or record is hidden, renamed or removed.
Tests
test/test_members_roster_relay_teammate.py, over the real relay ingress, header strip and token auth: a relay teammate reads a roster Bot's Dashboard with the same state and template as the owner and leaves anallowedmembers.dashboardrow underrelay:<id>; they are refused the refetch (the owner gets the route's own 409), the staged page and its apply and discard, and a Bot outside their roster; a non-owner who is not a relay teammate is refused even when sending the relay user header.test/test_member_dashboard_teammate_read.py, on a real armed package page and the crew-log bus: after the owner reads in English and a teammate in French, the owner's page is the same object, still subscribed, and the next fold pushes one English frame; a teammate's read arms nothing when the owner has none; a teammate's read that cannot be framed keeps the owner's page; and anarmthat raises after subscribing leaves the teammate's page unsubscribed.test/test_member_dashboard_routes.py: the route ratchets keep_owner_onlyon every page route and pin that_teammate_readerrefuses?preview=1before calling_teammate_admitted, and that the refetch never calls it.member_dashboard.pychange reverted, the read test fails; with the arm wrapped only in a plain arm-then-disarm, the raising-arm test fails.Manual verification
Not yet run against a live relay host. The relay ingress, header strip and token auth in the tests are the real middleware chain, driven over a loopback listener.
Related Issues
Closes #37376
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)