Skip to content

fix(orchestration): child updates use queued V2 notifications - #279

Merged
lukemaj merged 5 commits into
mainfrom
fix/stale-child-notices
Oct 14, 2026
Merged

lukemaj merged 5 commits into
mainfrom
fix/stale-child-notices

Conversation

@lukemaj

@lukemaj lukemaj commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

What: Stale-child observations and descendant updates to ancestor threads use queued V2 child notifications, visible to agents without user-message bubbles.
Why: Plain stale messages appeared as user input, child updates could steer the user's active turn, and fast completed samples shortened the silence allowance.
So what: Merged into main through PR #279, with Issue #269 closed and the isolated task resources retired.

Closes #269. Supports Drafters and Spectrum in the Objective. No versions changed.

The stale monitor reuses V2 notification delivery and its existing queued dispatch and receipt identity. Notices carry a timestamped historical observation, full detail and guidance to inspect current state. They never set terminal delegated-completion bookkeeping. Web and desktop use the existing expandable log row; mobile already renders this notification shape, with the full item available through its copy action.

The shared send owner handles agent sends from a descendant to an ordinary ancestor, including fork, delegated, mixed and soft-deleted intermediate parent links. auto and queue create an agent/server child notice behind active work. Explicit steer and restart are refused before dispatch. Other sends retain their existing behavior. The actual sender, full body, attachments, caller modes and retirement rules remain authoritative; Stopped ancestors stay stopped. Content leads the bounded summary, with full text or attachment names in detail. Receipt replay reports the original accepted delivery while returning current run status separately; settling may cancel a queued notice. Attachment intake releases copies for known pre-dispatch refusals and keeps them for uncertain commit outcomes.

Measured silence samples can raise thresholds but cannot reduce the 120-second first-token or 90-second gap floors. The existing strict 1.25 confirmation multiplier remains, so the default triggers are above 150 and 112.5 seconds. Per-alert evidence shows the reported Sol and Grok turns waited about 52.5 and 120.2 seconds for their first reply, with no earlier recorded agent tool call. Internal reasoning remains unknown. The completed sample populations underrepresented those waits; no missing-tool or newer-run suppression fix is supported. Longer healthy waits can still produce advisory observations.

Upstream-first investigation selected the existing V2 notification seam after reading upstream main and merged #17723's complete diff. #73 concerns the older title-based monitor; current V2 uses run and attempt identity. Opus final design and consumer audit, Sol design acceptance and Grok design acceptance follow revisions for ancestry failures, immutable receipt facts, attachment claims, caller/mode limits, stopped threads and ACP background state. The existing notification guard and ACP predicate remain unchanged.

Validation

Candidate: 444fa4d225439d06ef98a2449ebe459c5d6619fb, base 9b495751dc20e01077aae2a7c2481f403673645d. Source dependencies #267 and #282 are merged; current main includes #243 and peer-links #290; both are base, outside this PR diff. Worktree: fix/stale-child-notices on bestia; main stays read-only.

  • 216 focused tests pass in ten files on the source immediately before its final two-line test-mock commit; Sol independently reproduced these on the clean exact head and added two link-origin and two ACP cases (220 passed), including all56 current-main launch cases and the original 160-case set. After test-loop/generic fixture cleanup, the affected owner/intake files also passed (34 cases). Two targeted ACP wake cases pass; their source is unchanged by the fixture correction/rebase. No added test uses sleeps or polling.
  • Five stale regressions and nine intended ancestor regressions failed before their corresponding implementation. An invalid attachment fixture was corrected and is not counted as a valid red case.
  • Real V2 persistence and effect-worker tests prove queued provider-bound text and attachments, no user-message item, no steering/interruption of a capable active user turn, unchanged running tools and pending question, caller/mode limits, ordinary-send positive controls, immutable retry delivery, genuine settle cancellation and post-commit replay. Fakes sit at the external provider boundary; no live provider behavior is claimed.
  • The ACP test places an agent/server notice between native background completions and proves the original wake state survives. Existing Spectrum text-send proof preserves its provider-less transcript path.
  • Targeted server, web and client-runtime typechecks and changed-file lint pass. Lint warnings are on unchanged ACP/web lines. Fork Stack Model and the 35-feature inventory pass after registering the attachment guidance. CI owns complete-suite proof; no repo-wide local checks ran. Sol r5 and CI exposed an existing queue-attribution fixture with an uncreated sender; the fixture now creates a real unrelated sender, preserves every assertion and passes all53 launch tests. Fresh combined proof passes216/216 on this peer-linked base. Both R6 reviews and the full gate passed on b7, but main advanced at merge and caused a conflict. That attempt did not merge. Sol R7 ACCEPT and Grok R7 success approve this exact head; current CI and all three authenticated review statuses passed before merge. Earlier verdicts remain historical. The rebase preserves feat(server): delegate work across linked environments #290 peer behavior; only same-environment tool wording and two unused peer-service test mocks adapt this PR. Opus current peer-consumer audit accepts the unchanged local design.

Commands use Node 24.13.1 and pnpm 11.10.0 via npx -y -p node@24.13.1 -p pnpm@11.10.0 -c 'pnpm exec ...':

vp test run apps/server/src/orchestration-v2/ThreadLaunchService.test.ts apps/server/src/orchestration-v2/ThreadManagementService.ancestorDelivery.test.ts apps/server/src/orchestration-v2/ThreadMessageIntake.test.ts apps/server/src/mcp/OrchestratorMcpToolkit.integration.test.ts apps/server/src/prism/staleTurnDetector.test.ts apps/server/src/prism/staleTurnMonitor.integration.test.ts apps/server/src/prism/streamClock.test.ts packages/client-runtime/src/state/threadWorkflows.test.ts apps/mobile/src/lib/threadActivity.test.ts apps/server/src/spectrum/mcpSend.integration.test.ts
vp test run apps/server/src/orchestration-v2/Adapters/AcpAdapterV2.test.ts -t 'staggered pre-settle completion keeps|recognizes only the orchestrator-injected'
tsc --noEmit -p apps/server/tsconfig.json
tsc --noEmit -p apps/web/tsconfig.json
tsc --noEmit -p packages/client-runtime/tsconfig.json
vp lint <16 changed TypeScript files>
bash scripts/fork-check.sh

Limits: Spectrum transcript text keeps its existing no-provider path and transcript rendering; Spectrum attachment sends have a separate pre-existing receipt defect tracked in #293. Mobile notification-feed tests pass, but no native device or live provider session was run. Explicit ancestor modes are rejected even on a reused key. Existing caller/permission/archive/ancestry prechecks can refuse a late retry. Attachment sends have no retry key. Website/SEO impact: none; no public site, URL or marketing change.

Delivery

Merged at2026-10-14T13:53:06Z as f823ce7009b06c09b409e14a0bf9e5d77013a440, parent ddf32f8ab8b3ec4fc2e486ec13af3957039fdbb4. That later base contains unrelated ContextMD #288; its paths and contract changes were inspected, its checks pass, and the notice delivery paths are unchanged. The verified squash tree d7e60ca5a203d2bfbada90b0ddf1f870e749f84d exactly matches the conflict-free merge-tree checked before admission. Final admission and proof limits. At admission26 checks/statuses passed,4 intentionally skipped, none pending/failed. Issue #269 closed at13:53:08Z.

Own clean worktree and local/remote fix/stale-child-notices branch are removed. The captured dev process family was already gone after the interruption; its ports14853/6813 are free and no unrelated PID was signaled. Owned preview is closed/absent and owned review/design children were stopped through task_cancel, preserving results. Copied fixture databases are removed; proof logs remain outside the repository for audit. Main checkout, other worktrees and live userdata were not changed by this task. No version bump, release, deployment, native-device or live-provider verification is claimed. #293 and #287 remain separate open work.

Client evidence

Isolated worktree server, seeded from a pruned read-only snapshot of real data. Synthetic projection fixtures prove rendering, separately from persisted backend tests. Providers were not started for the fixtures. Live userdata was never opened read-write or used as server state. The new ancestor before/after/detail images were captured and uploaded on 1eef038 before the final fixture repair; their rendering source and seeded inputs are identical on this candidate; text and attachment detail expand, and the sender action opens the exact child.

Before: two stale notices as queued user-message bubbles

After: compact child observations

After: expanded historical detail

Elon record

Requirements and who asked: The planner's 2026-10-14 decision requires V2 child-result messaging and rendering, planner visibility, false-alarm evidence, Opus design with Sol/Grok critiques, focused proof, screenshots, exact-head independent reviews and merge; the user added non-interrupting descendant-to-ancestor updates.
Deleted: New messaging infrastructure, forged terminal completion state, MCP provenance/schema and ACP production changes, failure-delay policy, busy-parent deferral, per-effort calibration, blanket newer-run suppression, native client changes, version bumps and unrelated fixes.
Bottleneck: The delivery owner and immutable acceptance facts now have persisted-event proof; the verified merge and resource retirement complete the outcome.
Checked myself: Read upstream source and #73, exact alert events and healthy samples, both critiques, the full integrated diff and its consumers; inspected the 216-test run, 34 affected reruns, two ACP cases, typechecks, lint, complete fork inventory and the actual isolated client with uploaded screenshots and child navigation.

Implementation: Codex gpt-6.1-sol, max reasoning, Codex harness. Design: Claude Opus 5.5, Claude Code. Required independent reviewers: Codex gpt-6.1-sol and Grok grok-4.7.

@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:M labels Oct 14, 2026
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 20.9 KiB 20.9 KiB 0 B (0.0%) 29.3 KiB ✅
Codex Live turn messages 2 2 0 (0.0%) 8 ✅
Claude Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 21.2 KiB 21.2 KiB 0 B (0.0%) 29.3 KiB ✅
Claude Live turn messages 2 2 0 (0.0%) 8 ✅

Baseline: 9b49575 · PR result: 444fa4d · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@lukemaj
lukemaj force-pushed the fix/stale-child-notices branch from 279aa76 to 8f1bde9 Compare October 14, 2026 08:27
@lukemaj

lukemaj commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

What: Head 8f1bde9939049a80a801e4b5ac08d9c0fcd09cc6 registers the new client queue regression under the existing stale-detector fork owner.
Why: Fork Stack Model correctly rejected packages/client-runtime/src/state/threadWorkflows.test.ts because its new carried edit was missing from the allowlist and owner inventory.
So what: Fresh Sol and Grok independent reviews and CI target this updated head; the superseded review rounds are stopped.

The fix changes only docs/fork-features.md and scripts/fork-upstream-edits.txt. Production code, behavior tests, screenshot content and the selected design are unchanged. The inventory validator reports fork-features: OK (32 features). Full fork-stack check and focused tests are running on the updated commit. Neither interrupted review produced a final verdict; Sol had inspected production paths/test assertions and the expanded-detail screenshot, while Grok had loaded the design and was about to inspect the diff.

Requirements and who asked: The repository's fork-stack model requires every carried upstream edit to have one registered owner, alongside the planner's exact-head review requirement.
Deleted: No extra runtime changes or unrelated inventory edits.
Bottleneck: Missing ownership registration for the new regression file, now corrected.
Checked myself: Read the failing CI log, confirmed this was its only failure, inspected the inventory schema and verified the 32-feature owner check after the two-file correction.

@lukemaj
lukemaj force-pushed the fix/stale-child-notices branch from 8f1bde9 to 058c73e Compare October 14, 2026 08:39
@lukemaj

lukemaj commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

What: Independent Sol code review round 2 finds no blocking defect in candidate 058c73e9b22f5ea5332d8375434154e5c137ee45.
Why: The change reuses the validated V2 notification path, preserves queue and terminal-result ownership, and prevents measured samples from shortening the existing silence allowance.
So what: Post review/independent-sol success for this exact candidate; the #269 owner still owes the per-alert event diagnosis, and the planner owns the other review and CI gates.

Reviewed head: 058c73e9b22f5ea5332d8375434154e5c137ee45.
Intended and live PR base: main at 918e78f67c4e13701e44db44fb3fdb6a1be8c30a.
Verdict: PASS, no supported blocking findings in the inspected scope. No verdict transfers from either interrupted round on an older candidate.

Read the complete owning Issue and PR, the initial Opus design, Sol REVISE, Opus revision, Grok REVISE and final selected design. Inspected the entire eight-file diff and the notification validation/projection, queued-run ordering, receipt replay, settlement, stream-clock identity/tool handling, adapter prompt paths, client queue filter, web log row/detail and mobile feed/navigation consumers. This supports Drafters and Spectrum in the current Objective.

Prior findings adjudicated on this candidate

  • Sol B1 / Grok failure pause: resolved. staleTurnMonitor.ts retains the original catch, interruption propagation and next-sweep retry. No failure-delay policy was added.
  • Sol B2: resolved. The summary uses past observation wording. Full text and detail include the detection timestamp, watched run/attempt, last event, and a current-state check. The effect-worker test completes the child first, receives its terminal result before the queued notice, captures the exact notice input at the adapter boundary, and verifies unchanged terminal task and completion-message state after the notice finishes.
  • Sol B3 / Grok held and settled notes: resolved. The persisted tests distinguish a held queued notice cancelled by settlement from a later notice that unsettles an already-settled parent. Started notifications remain active work under the existing orchestrator rules.
  • Sol B4: resolved. The added test runs the real V2 effect worker with a fake external adapter, asserts the child is running when the notice queues, and observes notification turn items without a user-message item. A separate test invokes the actual client queue helpers. A fresh monitor instance replays the stable command receipt and leaves one message and one run.
  • Grok busy-parent deferral: rejection remains justified. The concrete completion-before-notice path is exercised. A timestamped advisory remains accurate after completion and cannot overwrite terminal cohort bookkeeping. I found no reachable defect that requires a new parent-busy delivery policy; the notice has no delegatedCompletion and cannot enter the completion-steering branch.
  • Other design concerns: resolved or accepted limits. Web chooses the existing log row only for linked updated notifications with nonempty detail, preserving ordinary updated and terminal cards. The unsupported Claude updated-notification example is absent. The caution works without a delegated task ID. Run/attempt, retirement, pending-input and open-tool guards remain. The healthy low-sample 157-second gap can still trigger an advisory under the accepted 90-second floor and 1.25 multiplier.
  • Fork inventory failure: resolved. The new client regression is registered in the existing stale-detector owner and upstream-edit allowlist. Those two inventory edits add no runtime behavior.

Proof and coverage limits

I inspected the test source and the supplied candidate-bound proof identity/logs, including the five failing-before regression oracles and the final 122/122 tests across detector, monitor, stream clock, client workflows and mobile feed. The assertions distinguish the intended fix from the original implementation. Timing uses TestClock, worker drains and event milestones, with no sleeps as success conditions. The targeted server/web/client-runtime typecheck logs contain no errors; lint warnings are on unchanged web lines. I did not rerun tests or modify any database or repository file under the review-only restriction.

I visually inspected the before, compact-after and expanded-detail screenshots. They show the user bubbles/queue before and child log rows/full historical detail afterward. These are rendering fixtures on the owner's isolated copied-data client, not proof of backend transitions; the persisted fake-adapter test supplies that separate proof. Desktop uses web. Native mobile was not driven: its existing notification summary/child navigation is supported by source and feed tests, not a device screenshot. Adapter source retains server-created wake text for Codex, Claude, Cursor, OpenCode and the ACP path used by Grok/Antigravity; real provider acceptance was not exercised. No new RPC, contract, Settings entry point or connection-specific path is introduced. This review is not a complete CI or live-provider gate.

Non-blocking evidence gap: The final sanitized per-alert event diagnosis for the 07:04:36.975Z Sol #245 and 07:08:42.617Z Grok #256 observations is not yet on #269. I cannot conclude whether either interval missed an MCP tool lifecycle event or identify internal reasoning from silence. The planner explicitly directed this review to finish on code merits and record this gap. It does not invalidate the floor correction: the original arithmetic permits the supplied ~37-second intervals to trigger, while the new floor and regression tests independently reject those intervals. The open-tool suppression and identity fencing are preserved and covered separately. To close the diagnosis gap, the owner should record the ordered events for each exact run/attempt through notice and first reply, show matching tool lifecycle events or their bounded absence, and distinguish absent provider emission from clock/ingestion loss where evidence permits. No new software change is recommended without that evidence.

Remote PR head and base were reverified before publication; the task worktree remained clean.

Requirements and who asked: The user's #269 outcome requires existing V2 child notices, full parent-agent detail, no user bubble, queue/dedup/retirement safety, false-alarm investigation and independent exact-head review.
Deleted: No new component, notification channel, terminal metadata, retry delay, busy-parent policy, calibration schema, native client edit, version bump or unrelated work is needed for this candidate.
Bottleneck: Review the real persisted delivery and temporal semantics; those are demonstrated, while historical event diagnosis remains the owner's separate evidence gap.
Checked myself: Read the complete diff/design record and relevant consumers at the pinned SHA, inspected behavioral assertions and red/green logs, visually inspected all three screenshots, and verified exact live PR identity and clean Git state.

Review by Codex gpt-6.1-sol, high reasoning effort, Codex harness.

@lukemaj lukemaj changed the title fix(prism): stale-child notices use V2 child delivery fix(orchestration): child updates use queued V2 notifications Oct 14, 2026
@lukemaj

lukemaj commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

What: Sol round 3 passes the implemented stale-notice scope and requests ancestor-design revisions.
Why: Fork scope, replay delivery truth, ACP wake evidence and content-bearing client summaries need correction; the ancestor addition is absent from this head.
So what: Full findings and required changes precede build and a fresh exact-head integrated review; PR #279 is not ready.

Reviewed head: 058c73e9b22f5ea5332d8375434154e5c137ee45, base 918e78f67c4e13701e44db44fb3fdb6a1be8c30a. review/independent-sol is failure for the full added outcome, not a stale-code defect. The planner owns the aggregate gate.

Requirements and who asked: The user requires separate stale-code and ancestor-design verdicts, then integrated implementation and fresh review.
Deleted: No unimplemented-outcome success or transferred prior verdict.
Bottleneck: Revised design and #256 ownership dependency before integrated build.
Checked myself: The full linked record contains pinned source traces, inspected proof and explicit limits; live head was reverified.

Codex gpt-6.1-sol, high reasoning effort, Codex harness.

@lukemaj

lukemaj commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

Grok review of 058c73e9b22f5ea5332d8375434154e5c137ee45: stale-notice slice passes; the ancestor-update design needs revision and is not in this head. Integrated PR is not ready. Findings: #269 (comment)

@lukemaj

lukemaj commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

What: Recovery Sol review: A stale implementation PASS, B selected ancestor design ACCEPT, C integrated PR NOT READY at 058c73e9b22f5ea5332d8375434154e5c137ee45.
Why: The existing agent/server notice protocol clears the earlier ACP design objection, but this head still lacks the ancestor-send addition.
So what: Root implements and proves the addition after source-owner integration, then dispatches fresh exact-head reviews; review/independent-sol remains failure for the full outcome.

Exact base: 918e78f67c4e13701e44db44fb3fdb6a1be8c30a. Local/live PR head matched before review and before posting. Full records, complete eight-file diff and relevant consumers were inspected; no prior verdict transferred.

A. PASS, implemented stale slice only: no supported blocking finding. Historical agent/server child notices retain stable receipt identity, queued delivery, full provider text, notification projection and exclusion from the user queue without delegated-completion metadata. The inspected real worker/fake-adapter test demonstrates completion overtaking the notice and unchanged terminal bookkeeping. Existing retirement/pending/attempt/tool/suspend guards and the 120 s/90 s floors with strict 1.25 trigger remain. The healthy 157 s advisory gap is an accepted limit.

B. ACCEPT, design only: accept root's selected server-owned notice, full-lineage ancestry, typed pre-dispatch mode/ancestry failures, original stored-event delivery separate from current status, content-first/attachment-only summaries and claim handling. I independently found no consumer requiring an MCP-labelled generated notice and withdraw that earlier requirement. Sender identity and the MCP receipt remain; existing ACP wake preservation already applies. Add the independently verified Stopped-fork-ancestor refusal to the retained retirement proof. Spectrum remains its existing no-provider transcript branch with its stated display limit. Full rationale and proof obligations are in the full Issue findings.

C. NOT READY: the addition is absent, so these scoped verdicts do not approve the integrated outcome or a future SHA. Required integrated handler/intake/provider/receipt/attachment/steer-capable proof and fresh code reviews remain.

Evidence limits: inspected the SHA marker, 122/122 focused-test summary, five intended red failures, targeted typecheck logs without error diagnostics, unchanged-line lint warnings, test assertions and all three supplied images. No tests or product sessions executed by this reviewer. Images are isolated rendering fixtures, not backend/provider proof; native mobile and live providers were not driven. The local fork log prints an older commit, although relevant inventory/check files are unchanged; current-head Fork Stack Model and other executed CI checks are green. Bare local logs do not independently capture exit codes. No repository/DB edits, launches, subdelegation or planner-thread message.

Requirements and who asked: The user's #269 recovery brief requires separate current-slice/design/full-outcome verdicts, truthful proof and the exact-head reviewer record before status.
Deleted: Unsupported MCP-labelled notice requirement and its guard/adapter changes; no invented current-code defect for the missing addition, transferred verdict, version bump or unrelated work.
Bottleneck: Implement and prove the ancestor addition, then obtain fresh exact-head review; current CI cannot test missing code.
Checked myself: Read the full requested records/diff and relevant consumers, independently checked source provenance and replay/retirement, inspected owner proof artifacts/images and verified exact local/live head and CI.

Reviewer: Codex gpt-6.1-sol, HIGH reasoning effort, Codex harness.

@lukemaj

lukemaj commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

What: The stale-notice slice at 058c73e9b22f5ea5332d8375434154e5c137ee45 passes, and the revised server-owned ancestor design can be built as selected.
Why: This head contains only the stale-notice change. No in-repo consumer requires the generated ancestor notice to be labelled mcp; the existing guard and ACP wake predicate already accept createdBy: "agent" with creationSource: "server".
So what: Rebase onto current main and build the ancestor addition in this PR, then run a new exact-head review. This status stays failure for the full outcome. Root owns review/independent.

Reviewed head 058c73e9b22f5ea5332d8375434154e5c137ee45, base 918e78f67c4e13701e44db44fb3fdb6a1be8c30a. Live PR head matched before this comment. Worktree clean and even with origin. Selection: #269 (comment). Prior r3 verdicts do not transfer.

A. Existing stale slice: PASS

The eight-file diff matches the stale design at #269 (comment).

  • Detector floors are 120000 ms before the first token and 90000 ms between output. The 1.25 trigger is unchanged. thresholdSource is measured only when the measured value is above the floor (staleTurnDetector.ts).
  • The monitor dispatches one queue_after_active message with createdBy: "agent", creationSource: "server", a child-linked updated notification, full historical text, and no delegatedCompletion. notified runs only after dispatch (staleTurnMonitor.ts).
  • Web sends updated plus nonempty detail to the existing log row (MessagesTimeline.tsx).
  • getUserQueuedThreadRuns hides any message with notification set. The new client test uses the persisted notice shape.
  • The effect-worker test queues the notice while the child is running, lets the completion start first, checks exact notice text on startTurn, a notification item, no user_message for that id, and an unchanged terminal task. The fake adapter sets supportsActiveSteering: false. steerTurn dying is a backstop. The stale command itself is queue_after_active.
  • Diagnosis Deliver child notices and ancestor updates through V2 notifications #269 (comment) supports the floors. A healthy 157-second low-sample gap can still notify. Stale-worker monitor misidentifies Prism jobs by title #73 stays the separate title-identity issue. This monitor has no title match. Upstream record Deliver child notices and ancestor updates through V2 notifications #269 (comment): reuse the existing notification seam. I did not re-fetch upstream 30d1010.

The agent text omits the child title that the design string included. The summary has the title and the text has the thread id.

B. Revised ancestor design: ACCEPT

No required revision. Root's server-owned notice is the shape to build.

Independent creationSource check, on this head, outside tests:

  • Notification guard (Orchestrator.ts around 4757) accepts agent plus server or provider, and only queue_after_active. mcp fails that guard.
  • acpIsAppOwnedWakeTurn is createdBy === "agent" && creationSource === "server" (AcpAdapterV2.ts 1342). mcp clears the ACP wake marks.
  • explicitMessage treats mcp without a notification as resume-capable (retirement.ts 89). A server notification is not explicit, so a stopped target is refused and the commit rolls back. The same request key can succeed after resume.
  • Claude, OpenCode2, and Muse test provider. Wight and Prism retry admission do not match this notice. Web and mobile attribution read creationSource on user bubbles. Mobile feed titles use item.summary (threadActivity.ts 592) and set notification detail to null.

No consumer requires the generated notice to be mcp. Keeping server avoids the ACP-loss path and leaves the guard and predicate unchanged. senderThreadId, notification.source.childThreadId, and the caller's existing command id remain the sender and receipt identity. Text command ids already start with command:mcp:. Attachment ids stay whatever newCommandId() already returns.

The rest of the selection holds against this source:

  • Forks and subagents keep the source rootThreadId (ThreadForkService.ts 98, SubagentProjection.ts 72). Different roots stay ordinary sends. The same-root walk must follow both relations, include soft-deleted rows, and fail closed on a missing row, read error, or cycle.
  • Idle queue_after_active creates run.created with status starting and starts. A blocking run creates status queued. Delivery stays that original status. Current status is already a separate MCP field and may later be terminal. A missing matching run.created is ThreadManagementDurableRunProjectionError. The optional-chaining one-liner in Deliver child notices and ancestor updates through V2 notifications #269 (comment) would report started when the event is absent. Follow the selected rule instead.
  • The current user-message lookup in sendToThread would false-fail an idle notification, because the projected item type is notification. The selected check replaces that lookup with the persisted notice, absent delegatedCompletion, and run.userMessageId.
  • Explicit ancestor steer and restart are refused in the owner before orchestrator.dispatch, so no receipt is written and a later auto with the same key can still send. A later steer after an accepted auto refuses and leaves the notice.
  • New pre-dispatch tags join the management union, threadManagementFailure, and dispatchWasNotAccepted. Ambiguous post-commit errors, including the durable projection error, keep claimed files. The attachment tool keeps no retry key and no delivery field.
  • Spectrum text still returns in SpectrumMcpSend before the owner, with delivery: "transcript" and no provider effect. Record that row's existing user-message display. Attachment sends do not use that early return. The Spectrum command interceptor still appends a transcript and emits no provider effect and no run.created. Do not claim the attachment tool returns delivery: "transcript".
  • Stopped fork ancestors stay stopped because the notice is not an explicit message. That refusal is selected and needs the proof row already stated. Spectrum text can still resume a retired Spectrum, because that preserved branch remains an explicit mcp send.

C. Integrated PR: NOT READY

sendToThread still has no notification field and still auto-steers an active target. The ancestor outcome is absent. #282 merged as 7b00574 and #267 merged as current main bcc4db86. Neither squash is contained in this head. I compared the #267 pull-request head with this head: the sendToThread result body is unchanged there. Implementation is a rebase onto main plus the bounded owner, intake, MCP mapping, and tool-text change. This review does not approve that future head.

Proof inspected, not executed

Inspected proof-head.txt (this SHA), final-tests.log (5 files, 122 passed, 10:37:15), red-tests.log (5 failed tests: 3 detector, 2 monitor), typecheck logs with no error TS lines, lint warnings on unchanged MessagesTimeline.tsx lines, and fork-check.log ending fork-check: OK. I did not rerun them. CI on this head was green apart from the independent review statuses. I did not rerun CI.

Images are isolated seeded fixtures. Before shows two queued user bubbles with the old silence text. After shows two compact "Silence observed" rows with Open subagent. The detail image expands the historical notice. They are rendering evidence. The persisted worker test is the delivery evidence. No native device, live provider, or live database was driven in this round.

Elon record

Requirements and who asked: The user requires child observations and descendant updates as agent-visible notices, with no user bubbles and no steering of a user turn, reviewed again on this head after the restart. Root selected the server-owned notice unless a concrete consumer requires mcp.
Deleted: An mcp label on the generated notice, guard and ACP edits, a status-window delivery table, and a second Spectrum messaging path. Also deleted: treating this head as the integrated outcome.
Bottleneck: The ancestor policy is still unbuilt. #267 and #282 are on main, and this branch does not contain them.
Checked myself: Read the selected design, the stale diff, the diagnosis, and the upstream note. Traced creationSource consumers, the notification guard, ACP predicate, receipt rollback, fork root, Spectrum intercept, and attachment claim release on this head. Inspected the proof logs and three images. Did not rerun tests, CI, a browser, or the live database.

Reviewer: Grok grok-4.7, high effort. Status context review/independent-grok only.

@lukemaj
lukemaj force-pushed the fix/stale-child-notices branch from 058c73e to d2518e5 Compare October 14, 2026 12:02
@github-actions github-actions Bot added size:L and removed size:M labels Oct 14, 2026
@lukemaj

lukemaj commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

What: Descendant text and attachment-only updates render as expandable child notices, with their actual sender link and full detail.
Why: The prior MCP text update rendered as a “Sent by another agent / Steer” user-message bubble.
So what: Review the integrated candidate 1eef038fdf78c8a1ca8c6f5152662de764d4dca2; merge still requires both independent exact-head verdicts and current CI.

Before/after use synthetic rendering projections in a pruned copy of real data under this task's isolated worktree .t3. No live userdata write or provider launch. The after images were captured from the actual web client on this head. Desktop shares that timeline; mobile has separate passing notification-feed proof, without a native device session.

Observed: the text preview and attachment count/name appear in child rows; expanding shows the complete body and Attachments: proof.png; the sender action opens the exact child route. No user-message bubble remains for either fixture. Persisted V2/effect-worker tests separately prove queuing and provider-bound delivery without interrupting the active user's run, tools or pending question.

Before: child text update appears as a Steer user-message bubble

After: text and attachment-only updates appear as child notices

After: expanded full text and attachment detail

@lukemaj

lukemaj commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

What: Fresh integrated Sol review requests one correction at 1eef038fdf78c8a1ca8c6f5152662de764d4dca2: repair the existing sender-attribution test fixture broken by the new ancestry check.
Why: The fixture supplies an uncreated sender, so required CI and an independent focused reproduction fail with ThreadManagementAncestryUnavailableError.
So what: Root creates a real unrelated sender in that fixture, preserves its attribution assertions, reruns affected proof and obtains review of the resulting candidate before merging.

Reviewed exact head 1eef038fdf78c8a1ca8c6f5152662de764d4dca2 against requested base bcc4db86b85a841d21f6772c5c91129bcd1d29cc. Local and live PR head matched before review and publication; the clean branch is even with origin. The complete 18-file pinned diff and gh pr diff are byte-identical. Live main has advanced to 8f939c24ea898e7600c9c93892cb3ad63ad88686; this verdict remains bound to the requested comparison. No prior slice/design verdict transferred.

Blocking finding

B1 [P2]: Create the sender used by the existing queue-attribution fixture. Location: ThreadLaunchService.test.ts:371-404, reached through the new sender read at ThreadManagementService.ts:681.

The test launches only thread:automation:queue, then sends with senderThreadId: thread:agent-sender, without ever creating that sender. Before this change the service simply persisted the ID. The new authoritative ancestry read correctly refuses the missing record before dispatch, so the test cannot reach its queued-message, text, scheduled-task and sender-attribution assertions. This is the sole failing test in Test Server 3 on this exact candidate, and causes the required Check failure. It is causally introduced by this PR, not an identical-main failure.

I independently reproduced it with supported Node 24.13.1 / pnpm 11.10.0:

npx -y -p node@24.13.1 -p pnpm@11.10.0 -c 'pnpm exec vp test run apps/server/src/orchestration-v2/ThreadLaunchService.test.ts -t "retains automation and sender attribution"'

Exit code 1: 1 failed, 52 intentionally skipped. Decisive error: ThreadManagementAncestryUnavailableError: Unable to determine whether thread thread:automation:queue is an ancestor of thread:agent-sender. Cause: ProjectionStoreThreadNotFoundError for thread:agent-sender.

Smallest correction: create a real unrelated sender in this fixture, then retain all its existing attribution assertions. Do not remove the test or weaken the fail-closed policy to accept unknown ancestry. No production behavior defect is established by this invalid fixture, but the integrated candidate cannot pass the required gate until it is updated.

Integrated implementation assessment

No additional supported blocking finding in the inspected production paths. I read the full Issue/PR and retained decision/diagnosis records, the complete diff, and surrounding text/attachment callers, provenance and permission checks, lineage creators and canonical record reads, receipt replay, notification projection, queue ordering/settlement/retirement, provider-turn input, ACP wake predicate and web/mobile consumers.

  • The shared owner follows fork/subagent/mixed parent links through soft-deleted records. Root/self/different-root handling matches the selected contract; missing reads and cycles fail before dispatch. Ancestor auto/queue emits agent/server notifications; explicit steer/restart refuses before receipt acceptance. Unrelated, sibling, self, parent-to-child and no-sender controls remain ordinary.
  • Notice receipts use matching original run.created events, validate persisted notification/run/message identity, and keep original delivery separate from current status. The genuine settle-cancellation and ambiguous committed-response tests inspect durable state and single-message/run replay. No delegated-completion result or terminal bookkeeping is forged.
  • Real MCP text and attachment handlers reach this owner. The steer-capable adapter positive control actually steers an ordinary send; ancestor sends produce no steer/interrupt calls and preserve the active user run, attempt, provider turn, running tool and pending question. The worker delivers full body and claimed attachment bytes/metadata at the provider boundary, and projects notifications without user items. New strictly pre-dispatch failures release new claimed copies; uncertain post-commit failures retain them.
  • Stale notices retain stable identity, dispatch-success-only notification marking, historical wording and existing guards. Completion priority is preserved and the later historical notice leaves terminal task/result state unchanged. The 120000/90000 ms floors and strict 1.25 trigger match the supported false-alarm diagnosis. Internal reasoning remains unknown; the accepted healthy 157-second advisory limit remains. Stale-worker monitor misidentifies Prism jobs by title #73 is the separate legacy title-identity problem. The upstream record, pinned upstream notification guard and merged #17723 diff support reuse of the existing seam without a broad port.
  • Web/desktop use the existing expandable log row for updated child notices with detail. Mobile uses meaningful content-first summaries, sender navigation and full-item copy. ACP production is unchanged; the added test inserts an agent/server notice between native background completions and retains the final continuation offer. Caller liveness, mode ceilings, client actor stamping and Stopped-ancestor refusal remain authoritative. Spectrum text keeps its earlier provider-less transcript branch; no Spectrum attachment receipt fix is claimed.

Proof executed and limits

Independently executed the PR's nine-file focused command under Node 24.13.1 / pnpm 11.10.0: 160/160 passed, exit 0, including actual V2 persistence/effect-worker, owner/intake/MCP, detector/clock, client-runtime, mobile feed and Spectrum text tests. Independently executed the two targeted ACP cases: 2 passed, 115 intentionally skipped, exit 0. The additional B1 reproduction fails as recorded above. No repo-wide local checks ran.

Inspected the supplied final 160-test, 34-owner/intake and ACP logs, intended red-case evidence, targeted typecheck output with no error diagnostics, changed-file lint with warnings on unchanged lines, and final fork inventory ending fork-features: OK (34 features) / fork-check: OK. Those owner logs are inspected evidence; my test exit codes are independent observations. Current CI has successful build/lint/typecheck/web/other server shards, but Test Server 3 and Check fail as above. This is not a complete merge-readiness verdict.

Visually inspected all six supplied local before/after/detail images. They show old user bubbles, compact stale/text/attachment notice rows and expanded historical/text detail. These are synthetic rendering fixtures on isolated copied data, not coherent backend event fixtures or live-provider proof. I did not drive a browser, native desktop/mobile client, provider or live database, and did not independently repeat the historical raw-stream/DB diagnosis. Shared-web desktop behavior and mobile source/feed proof have those limits. No source/data edits, servers, worktrees, memory writes, subdelegation or planner-thread messages were made.

Requirements and who asked: The user's #269 review brief requires stale and descendant-to-ancestor queued notices, no user bubbles or active-turn interruption, preserved receipt/permissions/retirement/ACP state, truthful focused proof and an exact-head individual status before root's merge gate.
Deleted: No new transport, forged completion, provenance widening, source repair by the reviewer, version bump, unrelated work, or inherited approval. The invalid sender fixture is not evidence to remove fail-closed ancestry.
Bottleneck: The required CI attribution test needs a real sender fixture, followed by affected proof and exact-candidate review; the inspected delivery mechanisms and focused behavior tests otherwise pass.
Checked myself: Read the complete pinned/live-identical diff and retained records, traced the relevant runtime and client boundaries, inspected proof/images, independently passed 160 focused and two ACP tests, reproduced the exact CI failure and reverified clean local/live head.

Verdict: REVISE, one blocking fixture correction. Publish failure only for review/independent-sol on this exact SHA. Root owns the aggregate, merge and any later candidate.

Reviewer: Codex gpt-6.1-sol, high reasoning effort, Codex harness; independent of implementation authorship.

@lukemaj

lukemaj commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

What: The Sol integrated review of 1eef038fdf78c8a1ca8c6f5152662de764d4dca2 against bcc4db86b85a841d21f6772c5c91129bcd1d29cc is superseded for the next candidate.
Why: Root confirmed the independently reproduced queue-attribution fixture failure and will create a real unrelated sender while preserving the original assertions.
So what: Pinned findings and review/independent-sol: failure remain evidence for this SHA only; the forthcoming head requires a fresh review and receives no approval from this round.

No source changes by this reviewer. All other inspected production paths had no supported blocking finding; 160 focused tests and two ACP cases independently passed, while the one attribution test independently failed. This does not predict the replacement candidate's result.

@lukemaj
lukemaj force-pushed the fix/stale-child-notices branch from 1eef038 to b7ae5aa Compare October 14, 2026 12:26
@lukemaj

lukemaj commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

What: The independent Grok review of 1eef038fdf78c8a1ca8c6f5152662de764d4dca2 is superseded and is not a pass.
Why: The live PR head moved to b7ae5aa7c1b3180af7ce785b3fceb36ef5d09e58 before this review finished a verdict.
So what: This note does not approve b7ae5aa or any later head. A fresh review has to start on the exact new SHA.

Reviewed candidate: 1eef038fdf78c8a1ca8c6f5152662de764d4dca2. Requested base: bcc4db86b85a841d21f6772c5c91129bcd1d29cc. At publication, gh pr view 279 reports head b7ae5aa7c1b3180af7ce785b3fceb36ef5d09e58 and GitHub base ref 8f939c24ea898e7600c9c93892cb3ad63ad88686. The requested comparison base stays bcc4db86.

Verdict

Superseded. No blocking finding is adopted as a finished verdict, and no success is granted. The replacement head was not reviewed.

Observed on 1eef before the move

CI run 38561110201, Test Server 3, log /home/luke/scratch/chromeria-269/ci-server3.log: 1 failed, 1699 passed, 1 skipped. The only failure is src/orchestration-v2/ThreadLaunchService.test.ts > retains automation and sender attribution while a message waits in the queue.

The fixture calls sendToThread with createdBy: "agent", mode: "queue", and senderThreadId thread:agent-sender, and never creates that thread. The sender read in ThreadManagementService.ts fails with ProjectionStoreThreadNotFoundError, which is mapped to ThreadManagementAncestryUnavailableError at line 672. The attribution assertions never run.

On that same SHA, MCP send sets senderThreadId only from a loaded parent thread, scheduled-task dispatch uses createdBy: "system" and no sender, and worktree continuation uses createdBy: "agent" and no sender. Those callers do not use an uncreated sender id. That limits the red test to the fixture. It is not a finished product-defect verdict, and it does not clear the rest of the diff.

Receipt replay, deleted-row ancestry, client and mobile rendering, and the ACP wake proof were not finished. Nothing in this comment transfers to b7ae5aa7c1b3180af7ce785b3fceb36ef5d09e58.

Elon record

Requirements and who asked: The user required an independent Grok review of exact head 1eef038, then required that review to be marked superseded when the head moves, without approving the replacement.
Deleted: A pass of 1eef038, a review of b7ae5aa, and a product-design finding that every missing sender id is a production bug.
Bottleneck: The live head changed before a finished verdict.
Checked myself: Live gh pr view head b7ae5aa7c1b3180af7ce785b3fceb36ef5d09e58; the Server 3 log shows that single fixture failure; the MCP, scheduled, and worktree send sites were read on the 1eef038 sources.

Reviewer: Grok grok-4.7, high. Status context: review/independent-grok only.

@lukemaj

lukemaj commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

What: Independent Sol R6 review accepts the complete integrated implementation at b7ae5aa7c1b3180af7ce785b3fceb36ef5d09e58, with no supported blocking finding.
Why: The ancestor policy, stale-notice delivery and repaired launch fixture satisfy the inspected contracts and independent focused tests.
So what: Root combines this exact-head individual verdict with the other review and current CI before the authorized merge.

Reviewed head b7ae5aa7c1b3180af7ce785b3fceb36ef5d09e58 against base 8f939c24ea898e7600c9c93892cb3ad63ad88686. The clean local branch and live PR identities match. Read the complete current 19-file pinned diff and gh pr diff; they are byte-identical. This is a fresh whole-outcome review, independent of implementation authorship. No old verdict transfers.

Findings

No supported blocking findings remain. The R5 fixture finding is cleared: the existing queue-attribution test now creates its real unrelated sender through the launch helper before sending. All previous delivery, scheduled-task, sender and text assertions remain. The fail-closed production ancestry policy is unchanged. All 53 launch tests independently pass within the combined suite.

Integrated behavior checked

  • Ancestor ownership and ancestry: The shared ThreadManagementService.sendToThread handles both text and attachment intake. Agent sends with an actual different sender read canonical records, use the selected root shortcuts and walk all parent links, including fork/subagent/mixed ancestry and soft-deleted intermediates. Same-root missing records, read failures and cycles are typed pre-dispatch failures. Self, sibling, unrelated, parent-to-child and no-sender controls preserve ordinary behavior.
  • Active-turn safety and authority: Ancestor auto/queue uses a real agent/server notification and queue_after_active; explicit steer/restart fails before dispatch, including reused keys. The existing notification guard does not widen. MCP caller liveness, client provenance stamping, target mode checks and dispatch-time ceilings remain. The real MCP integration reaches a steer-capable fake adapter, proves the parent user run/attempt/provider turn, running tool and pending question stay unchanged, and records no ancestor steer/interrupt calls. Its ordinary parent-to-child control actually steers. A fork descendant cannot revive its Stopped ancestor.
  • Durable receipt and claims: Original delivery comes from the matching receipt's run.created, with persisted notification, absent delegated completion and matching message/run identity validated. Current status remains separate. Tests check true settle cancellation, original queued delivery on replay, immutable body after sender rename/replacement text, missing receipt event failure and ambiguous committed-response replay without duplicate message/run. Existing prechecks can refuse late retries. Strictly pre-dispatch ancestry/mode errors release newly claimed attachment copies; ambiguous post-commit errors retain them. Attachment sends retain their existing lack of retry key.
  • Provider and terminal state: Full text and attachments reach provider-turn input, with actual sender identity. The real attachment handler/intake proof checks claimed bytes and metadata. Persisted turn items are notifications without user-message items. Neither path forges delegated completion or changes task result/terminal bookkeeping. The stale-delivery test lets the child's terminal result arrive first, then delivers the older historical notice and verifies the terminal task/result remains identical.
  • Stale evidence and limits: Stable notice identity, successful-dispatch-only marking, attempt/run fencing, pending requests, open tools, suspension and retirement guards remain. Historical wording supplies observation time and current-state guidance. The 120000/90000 ms floors and unchanged strict 1.25 trigger match the recorded two first-reply false alarms. The sanitized per-alert evidence establishes unstreamed first-reply waits and underrepresented completed samples; it does not establish internal reasoning or a missed MCP lifecycle. Longer healthy waits, including the accepted 157-second advisory case, can still notify. Stale-worker monitor misidentifies Prism jobs by title #73 is the separate legacy title-identity defect; current V2 uses run/attempt identity. I inspected its Issue, the upstream-first record and merged upstream #17723's complete diff; the existing notification seam avoids its unrelated restart/protocol changes.
  • Consumers and surfaces: Web/desktop routes updated child notifications with detail into the existing expandable work-log row while retaining the other child-card branch. Shared queue helpers exclude notification runs from the user's queue. Mobile keeps content-first summary, child navigation and full-item long-press copy, without claiming native expansion. The provider input retains agent/server provenance; ACP's existing app-owned-wake predicate preserves native completion marks and buffered evidence. The added ACP sequence inserts a notice between background completions and still offers exactly one continuation. No ACP production change is needed. Spectrum text keeps its earlier no-provider transcript branch. Spectrum attachment acknowledgement remains a separate pre-existing defect tracked in Spectrum attachment sends append before failing the ordinary run receipt #293, outside this PR.

Independent execution and proof limits

Executed on this exact head with Node 24.13.1 and pnpm 11.10.0:

npx -y -p node@24.13.1 -p pnpm@11.10.0 -c 'pnpm exec vp test run apps/server/src/orchestration-v2/ThreadLaunchService.test.ts apps/server/src/orchestration-v2/ThreadManagementService.ancestorDelivery.test.ts apps/server/src/orchestration-v2/ThreadMessageIntake.test.ts apps/server/src/mcp/OrchestratorMcpToolkit.integration.test.ts apps/server/src/prism/staleTurnDetector.test.ts apps/server/src/prism/staleTurnMonitor.integration.test.ts apps/server/src/prism/streamClock.test.ts packages/client-runtime/src/state/threadWorkflows.test.ts apps/mobile/src/lib/threadActivity.test.ts apps/server/src/spectrum/mcpSend.integration.test.ts'

213/213 passed in 10 files, exit 0. This includes all 53 launch cases and the original 160-case set. Reviewer log: /tmp/chromeria-279-sol-r6-tests.log.

npx -y -p node@24.13.1 -p pnpm@11.10.0 -c 'pnpm exec vp test run apps/server/src/orchestration-v2/Adapters/AcpAdapterV2.test.ts -t "staggered pre-settle completion keeps|recognizes only the orchestrator-injected"'

2 passed, 115 intentionally skipped, exit 0. Reviewer log: /tmp/chromeria-279-sol-r6-acp.log. No repo-wide local checks ran. Tests use persisted milestones, worker drain, queues and Deferred rather than added sleeps/polling. Fakes delimit the external provider boundary; these tests do not prove live-provider acceptance.

Inspected the owner proof logs, including the rebased 213-test run, targeted server typecheck, earlier owner/intake and ACP runs, changed-file lint and final fork inventory ending fork-features: OK (34 features) / fork-check: OK. Historical red output shows the five intended stale failures and nine valid ancestor failures; the invalid attachment-ID setup is excluded. Owner static logs are inspected evidence, not independently rerun static checks. Current live check-run records bind successful Check, build, lint, typecheck, web and all six server test shards, release smoke and Fork Stack Model to this SHA; skipped native/preview jobs are not executed proof.

Visually inspected all six supplied before/after/detail images. They show the old user bubbles and new compact stale/text/attachment rows with expanded historical/body/name detail. These are synthetic rendering projections in isolated copied data, separate from persisted backend tests. The ancestor images retain their original 1eef038fdf78c8a1ca8c6f5152662de764d4dca2 capture identity. Comparing that head to this one confirms only the three-line launch fixture repair plus main's two ContextMD files changed; rendering source is unchanged. I did not independently drive sender navigation, a browser, desktop/mobile client, provider or live database, or repeat raw-stream/live-DB alert diagnosis. Those limits remain explicit.

No source/data edits, branch changes, worktrees, servers, memory writes, permission changes, additional delegation or planner/parent messages. No versions, deployment or unrelated repairs. This supports Drafters and Spectrum in the loaded Objective, without widening the task.

Requirements and who asked: The user's #269/R6 review requires stale and descendant-to-ancestor agent notices, no user bubbles or active-turn interruption, preserved ancestry/receipt/attachment/authority/retirement/ACP behavior, whole-diff exact-candidate review and truthful proof.
Deleted: No new transport, forged completion, provenance widening, weakened ancestry policy, reviewer source repair, inherited approval, version bump or unrelated fix. The three-line real-sender fixture is the smallest correction to R5's valid finding.
Bottleneck: This independent code gate is clear; root owns the other individual verdict, aggregate review status and final merge admission.
Checked myself: Read the full pinned/live-identical diff, Issue/PR and relevant retained records; traced callers, canonical ancestry, guards, receipts, queue/settlement/retirement, provider/ACP and client consumers; independently passed 213 focused plus two ACP cases, inspected logs and six images, and reverified exact live head/base and CI.

Verdict: ACCEPT, no supported blocking finding. Publish success only for review/independent-sol on the reviewed SHA. Root owns aggregation and merging.

Reviewer: Codex gpt-6.1-sol, high reasoning effort, Codex harness.

@lukemaj

lukemaj commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

Independent review (review/independent-grok) of b7ae5aa7c1b3180af7ce785b3fceb36ef5d09e58 against base 8f939c24ea898e7600c9c93892cb3ad63ad88686.

Blocking findings: none.

ThreadManagementService.sendToThread owns ancestor delivery. An agent send with a real sender in the same root becomes a V2 updated notification on queue_after_active, keeping the original sender, body, and attachments. Explicit steer and restart fail as ThreadManagementAncestorDeliveryModeError before dispatch, including a reused command. Same-root missing, unreadable, and cyclic ancestry fail as ThreadManagementAncestryUnavailableError and do not fall through to steer. Fork, subagent, and mixed chains, including soft-deleted intermediates, are read with getThreadRecords(id, []). Different roots, self, and a missing sender stay on the ordinary path. The b7 fixture launches that unrelated sender as its own root before the queue-attribution send, so the existing text and attribution assertions still cover an ordinary queue. Production source is unchanged in that commit. A stopped ancestor is not an explicit resume, so the notice does not revive it. Idle delivery is started from the original run.created event; an active user turn stays queued, and its running tool and pending question are left in place. The stored turn item is a notification. The web timeline shows it as an expandable work entry, with the sender opening the child thread. No user-message turn item is stored. Stale detection keeps the 120s and 90s floors and the strict 1.25 trigger, so the reported ~37s first-token gaps stay under the floor. A longer healthy gap can still notify. ACP production is unchanged; the added case keeps the outstanding native wake.

Proof limits: I did not re-run the suite. rebased-final-tests.log reports 213/213 at 14:27:13 and does not embed a SHA. Live CI on this head is green, including Test Server 3. The server typecheck log has suggestions only and no error TS lines. Fork check reports 34 features OK. Screenshot captures remain the earlier 1eef fixtures; the rendering source is unchanged on b7, and I did not re-open them. No live provider or native device session. Spectrum attachment receipt stays #293 and is not claimed here. This status does not aggregate review/independent.

@lukemaj

lukemaj commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

What: The complete child-notice and ancestor-update candidate passes both required independent reviews and CI on its exact head.
Why: The final sender-fixture correction cleared the valid Sol/CI finding while preserving the fail-closed ancestry policy and all original assertions.
So what: Root publishes the aggregate success and merges PR #279 into main under the planner's delegated authority, then retires only owned task resources.

Candidate b7ae5aa7c1b3180af7ce785b3fceb36ef5d09e58, base 8f939c24ea898e7600c9c93892cb3ad63ad88686.

  • Sol R6 ACCEPT, independently executed 213 focused and two ACP cases; newest review/independent-sol is success on this SHA, creator lukemaj.
  • Grok R6, no blocking findings; newest review/independent-grok is success on this SHA, creator lukemaj. Its inspected-log and original screenshot-identity limits remain explicit.
  • Both comments precede their success statuses. Both tasks are verified completed with no pending child runs. Earlier interrupted/limited/failing reviews remain historical and are not transferred.
  • Complete current CI passes all applicable build, lint, typecheck, web and six server shards, release smoke, labels and Fork Stack Model checks; native/preview skips remain unexecuted proof. No identical-main-failure exception is used.
  • Self-review, persisted-event proof, targeted checks and uploaded before/after/detail images satisfy the scoped behavior acceptance. Rendering source and fixture inputs did not change in the final test-only correction/rebase. No added sleeps or polling, versions or deployment.

The per-alert diagnosis remains supported: both observable silences awaited first replies, with no earlier recorded tool call; internal reasoning is unknown and completed healthy samples underrepresented the waits. Floors remain 120 seconds before first content and 90 seconds between content, with strict 1.25 confirmation. Descendant text/attachments queue as real child notices and cannot steer or restart ancestors. Historical stale observations do not forge completion state. Longer healthy waits can still produce advisories. The separate pre-existing Spectrum attachment receipt defect is #293.

Requirements and who asked: The user's confirmed #269 outcome and planner-delegated merge authority require both notice paths, truthful false-alarm evidence, revised Opus design, Sol/Grok critiques, focused client/backend proof and exact-head success before merge.
Deleted: New channels, forged terminal results, provenance/ACP production changes, blanket newer-run suppression, unrelated fixes, version bumps and inherited approval.
Bottleneck: Both independent verdicts and CI are clear; exact-target merge verification and owned-resource finalization remain.
Checked myself: Read both current findings and task results, verified exact-head status creators and comment/status order, inspected current CI, rechecked source/base/remote identity and retained proof/images.

@lukemaj
lukemaj force-pushed the fix/stale-child-notices branch from b7ae5aa to 444fa4d Compare October 14, 2026 13:08
@lukemaj

lukemaj commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

What: ACCEPT, with no supported blocking findings in the complete 19-file integrated diff at 444fa4d225439d06ef98a2449ebe459c5d6619fb against 9b495751dc20e01077aae2a7c2481f403673645d.
Why: Both notice paths reuse V2 queued notifications while preserving active turns, authoritative local ancestry, original receipts, attachment claims and existing access limits.
So what: This exact candidate passes review/independent-sol; root still owns the other independent verdict, aggregate admission and merge.

Fresh R7 independent review. I did not author this implementation. Read Issue #269, PR #279, the upstream-first/#73 and per-alert records, prior objections and the current peer audit; inspected the complete pinned diff using Git and gh pr diff, plus the surrounding dispatch/queue, projections, intake, MCP guards, provider input, ACP and client consumers.

No blocking findings. In particular:

  • Canonical local lineage includes fork/mixed ancestry and deleted intermediates. Read failures, missing records and cycles fail closed. Ancestor auto/queue sends cannot select native steering; explicit steer/restart fail before dispatch, including reused request keys. Other send directions retain their path.
  • Persisted agent/server notices retain the actual sender, complete text and attachment metadata. Their projected items are notifications, with no user-message bubble or user queue entry and no forged delegated-completion state. Web/desktop expose detail and sender navigation; mobile retains the notification activity and full detail.
  • Receipt replay takes original accepted delivery from the matching stored run.created, separately from current run status. Genuine settle cancellation and ambiguous post-commit replay are covered. Known pre-dispatch ancestry/mode failures release new claimed copies; uncertain outcomes retain them. Mode ceilings, live caller checks, archive and Stopped-ancestor rules remain.
  • Peer integration is consistent with the same-environment description. writesThreads/assertSameLink fence linked writes, assertNotLinked prevents linked work using this environment's forwarding, and remote terminal results use delegated completion. delegatedFrom is not local lineage. The two unused peer mocks only satisfy the new test-layer dependencies.
  • The three-line launch-fixture repair creates the previously nonexistent unrelated sender without weakening attribution assertions or fail-closed policy. ACP production and its agent/server wake predicate remain unchanged; the new notice between native background completions preserves the pending wake evidence.
  • Threshold floors repair the demonstrated short-sample alarms without a new failure delay, blanket newer-run suppression or unsupported missed-tool claim. Historical wording does not claim the child remains stalled or has completed.

Independent execution on this exact clean head, Node 24.13.1 / pnpm 11.10.0 via the requested npx launcher:

  1. Six server files: ancestorDelivery, ThreadMessageIntake, ThreadLaunchService, OrchestratorMcpToolkit integration, staleTurnDetector and staleTurnMonitor integration: 107 passed.
  2. streamClock, threadWorkflows, mobile threadActivity, Spectrum mcpSend integration and existing linkOrigin: 111 passed. Together, these reproduce the supplied 216/216 ten-file suite and add 2 link-origin cases.
  3. ACP filter staggered pre-settle completion keeps|recognizes only the orchestrator-injected: 2 passed, 115 intentionally skipped.
  4. Pinned git diff --check: pass. Inspected the supplied current static/fork logs and live CI, whose completed execution checks are successful with intentional skips. I did not rerun repo-wide checks.

Proof limits: provider adapters are faked at the external boundary; no live-provider, native-device or two-server run was performed. Inspected the retained before/after/detail images as historical synthetic rendering evidence, not current-head backend fixtures. Desktop shares web; mobile has feed-level proof. Internal reasoning in the original silent intervals remains unknown, and longer healthy waits can still produce advisories. Spectrum attachment acknowledgement remains the separately tracked pre-existing #293, with no coverage or repair claimed here. Source and relevant rendering inputs are unchanged from the retained capture identity; earlier verdicts were not transferred.

Requirements and who asked: The user's #269 outcome requires actionable stale notices and non-interrupting descendant text/attachment updates, plus this fresh exact-head independent coverage verdict.
Deleted: New messaging infrastructure, remote ancestry, forged terminal state, unrelated fixes, version bumps and inherited approval.
Bottleneck: Root's exact-candidate two-verdict admission and merge verification; this individual code review is complete.
Checked myself: Full 19-file diff and actual consumers, original diagnosis and upstream records, 220 passing focused cases, retained visual/static/fork evidence, clean pinned Git identity and live PR/CI identity.

Reviewer: Codex gpt-6.1-sol, high reasoning, Codex harness. Context: review/independent-sol.

@lukemaj

lukemaj commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

review/independent-grok on exact head 444fa4d225439d06ef98a2449ebe459c5d6619fb against base 9b495751dc20e01077aae2a7c2481f403673645d.

Blocking findings: none.

The integrated diff matches the selected ancestor contract. sendToThread applies the notice policy only for an agent sender with a real sender id and a different target. Different roots, self, and a missing sender id stay ordinary. The root shortcut and parent walk use records that include deleted rows. Same-root missing rows, unreadable payloads, and cycles fail closed, with no steer fallback. Fork, subagent, and mixed ancestry are included.

Ancestor auto and queue dispatch queue_after_active as an app-owned agent/server notification: actual senderThreadId, original attachments, content-first summary, full detail, outcome updated, and no delegatedCompletion. Explicit steer and restart are invalid_request before dispatch, including a reused key. The returned user turn item is null. Original delivery is the matching run.created receipt, kept separate from later run status, including settle cancellation. Known mode and ancestry refusals release new attachment claims. Ambiguous post-commit errors retain them. A stopped fork ancestor stays stopped. Mode ceilings still refuse before commit.

Stale notices use the same notification shape and historical wording. Floors stay 120000/90000 ms, measured samples scale by 1.5, and the 1.25 trigger is unchanged. A healthy long gap can still notify.

The t3_thread_send description keeps peer-environment forwarding and the same-environment descendant notice rule. Linked callers stay inside assertSameLink. Linked work cannot use this environment's own links. Remote terminal results stay on the delegated-completion mailbox. delegatedFrom is not local ancestry. The peer Layer.mock lines only supply unused services for the local MCP tests. The three-line launch fixture creates the unrelated sender and still requires the original queued text. Spectrum text keeps its transcript branch. Spectrum attachments stay #293, with no patch here. ACP production and the app-owned wake predicate are unchanged. Web routes updated notices with detail to the expandable work row and the child route. Mobile keeps notification activity rather than a user bubble.

Proof limits:

  • I did not re-run the suite. /home/luke/scratch/chromeria-269/peer-rebase-final-tests.log reports 216/216 in 10 files and finished at 15:00:52 +0200, about two and a half minutes before commit 444fa4d (15:03:31 +0200). That commit only adds the two unused peer mocks. The static log has suggestions and no error TS, and it also predates the SHA. peer-rebase-final-fork.log lists this SHA and ends fork-check OK. These scoped logs are not a complete gate.
  • At publication, the live check rollup on this SHA showed completed CI checks successful. EAS Preview, Deploy web preview, and Mobile Native Static Analysis were skipped. I did not run CI. Root still aggregates both verdicts before merge.
  • No live provider, two-server, or native-device run. Images retain the 1eef capture identity and are synthetic rendering fixtures. Desktop shares web. Longer healthy waits can still notify. That advisory limit remains.

Reviewer: Grok grok-4.7, high reasoning. Context: review/independent-grok.

@lukemaj

lukemaj commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

What: PR #279 is ready for the delegated squash merge into main at reviewed head 444fa4d225439d06ef98a2449ebe459c5d6619fb.
Why: Both independent exact-head reviews have no supported blockers, current CI is green, and current main merges cleanly without altering this PR's notice behavior.
So what: Root performs the authorized exact-head merge, verifies the result and Issue #269 closure, then retires only task-owned resources.

Sol R7 ACCEPT and Grok R7 success are complete with no pending child runs. The newest individual statuses on this SHA are success, created by authenticated lukemaj, with their respective PR comments posted before those statuses. No old-head verdict is reused. Sol independently ran220 focused cases; Grok inspected the full diff and consumers and did not rerun the suite.

Root's216-case run and static checks ran on the dirty candidate immediately before444 committed the already-tested two unused peer mock lines; the committed source matches that run. Sol independently reproduced the216 cases on the clean exact head and added2 link-origin and2 ACP cases. Fork-check passes on444 with35 features. Fresh CI on444 passes all23 applicable check runs,4 intentional skips; individual reviews are success and only the root aggregate is pending. CI owns complete-suite proof, no repo-wide local checks.

Source base was9b495751. Main advanced to ddf32f8ab8b3ec4fc2e486ec13af3957039fdbb4 through #288 while reviews ran. This is unrelated ContextMD Library/corpus code, glossary and its separate fork-inventory block. Read the changed file set and adjacent serving/state contract changes; no notice owner, guard, receipt, queue, adapter or client code changes. Current main's checks pass. The unchanged PR head is mergeable. git merge-tree --write-tree ddf32f8ab8b3ec4fc2e486ec13af3957039fdbb4 444fa4d225439d06ef98a2449ebe459c5d6619fb succeeds with tree d7e60ca5a203d2bfbada90b0ddf1f870e749f84d; differences from444 are exactly main's12 files, with both disjoint fork-inventory edits retained. No new head, source alteration, inherited review or combined-runtime proof is claimed. Current live head/base/readiness are rechecked immediately before merge.

Accepted outcome: server-owned V2 queued child notifications for stale observations and local descendant text/attachment updates; no active ancestor steer or user-message item, no forged completion. First-token/gap floors120000/90000ms, measured samples may raise them, strict1.25 trigger unchanged. Per-alert evidence explains both reported alarms; internal reasoning stays unknown and no missed MCP lifecycle or newer overlapping run is supported.

Retained uploaded images are historical synthetic rendering fixtures at1eef with unchanged rendering source/inputs. Real persisted backend tests prove delivery separately. No live-provider, native-device or two-server test, deployment, release or version change is claimed. Spectrum attachments remain separately tracked #293; ambient dev Serve inheritance remains #287. Cleanup will stop only the captured isolated dev process tree, cancel only owned review/design children, close the owned preview if still present and remove the clean exact task worktree/local and remote branch. Main checkout and other agents' work stay untouched.

Requirements and who asked: The user's #269 outcome requires actionable child notices and non-interrupting ancestor updates, proof/screenshots, Opus design with Sol/Grok critiques, both exact-head independent statuses and the delegated merge into main.
Deleted: A new channel, forged terminal bookkeeping, remote-ancestry infrastructure, unsupported clock/newer-run fixes, duplicate full local checks, unnecessary rebase of the unchanged reviewed head, versions and unrelated patches.
Bottleneck: Both required verdicts are complete; exact-head admission, merge-result verification and owned-resource retirement finish the outcome.
Checked myself: Source/range-diff, all current proof logs, both full published reviews and their comment/status timestamps and creators, current CI and main checks, current-base impact and the conflict-free expected merge tree, live PR identity and only269 closing linkage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deliver child notices and ancestor updates through V2 notifications

1 participant