Repository navigation
feat(orchestration): standing manager mailbox batches queued work founder-first - #239
Open
nullStack65 wants to merge 2 commits into
Open
nullStack65 wants to merge 2 commits into
nullStack65 wants to merge 2 commits into
Conversation
…nder-first Port plan_dequeue from closura-agent-config lane_event_routing.py (CLO-1303). On standing threads the starting turn answers every waiting plain-text agent message, the founder's message goes first and the CEO's second, founder and CEO messages steer turns they outrank, and a manager turn longer than 300 s is logged. The Home conformance JSON is vendored and hash-pinned. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
…t fixture (CLO-1303)
The "different model" case spread the plain `{ instanceId: "codex" }`
fixture over the run's model selection, so `instanceId` lost its
`ProviderInstanceId` brand and `effect-tsgo` rejected the runs array with
TS2322 at StandingMailbox.test.ts:158. Spread the run's own
`modelSelection` instead.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The standing manager threads (CEO, CTO, CoS and the other standing seats) work through their queue one message per turn, in arrival order. When a founder writes while ten agent reports are waiting, the founder waits behind all of them. This is Linear CLO-1303, the standing manager mailbox issue.
Behavior
On a thread with a standing persona (
thread.standingset):<queued-messages>section, each labeled with its sender role. They are stored on the starting run asmailboxentries, and their own queued runs are cancelled. This is the same mechanism and precedent as the existing digest fold.CEOis the CEO. Everything else is an agent.standing manager turn exceeded 300 secondswith thread, standing name, run, provider and seconds. It logs only; nothing else acts on it.Non-standing threads are unchanged: the roles map is
undefinedand every new branch is skipped.Port and conformance
StandingMailbox.planDequeueis a TypeScript port ofplan_dequeuein closura-agent-configscripts/lane_event_routing.py(PR 1507, commit 40e39541c6).laneEventRouting.conformance.jsonis a byte-for-byte copy of that repository'sconfig/lane-event-routing/conformance.json. The test pins its sha256, so drift fails CI. Every mailbox case (the ones withqueued) is asserted onturns,batch,digestandpreempt.Deliberate deviations from the pure plan
next_turndelivery classes.Queue-latency signal for
t3_wake_audit.pyNo new table.
orchestration_v2_projection_runsalready carries:requested_at$.startedAtcompleted_atprovider$.modelSelection.model$.userMessageId, whose prefix is the wake sourceA folded message's own run is cancelled without a start time. Its latency is in the starting run's new optional
$.mailbox[]entries (messageId,runId,senderRole,requestedAt), which pair with that run's$.startedAt. The run is stored as payload JSON, so this needs no migration.Related, not in this PR
No UI change.
Verification
vp test run src/orchestration-v2/StandingMailbox.test.ts(apps/server): 11 passed. This covers:vp run typecheck(apps/server): 0 errors.vp run check:changed origin/release/native-0.1.10:.github/scripts/set-*-version.cjs, plus unused exports inAgentOutputGate.ts,RemoteDelegation.tsandsecretRedaction.ts.Sidebar.logic.test.tsandbotOrgTree.test.ts, which are standing-avatar type errors.Prior art
Searched: t3code
orchestration-v2(digest fold,QueuedRunOrder,CommandPolicydelivery intent) and closura-agent-configscripts/lane_event_routing.py, 2026-11-27.digestFold/carriesDigest): reused as the pattern and the cancellation path. It cannot carry actionable messages, so it was extended rather than replaced.queuedRunsInDeliveryOrder: reused as the base order; the mailbox rank is a stable sort on top of it.resolveDeliveryIntent"auto": reused for preemption. No new steering path.plan_dequeueand its conformance JSON: ported, with the JSON vendored and hash-pinned rather than reimplemented.Deploy: fleet
Verify: on a standing thread, queue several agent messages and one typed message during a running turn. One turn should start with the typed message first and a
<queued-messages>block. The queued runs should be cancelled, and$.mailboxshould appear on the run inorchestration_v2_projection_runs.🤖 Generated with Claude Code