mirror of
https://github.com/stablyai/orca.git
synced 2026-11-13 17:37:40 +00:00
* fix(orchestration): steer mail notices into a busy native chat's running turn A native-chat coordinator's mail notice always queued as a card until the whole turn ended, so a coordinator busy in a long command never saw its workers' reports. Agents that take a message mid-turn (Claude, Codex, Pi) now get the notice at once; agents that would cancel their turn for it (ACP) still queue it. * fix(orchestration): drain mail that arrives while a notice is pending * fix(orchestration): native chats get each orchestration message whole instead of a check pointer Each mail message is sent to a native-chat agent as its own chat message, with the sender, type, subject, body, payload and exact reply command, and is marked read once the chat accepts it. Heartbeats are marked read, never sent. Mail an unacknowledged check batch holds stays with that batch. * fix(orchestration): keep the at-most-once gate's mail-lane assertions, exhaustive sender switch * Preserve native mail compatibility and drain delivery backlogs * Drain native mail with a finite ordered pass and scoped operation ownership * Bound mail formatting and honor accepted queue handoffs * Run the native mail tests that open SQLite in the Node runtime project * Preserve live mailbox ownership and recover full reports by id * Use a typed runtime client in inbox compatibility test * Preserve historical mail evidence and scope the test clock * Map historical structured-send evidence to the current test command * fix(orchestration): settle mail handoffs per message and recover interrupted consumers * Hold native chat mail until the chat is idle, as terminal mail waits A mail send admitted into a running turn cancels that turn for agents that cannot take a message mid-turn (ACP: Grok, OpenCode, OMP, Antigravity): the second of two reports cancelled the first before the agent saw it, and the first report cut off the turn carrying the person's answer. Mail now waits while the chat is working or a prompt waits on the person, for every agent, and goes out at the idle edge, one message per turn, oldest first. * test: cover idle orchestration report turns * fix: preserve independent mail authorization through grouped delivery * fix: preserve routed mail identity and private inbox state * test: bound mailbox query work on repeated delivery * fix(orchestration): consolidate terminal mail imports * Validate mailbox query rows and type delivery fixtures * Keep host forwarders typed and inline single-use mail evidence reader * Declare the mail handoff store method boundary * Preserve mailbox contracts across typed boundaries * Retain existing main cleanup row boundaries * Fix mailbox handoff fixtures and helper mail transfer * Name the mailbox fixture constructor type * test: complete mailbox dialog pane identity * Keep structured mail ordering and ownership current at claim * Bound mailbox preparation and immutable cohort selection * Consolidate structured mail contract fixtures * Consolidate duplicate mailbox imports * Fix mail handoff type contracts and deterministic test fixtures * Repair journal forwarding and align mail contract fixtures * Fix mailbox corpus message type inference * Correct personal provenance in ACP backlog fixtures * Correct ACP mail contract measurement and epoch wake fixtures * Retain full ACP contract diagnostic arguments * Restore reliability gate coverage and consolidate mail fixtures * Preserve unknown alias release coverage * Route native reports through the durable chat queue * Preserve exact legacy mail holds in queue lineage proof * Use ordinary queued messages for worker reports * Use semantic queue and check completion for report delivery * Record bounded queue recovery work and request cleanup proofs * Preserve report creation evidence and bounded source wakes * Preserve report source work and check ownership * Use ordinary report acceptance and incremental original history * Retire completed mail opportunities with their current owner * Retire routed source debt and complete joined mail contracts * Exercise Run typed peek through the command transport * Require the queued report submission in creator coverage * Restore database callback API and align queue contract fixtures * Fix empty legacy tab selection in restart fixtures * Keep relation heading assertions scoped to each report * Native chats receive each orchestration message whole, through the chat's own queue Each orchestration message to a chat session becomes one ordinary chat message carrying the whole message, sent with the chat's queue like a person's message: it waits behind running work or a question and the agent is handed one per turn. A per-message record keeps the send's operation id, so a restart finds the card instead of sending twice; the message is marked read once the agent is handed it, and a check that takes it first deletes the waiting card. A message too large for one chat message keeps today's pointer to check. Terminals are unchanged. * Test that chats get each message whole, queued like a person's message * Repeat a report the agent may not have taken only after a later turn or /clear A send the agent rejected or left unanswered stays unread for check and is handed over again only once a later turn ran or a /clear replaced its context, so edges alone never restart an agent that fails on every start. A send whose record a rewind dropped is sent again, and a send that throws is retried on the session's next journal edge. Tests follow chats getting each message whole. * Hand a chat orchestration mail only while it is still owed A queued mail card now runs only while its message is unread in its mailbox and that mailbox still belongs to the chat: the queue asks at handover and drops a stale card without a turn (abandoned or settled Dispatch, Run taken over by another chat, mail a check or reset took). Cleanup after check, moves, run-use, abandon, reset and worker release deletes those cards visibly and never holds the action up; mail still owed goes to the mailbox's current owner, and Orca's own deletion is never read as the person's. A send that may have reached the agent is never sent again; check keeps it. A send the agent proved it never got is sent once more, under a new id, only after a later turn or /clear ordered after that failure. A send recorded but never admitted is admitted under its own id. Each outstanding send is read by key, never by scanning the chat's history. A refusal no longer loses its retry when an edge arrives mid-send, and a coordinator refused for queue room gets its mail when the queue frees room. A chat worker's follow-up now takes its short Task first and then each moved message whole, with no check needed. The guide says a working worker gets mail when its turn ends. * Let the chat's host answer what became of each mail send, and let the person's cards pass mail Orca cannot decide on The chat's host now answers for each send by its id: the card first, then the send itself, then a gone card's handoff found by key, and only then the admission receipt, which alone can prove nothing was admitted. A receipt whose journal detail is gone is in doubt however old its id, so a renewed id can no longer send the same message twice. A rejected send is repeated once only after a different turn was actually handed over and accepted, or a /clear was made, after the rejection; the queue's admission cursor no longer stands in for that. No answer walks the conversation's history. The mailbox reserves each send and stamps the message delivered in one write before the host call, so a crash after admission never leaves it selectable again. A refusal before admission releases that exact reservation; every retirement and release is checked against the current attempt, and a record an older build saved without a stamp is repaired as it retires. A person's Delete consumes an oversized pointer's mail too. Who holds a mailbox is read from durable facts: a Run moved to a terminal, a released worker, another host or an ended chat makes a waiting card stale, so it is withdrawn without a turn and its mail released for the real owner. Only a fact that cannot be read holds a card; the person's own cards behind it go on, later mail stays behind it, and selection and the handover check use the same rule. When the owner can be read again the queue is woken. A Task or a person's edited card never opens the mail database. An explicit Send of such a card now says what happened. Parked mail is indexed by chat, wakes only that chat's mail, ignores streamed tokens, and drops the chat's journal watch with its last mailbox. Canonical session identity is reused per session store revision instead of rebuilt from every record on each check. Main's account-switch worker test now reads "unread and still owed". * Let the queue alone decide which card goes next, and wake a terminal given back its mail The queue now owns one rule for what can be handed over next, installed once on each chat's queue and read by the drain, the final handover check, queue publication and scheduling alike. Mail whose owner cannot be read keeps its place; the first of the person's own cards behind it goes instead. Held cards stay held, a returned, paused or edited card behind it still stops the queue, and later mail, from any mailbox, stays behind it. The rule walks only the queue's live cards, never its history. When nothing can be handed over nothing is published as next, so the chat reads as idle and /clear works; when the owner becomes readable again the queue is published and looked at again. Choosing and publishing the next card only reads custody; settling a stale card stays with the handover. Mail a chat gives back after its Run or worker moved goes through the runtime's own delivery, so a terminal owner is pointed at it. A chat's journal watch now lasts as long as it has mail parked, through its own redrives, so a publication that changes nothing the mail waits on starts no pass. Session identity is cached until a record joins, leaves or is cleared, not rebuilt after every admission. An explicit Send of mail whose owner cannot be read says Orca couldn't read the chat's saved state rather than that it restarted. * Find the person's next card past undecidable mail by walking only as far as it must, and ask mail authority only once nothing else stops a send * Say plainly when Orca can't confirm queued mail is still this chat's, and that the person can try again * Let parked mail's own watch be the only journal subscription for mail, and stop saving a send fence nothing reads * Count the queue's order reads with plain index getters instead of a reflected proxy * Read saved mail sends column by column, and build test fixtures as the types they stand for * Keep main's words for every other refused queued Send; only undecidable mail says its message wasn't sent * Let replay read the queue's handoff links, keep the host's last mail answer where the type can see it, and drop the removed test from the send gate * Keep the queue's possible next cards in order as each one changes, reuse the last pick until the queue moves, and look up a send by its id * Ask whether one chat's tab closed instead of listing every open tab to find it * Settle a mailbox's earlier mail only when something it waits on moved, republish a chat once per pass, clean up only the mail a check, abandon or move touched, and act on a chat's status only when it changes * Date the scaling test's extra tabs by the coordinator's recorded lease instead of the wall clock * Keep nothing in memory for a mailbox a cleanup finds with no owner and no send left, unless a pass on it is still running * Ask about a report whose send threw before handing over newer mail, under the id it was reserved with