Repository navigation
refactor(remote): stop relay-slot births and delete remote_adopt - #17642
Conversation
Sensitive Change ReviewSensitive files changed:
A human reviewer with write access must approve the CURRENT head and |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check. [UX-REVIEWED] f8c0e59 Description read[DESCRIPTION-READ] 0020b76db945240e306185a3093ed552ce47f73c7781f0d039ad7d9e5db12539 That sha256 names everything this verdict read: the PR description, plus the 3 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) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing to check. [DESIGN-REVIEWED] f8c0e59 Description read[DESCRIPTION-READ] 9e5e66c32d41ab91b64850af31e4a878c75651dbe5775a2c06827304665cf7aa 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 Confirm that no shipped build ever created a relay slot. That claim is the only reason RFC wave 4's read-only archive and migration step can be dropped. What this change shipsInventory (8 items) — 8 justifiedIntent: stop this hub from creating chat sessions bound to a remote crew, so the relay path can be retired as the accepted RFC's wave 4 requires. FIX.
[FIRST-PRINCIPLES-REVIEWED] f8c0e59 Description read[DESCRIPTION-READ] c011f505eec227f27c2785d23cd639d63c80785eda1331e21776d5e9c71dcbe6 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: |
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: |
POST /api/chat/slots now refuses a body carrying instance_id or adopt_remote_slot with 400 remote_create_retired, before anything is read or written. A session on a connected crew is created on that crew and opened here through its window, so the hub no longer mints or adopts a relay binding. Removed: remote_adopt.py, the create handler's mint/adopt branch, remote_relay.create_peer_slot, the adopt-only `uncapped` flag on read_peer_slots, the adopt security-posture row, and the instanceId / adoptRemoteSlot create parameters in the web client. Old slots with executor "remote" still load from disk. Part of #6180
f19ccd6 to
f8c0e59
Compare
bolichen97
left a comment
There was a problem hiding this comment.
Approving head f8c0e59.
- Read the diff and its call paths (dashboard chat slot create; remote crew relay/adopt removal; security_posture redaction sinks; web createChatSlot signature).
- PR Readiness is success from github-actions[bot] on f8c0e59.
- Read review threads and AI-review comments on this head: no open BLOCK, no unanswered CONCERNS, no CHANGES_REQUESTED in force.
- Compat/UX check: compat risk low, UX risk low; merge-tree is clean against main 6765454 with no semantic overlap.
Reviewed by Kiro (agent) on behalf of bolichen97 as part of a repo-wide PR sweep.
|
Self-review (crew-pr-reviewer, read-only): RECOMMEND APPROVE Reviewed head |
Problem / Motivation
Goal: No new chat slot on this machine is born bound to a remote crew; a session on a crew is created on that crew and opened here through its window.
The accepted RFC
rfc-remote-crew-sidebar(proposed in #16489, accepted in #16699) makes the peer own its session. The hub only opens a window onto it (#16757, sidebar groups in #16756). Wave 4 retires the hub-side relay path.Today
POST /api/chat/slotsstill acceptsinstance_idandadopt_remote_slot. That is the only place a new slot getsexecutor = "remote". No UI reaches adopt since #16757, and the one UI path left (the memory-mode recreate inChatPage.tsx) re-minted a relay slot by carrying the old slot'sinstanceId.Why it matters
While the create path can still mint relay slots, the relay code cannot be removed (wave 4 PR C), and a stale client can keep producing sessions the new design does not support.
Not a goal
remote_mirror, theread_peer_slotsdedupe,hub_keyorresolved_row_identity's remote branch (PR C).redact_peer_text(PR C).executor: "remote"slots.What changed (motivation → approach → change)
The RFC decision is on main and
accepted. The smallest step that meets the wave 4 exit "no new slot withexecutor="remote"" is to refuse the two create fields up front and delete what only they reached.chat_handlers.api_chat_slot_createrefuses a body withinstance_idoradopt_remote_slotwith400 remote_create_retired, before anything is read or written. The mint/adopt branch, its three binding gates, the peer-mode/agent/workspace/title inheritance and the backfill are deleted.remote_adopt.pyis deleted.remote_relay.create_peer_slotis deleted; the rest ofremote_relay.pystays for PR C.handlers_instances.read_peer_slotsloses its adopt-onlyuncappedflag; the cap now always applies.security_posture.pydrops the "Adopted peer transcript" boundary row.createChatSlot(website/src/api/client/chat.ts) and thecreateSlotthunk (website/src/store/chat/lifecycle.ts) dropinstance_id/adopt_remote_slot(agent_kindmoves up one argument).ChatPage.tsx's memory-mode recreate no longer carriesinstanceId— this is the one hunk of feat(chat): make a chat that ran on a crew a read-only archive #17419 this wave needed, folded in here.docs/system-specs/modules/session.mddescribes the refusal in place of the mint/adopt contract;docs/system-specs/modules/crew-mode.mdstops citing the deleted adopt test; a comment insession_transfer.pystops namingremote_adopt.Backwards compatibility
Breaking:
POST /api/chat/slotswith a non-emptyinstance_idoradopt_remote_slotnow answers400 remote_create_retired. Writer sweep on origin/main @ the PR base: the only writers wereapi.createChatSlot(parameters removed here), its one caller passing them,ChatPage.tsx's memory-mode recreate (removed here), andremote_relay.create_peer_slot(deleted here; it never sent either field to the peer). No app, cron or MCP tool sends them.Reader: src/kiro_crew/dashboard/slot_persistence/metadata_codec.py:_read_executor -- chat -- still restores
executor/instance_id/remote_slotfrom disk, so an old slot loads;test_no_source_module_stamps_a_remote_executor_except_the_disk_readerReader: src/kiro_crew/dashboard/remote_relay.py:remote_bound_refusal -- chat -- still refuses continue/regenerate/rewind/todo on an old remote slot;
test_remote_crew_execution.py::TestBoundSlotRefusesTurnRestartingActionsReader: src/kiro_crew/dashboard/handlers_instances.py:api_instances_chat_slots -- crew page -- the only remaining
read_peer_slotscaller, which never passeduncapped;test_remote_crew_peer_slots.pyReader: website/src/pages/chat-sidebar/create.ts:New chat on crew -- chat -- creates on the peer through the proxy, never through the local create route;
ChatSidebar.createMenu.test.tsxTests
test/test_chat_slot_create_remote_retired.py: every crew-bound body is refused400 remote_create_retiredfor dashboard and app callers with no slot created and no instances-manager access; an existing slot named with a crew is left untouched; empty binding fields stay an ordinary local create; only the disk reader indashboard/assignsexecutor = "remote". Red-before on origin/main: 10 failed, 2 passed (the two plain-create controls).ChatPageMoreCoverage.test.tsx: the memory-mode recreate test now asserts the recreated slot names no crew (red on main).ApiClient.coverage.test.tsx: the adopt wire-format case becomes a check thatagent_kindrides beside an agent and no crew binding is sent.test/test_remote_crew_adopt.pyand the create-path classes intest/test_remote_crew_execution.py(TestBindingAuthorization,TestBoundCreateDefaults,TestCreatePeerSlot);test_chat_handlers_composition_contract.pydrops the deleted names.Manual verification
N/A — unit coverage sufficient: the change is a request refusal plus deletion, and the only UI change drops one field from a create call, covered by
ChatPageMoreCoverage.test.tsx.Screenshots / video
Why no screenshot: the frontend diff only removes a create parameter and one recreate field, so nothing renders differently.
Related Issues
Part of #6180
Replaces the one needed hunk of #17419 (closed). Supersedes #10635, #10854 and #10856, which change the deleted adopt path; their author was notified on each.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)