Repository navigation
feat(crew-mode): the Crew panel routes answer a crewmate thread as a root - #28869
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS No design-level concerns: the four routes now share one root test, which widens what they accept without changing what a Crew Mode root gets back. Notes
[DESIGN-REVIEWED] 19f1d0b Description read[DESCRIPTION-READ] 5ea446a1a9e103a8bf43a4bc4ff4218b00eb6452257c33f8ccb2fd9b3195abf0 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 The new Notes
What this change shipsInventory (6 items) — 4 justifiedIntent: let a person list, steer, approve and timeline a crewmate thread's dispatched sessions the way they already can for a Crew Mode conductor. This is an ADDITION.
[FIRST-PRINCIPLES-REVIEWED] 19f1d0b Description read[DESCRIPTION-READ] 8e99342719e192e3962bb60308f286e997a0dd793e5f04d33110abd93aec7201 That sha256 names the PR description this verdict read. 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: |
chenmingwei23
left a comment
There was a problem hiding this comment.
Approved for bulk merge: readiness passed, no conflicts, checks green.
Problem / Motivation
Goal: The Crew panel's routes answer a crewmate (mate) thread as a root, so a mate's sessions can be listed, steered, approved and drawn on the timeline the way a Crew Mode conductor's are.
#26952 stamps
mate_root/mate_dispatched_byon every session a mate thread dispatched, but nothing reads them. The four Crew panel routes (GET .../crew-workers,GET .../crew-timeline,POST .../crew-workers/{w}/steer,POST .../crew-workers/{w}/approve) answer only a Crew Mode root, so a mate thread gets 404not_crew_mode_root.Why it matters
This is migration step 3 of the crewmate workers RFC (#26643). The mate Profile card's Sessions tab (step 4) and approvals in the mate chat (step 5) both read these routes.
Not a goal
crew_rootconsumer in for mates.chat-*slot running as a mate (RFC: out of scope).What changed (motivation → approach → change)
Goal → reuse the Crew panel's code with the root kind decided by the slot frame's own stamps, so a mate's sessions are read by
mate_rootand nocrew_rootrule fires for them → this change indashboard/handlers/crew_workers.py:crew_mode_root) or a mate thread (slotmodememberthat the samestamp_rowspass recorded inknown_mate_roots). A mate's worker is not a root.crew_rootormate_rootfor it; closed ones come from the session tree as before. A closed mate thread this gateway saw is answered from saved data, like a closed Crew Mode root.not_a_worker). The owner-only, app-token-refused gate is untouched.root_kind: "mate"and takesdispatched_byfrommate_dispatched_by. A Crew Mode root's answer is byte-for-byte what it was.src/kiro_crew/crew_mode.py:mate_workers_ofbesideworkers_of, and themate_rootcomment says who reads it now. The crew-mode system spec gains a row.The RFC this implements is
drafton main. It was merged in #26643 and the owner chose this path in #27837.Backwards compatibility
Compatible: a Crew Mode root's four routes return the same rows and codes; a mate thread that got 404 now gets an answer. The 404 message names both kinds of root; its
codeis unchanged.Removes nothing: the diff only widens which root key the routes accept; no row, field, key or function is hidden, removed or renamed.
Tests
test/test_crew_workers_mate_root.py:a mate thread's list is its child and grandchild, with groups, ledger line and dispatcher;
root_kindismate;a Crew Mode root's answer has no
root_kindand the same rows;a mate's worker, a plain chat, and a
member-mode row with a creator are refused as roots;a closed mate thread's list is read from saved data;
the timeline draws the mate and its sessions;
steer reaches a mate's worker and records no Crew Mode steer metric; a session outside the mate's tree, and a mate worker named under a Crew Mode root, are refused;
every route keeps the owner gate for a mate root;
approve, through the real per-slot approve route: the owner decides a mate worker's request once; an app token cannot; another mate cannot approve this mate's worker; a mate's worker is no root to approve through.
a steer under a root that is no mate is still counted in the Crew Mode metric; a mate's is not.
Existing Crew Mode route, steer, timeline and mate-stamp suites pass unchanged. Local GPT and Opus reviews: no blocking findings.
Proof: not provable -- other: new feature, not a fix; no production hunk to revert against a failing test.
Manual verification
N/A — unit coverage sufficient: the routes are exercised end to end in tests, with no UI reading them yet.
Related Issues
Part of #28859
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributed under the project's Apache-2.0 license.