Repository navigation
refactor: use concrete RPC and orchestration owners - #41158
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
This reverts commit 818055f. The feature misbehaves in real use: an Allow on a worker's approval card was recorded as closed without an answer, and closed approval cards render at the bottom of the coordinator chat, below newer messages. Removed: the Claude PermissionRequest hook hold and its 130 s timeout, the approval card in the coordinator chat, `orchestration deny`, the approval payload on stop escalations, and the held-delivery lines on send receipts. Escalation text goes back to its pre-#40756 wording. Kept from later commits: - #40983 (lost-worker alerts): its `lost` reason, cause/leftover/settled fields, turnStartedAt and the rejected-report check stay; only the approval branches around them are removed. - #41158 (owner moves) and the test cleanups (#41151, #41175, #41177) only touched approval code that is now deleted.
…dinator (re-land with fixes) (#41259) * revert: worker permission approvals (#40756) This reverts commit 818055f. The feature misbehaves in real use: an Allow on a worker's approval card was recorded as closed without an answer, and closed approval cards render at the bottom of the coordinator chat, below newer messages. Removed: the Claude PermissionRequest hook hold and its 130 s timeout, the approval card in the coordinator chat, `orchestration deny`, the approval payload on stop escalations, and the held-delivery lines on send receipts. Escalation text goes back to its pre-#40756 wording. Kept from later commits: - #40983 (lost-worker alerts): its `lost` reason, cause/leftover/settled fields, turnStartedAt and the rejected-report check stay; only the approval branches around them are removed. - #41158 (owner moves) and the test cleanups (#41151, #41175, #41177) only touched approval code that is now deleted. * feat(orchestration): answer workers' permission prompts from the coordinator (re-land of #40756) * fix(orchestration): credit an approval from Claude's own decision record and place each worker card at its time - An Allow that Claude took is answered by the person even when the command then fails or is still running; a failed command's PostToolUseFailure counts as ran. - Expired means the agent's own timeout only; a close Orca can't name is not an expiry, and reasonDelivered is true only with a reason. - Escalations wait for the dialog to paint and read Claude's warning even when a long command hides the top of its box. - Worker cards and receipts render after the message they followed in time, not after the whole conversation; the toast says what happened. * fix(native-chat): place timed rows without a memo the compiler skips * perf(orchestration): feed chat approvals from their own stream, pin open cards, close cards whose worker ended Native chats no longer subscribe to the crew stream for worker approvals. A narrow orchestration.workerApprovalsSubscribe stream per chat party wakes only on that party's own mail and on Run/Dispatch changes, never on agent status, and reads the crew only when the approval list itself changes. The pane no longer redraws for approvals: the transcript receipts and the pinned stack each hold the feed themselves. Open worker prompts are pinned above the composer (above the chat's own prompt), oldest first, in a bounded scrolling stack; the transcript keeps only receipts, at the time the worker asked. The countdown ticks only for open cards in a visible pane. An approval whose Dispatch is no longer running reads as closed ("No longer open · worker ended"); a hook that hangs up after its worker is gone closes as worker-ended rather than "answer it in the terminal"; and a click that finds the prompt or Dispatch already gone turns the card into its receipt at once. Also carries over: a stop owes a closing line only to an approval whose escalation went out. * fix(native-chat): no toast when a worker approval answer lands; the card's receipt says it * fix(native-chat): a worker approval card answers on click, as the chat's own prompt does The card turns into 'Allowed by you' at once and Claude's confirmation runs behind it; only an answer Claude did not take changes it to the real outcome, and a failure reopens the card. * fix(orchestration): keep main's stop-report index for the open-approval sweep after the re-land * fix(orchestration): final-review fixes for chat worker approvals - A click that gets approval_not_open no longer hides the card: the host's list decides, so a prompt the host still holds stays answerable. Only dispatch_inactive closes it locally. - The approvals stream watches only the orchestration database's own changes (Runs, Dispatches, mail), not terminal identity notices, so agent status and title changes cost it nothing in main. - Receipts are the chat's history: no 30-minute window, bounded by 100 rows with still-open prompts kept first. - The pinned stack is capped against the pane and gives way first, so the chat's own prompt keeps its room; a prompt that closes while shown stays pinned as its receipt for 4 s, and one only the worker's terminal can answer stays pinned. - A close no one named, after the worker's Dispatch ended, reads as worker-ended, and an unanswered close of an ended worker sends the coordinator no second notice. - The transcript's receipts keep one array until a receipt changes. * refactor(native-chat): a worker approval card waits on the host after a click instead of answering ahead of it Both buttons turn off and the clicked one shows a spinner until the answer returns; the host's list then turns the card into its receipt. Drops the client-side close and its reconciliation. * fix(native-chat): let the compiler memoize the worker approval answer handler
…dinator (re-land with fixes) (stablyai#41259) * revert: worker permission approvals (stablyai#40756) This reverts commit 818055f. The feature misbehaves in real use: an Allow on a worker's approval card was recorded as closed without an answer, and closed approval cards render at the bottom of the coordinator chat, below newer messages. Removed: the Claude PermissionRequest hook hold and its 130 s timeout, the approval card in the coordinator chat, `orchestration deny`, the approval payload on stop escalations, and the held-delivery lines on send receipts. Escalation text goes back to its pre-stablyai#40756 wording. Kept from later commits: - stablyai#40983 (lost-worker alerts): its `lost` reason, cause/leftover/settled fields, turnStartedAt and the rejected-report check stay; only the approval branches around them are removed. - stablyai#41158 (owner moves) and the test cleanups (stablyai#41151, stablyai#41175, stablyai#41177) only touched approval code that is now deleted. * feat(orchestration): answer workers' permission prompts from the coordinator (re-land of stablyai#40756) * fix(orchestration): credit an approval from Claude's own decision record and place each worker card at its time - An Allow that Claude took is answered by the person even when the command then fails or is still running; a failed command's PostToolUseFailure counts as ran. - Expired means the agent's own timeout only; a close Orca can't name is not an expiry, and reasonDelivered is true only with a reason. - Escalations wait for the dialog to paint and read Claude's warning even when a long command hides the top of its box. - Worker cards and receipts render after the message they followed in time, not after the whole conversation; the toast says what happened. * fix(native-chat): place timed rows without a memo the compiler skips * perf(orchestration): feed chat approvals from their own stream, pin open cards, close cards whose worker ended Native chats no longer subscribe to the crew stream for worker approvals. A narrow orchestration.workerApprovalsSubscribe stream per chat party wakes only on that party's own mail and on Run/Dispatch changes, never on agent status, and reads the crew only when the approval list itself changes. The pane no longer redraws for approvals: the transcript receipts and the pinned stack each hold the feed themselves. Open worker prompts are pinned above the composer (above the chat's own prompt), oldest first, in a bounded scrolling stack; the transcript keeps only receipts, at the time the worker asked. The countdown ticks only for open cards in a visible pane. An approval whose Dispatch is no longer running reads as closed ("No longer open · worker ended"); a hook that hangs up after its worker is gone closes as worker-ended rather than "answer it in the terminal"; and a click that finds the prompt or Dispatch already gone turns the card into its receipt at once. Also carries over: a stop owes a closing line only to an approval whose escalation went out. * fix(native-chat): no toast when a worker approval answer lands; the card's receipt says it * fix(native-chat): a worker approval card answers on click, as the chat's own prompt does The card turns into 'Allowed by you' at once and Claude's confirmation runs behind it; only an answer Claude did not take changes it to the real outcome, and a failure reopens the card. * fix(orchestration): keep main's stop-report index for the open-approval sweep after the re-land * fix(orchestration): final-review fixes for chat worker approvals - A click that gets approval_not_open no longer hides the card: the host's list decides, so a prompt the host still holds stays answerable. Only dispatch_inactive closes it locally. - The approvals stream watches only the orchestration database's own changes (Runs, Dispatches, mail), not terminal identity notices, so agent status and title changes cost it nothing in main. - Receipts are the chat's history: no 30-minute window, bounded by 100 rows with still-open prompts kept first. - The pinned stack is capped against the pane and gives way first, so the chat's own prompt keeps its room; a prompt that closes while shown stays pinned as its receipt for 4 s, and one only the worker's terminal can answer stays pinned. - A close no one named, after the worker's Dispatch ended, reads as worker-ended, and an unanswered close of an ended worker sends the coordinator no second notice. - The transcript's receipts keep one array until a receipt changes. * refactor(native-chat): a worker approval card waits on the host after a click instead of answering ahead of it Both buttons turn off and the clicked one shows a spinner until the answer returns; the host's list then turns the card into its receipt. Drops the client-side close and its reconciliation. * fix(native-chat): let the compiler memoize the worker approval answer handler (cherry picked from commit b8950a4)
ELI5
RPC and orchestration already have domain folders. This removes the remaining forwarding modules so callers import the code that owns each operation directly.
What Changed
Why
The parent directory layout is already implemented. These forwarding exports obscure the actual ownership boundaries; no additional file moves are justified by the current layout review. Worker and federation child scopes remain separate.
Linked Issue
Maintainer-requested module layout cleanup.
Visual Proof
N/A — no application visual or interaction change.
Testing
pnpm tc, lint and formatting pass..spec.tsargument is outside the unit include pattern and receives no standalone execution credit.pnpm check:changed --timeout=6 --maxWorkers=2passes all 24 non-test checks. The broad related-test selection times out at six minutes with no reported assertion/collection failures; this is an incomplete test result, not a pass. Focused owning-suite evidence is above; full hosted CI is required before merge.43028568665passes: all 12 unit shards, static analysis/typecheck, packages, relay integration and cross-version wire compatibility. Required aggregate passes. The actual checkout is0c61d49c, authenticated as this candidate plus native5796c30with zero path overlaps.Risk
Level: Low. Import evaluation is the primary risk for Electron and Orcad, including remote worker operations. The existing declaration bodies, registration arrays and state owners are preserved; independent entry and cycle audits pass. A plain revert restores the previous imports.
The retired test asserted CLI guidance copy, which repository policy forbids in touched tests. Its single case also covered own-Run mail selection, ambiguous-sender refusal, and cross-Run state/outstanding-delivery safety. This intentionally loses those checks; no equivalent replacement is claimed.
Review
Two independent source/ownership audits pass. Original D22/D35 identity provenance and existing-child obligations remain preserved; historical absences receive no new retirement credit.
Agent skill upstream boundary