Repository navigation
Agent status C1: keep child completion separate from the parent turn - #21053
brennanb2025 wants to merge 7 commits into
Conversation
Review and validation handoff — 2026-09-16Draft / not merge-ready. Published at the user's request before review/QA completion. Published head: What has been doneIndependent review-and-fix reported lifecycle reducer corrections and 19 conformance tests, node typecheck and changed-code quality passing at implementation be012b9. This validates the reducer seam, not full production integration. These are recorded worker/reviewer results from the stated revisions, not a fresh coordinator rerun, CI result, or blanket approval of today's PR head. Recovery/review workers used GPT-5.6 Sol xhigh; provider interruptions prevented some follow-up stages from finishing. What still needs to be doneProduction owner admission, provider ingress, restart/replay recovery and host replication remain unwired or dependent on other batches. Reconcile the C1/C2 shared reducer variants and latest main; finish integration, independent final-head review and fresh Electron QA. Before marking ready: address proven findings, reconcile current main and cross-batch overlap, complete independent review of the final diff, rerun relevant tests/typechecks/quality, and perform fresh manual Electron QA against that exact head. Use background/hidden CDP validation; unavailable auth/platform scenarios remain explicitly unverified. No successful final-head review or QA should be inferred from old report filenames or task completion labels. Related batch PRsC1: #21053 · C10: #21054 · C2: #21056 · C3: #21055 · C4: #21057 · C5: #21058 · C6: #21059 · C7: #21060 The remaining full-batch work stays open; opening this draft does not mark those requirements complete. |
|
Conflict/description update: head remains GitHub reports this PR mergeable, and local merge-tree checks were clean at that baseline and after the shared fetched ref advanced to descendant Fresh checks: focused lifecycle reducer test (19 passed), |
The root directory guard blocks new top-level entries. These two files are worker/review reports, not shipped artifacts; they stay as local untracked evidence instead.
…and latch integrity on the turn A recovery custody could only be released by an explicit expiry event from the producer that opened it. If that producer died, the turn stayed 'recovering' and every dispatch on it stayed 'unresolved' for the life of the process. The deadline is now re-derived on each event, so the obligation can die on its own. Settlement also consulted the integrity-issue ring, which is a bounded diagnostic collection that evicts its oldest entries. A correctness gate cannot live in an evictable ring, so the breach is now latched on the turn record and the ring stays purely diagnostic. Also stop stamping a new timestamp onto prior evidence when marking work unresolved: that produced a producer/event/time tuple that never occurred. Unresolved marking now carries the evidence that caused it.
|
Closing this draft from the September 14 agent-status plan. That plan was re-examined against current main and replaced. This branch conflicts with main, and its central work duplicated contracts that had already merged (the canonical status store and the child-work contract landed on 15–16 September). The replacement work is being done as smaller root-cause PRs, each planned, challenged and reviewed first. |
When a coding agent launches a child task or leaves a background job running, the child finishing must not make Orca say the whole parent task is finished. This draft adds the shared rules needed to keep the parent turn, finite child tasks, long-running background work, interrupt acknowledgement, and automation completion separate.
This is a foundation only. It is not connected to live agent events or any desktop, CLI, or mobile reader yet, so it does not fix the visible false-completion symptoms on its own.
User-facing before / after
Before this PR: Orca's status paths have no shared data model that can say “the parent turn ended, but its monitor is still running” or “a child ended, but this automation has not.” A pane-level
donereport can therefore be mistaken for completion of unrelated work.After this PR: shared code can represent and test those facts independently. A child completion updates that child; resident background work can outlive the foreground turn; a dispatch needs its own receipt before settlement; lost contact remains
unverifiable; and recovery expires or is explicitly abandoned instead of retrying forever.What users will see now: no standalone UI change. Provider event ingestion and production ownership still need to be connected before the sidebar, notifications, automations, CLI, or mobile app can use this result.
Issue records
No issue is fully fixed or closed by this PR. The reducer directly models the lifecycle distinctions needed by these verified reports, but production wiring and provider-specific acceptance tests remain open:
codex execexit must not settle its automation.These records are related but still require separate work: STA-6666 is a reproduction-first check of structured Claude interrupt behavior; STA-1761 also needs child-row cleanup and navigation; STA-7182 is a future announcement, not a status-engine fix.
Why this mechanism
The reducer keeps facts separate and only combines them when a caller asks a specific question. That is safer than adding another provider-specific “keep working” exception, draining every child before a parent may finish, or extending a timer: those approaches still cannot tell which execution or turn an event belongs to, and they either end unrelated work early or keep completed work alive indefinitely.
Events must name the execution host, run, attachment, and turn they belong to. Missing or incomplete evidence stays unknown. The lifecycle also gives every recovery obligation an exit through new evidence, a deadline, or explicit abandonment. This follows the existing execution-host ownership boundary, but it does not yet prove provider delivery, restart recovery, or remote replication.
Scope, dependencies, and remaining work
origin/mainat383c543e0f6651a6c2d99ecca5ab43fbedd1bee8. A final merge simulation was also clean after the shared fetched ref advanced to descendant36cdb34097a7075718abe41c29d559101841166a; no unnecessary merge commit was added.Validation at this revision
Freshly run at
7c0d9907a1789a536237ca51e7ce2c20fab45010:ORCA_BACKGROUND_LAUNCH=1 pnpm test src/shared/agent-turn-lifecycle-reducer.test.ts— 19 tests passed.ORCA_BACKGROUND_LAUNCH=1 pnpm tc:node— passed.ORCA_BACKGROUND_LAUNCH=1 pnpm run check:code-quality:changed— passed with zero new findings across 13 changed code files.git diff --checkalso ran and reports a pre-existing extra blank line at the end of the committedAGENT_STATUS_C1_REVIEW.md; no product conflict markers were found.These checks support functional correctness of the reducer itself. They are not independent review, production integration proof, remote mixed-version validation, or Electron/mobile QA. The existing root-directory CI guard is still failing, and the final production-integrated head still needs independent review plus background/hidden Electron QA if it introduces a rendered flow.
Draft status
Draft / not merge-ready. The reducer-level review findings were fixed, but production ownership, delivery, lifecycle cleanup, restart recovery, remote compatibility, and reader integration remain open. Opening and updating this PR does not mark the C1 issue group complete.