Repository navigation
Conversation
Admit frozen settlement batches through Main-owned durable witnesses and independent execution segments. Fence provider dispatch and preserve proven pre-dispatch cleanup retries without replaying uncertain executions.
Reuse durable scope construction and identical phase checks. Preserve settlement scenarios, assertions and dispatch boundaries while sharing local test setup.
wen2zhou
force-pushed
the
fix/settlement-wake
branch
from
October 2, 2026 17:19
2c74b1c to
367c1f4
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Subagent completion has two distinct user-visible paths. A Main turn blocked in
host.delegate(..., { wait: true })remains active until all children finish, so the existing idle-settlement wake does not show each completion. The reported three-child OpenCode run followed that path and eventually persisted its final summary, but had no intermediate completion notices.Idle settlement also regressed after Main-owned durable admission was introduced. The original continuation lacked an admissible execution and independent usage identity. Review found two further missed cases: a retired runtime could consume an unsent notification, and a fast
sendMessagefollowup could finish before Main released its turn without being watched.Changes
This continues PR #3207 and incorporates current main, including terminal-persistence recovery and turn outcomes. It does not replace the delegation architecture, change
wait:truesemantics, or add a notification database.Validation
Final candidate:
1cdab8c25809b815c9b6125df076e4ae307e1ff6.OPEN_SCIENCE_E2E_PYTHONandCOMPUTE_TEST_SSH_ALIAS. This ran on the final production tree; the final commit only adds the new composition test to six architecture inventory assertions.The remaining local failure was independently reproduced on unmodified main
5609e9f07:shell-npm-environment.test.ts/shares win32 global tools across launches while keeping them outside disposable cachecompares/varwith its canonical/private/varpath on macOS. No timeout, skip or assertion was relaxed. The final-head GitHub PR Gate is running; CI Integrity has passed.Electron uses a deterministic OpenCode fixture for the provider and exercises real Host RPC, persistence, runtime admission and renderer. The new three-child case releases each child independently, checks that notices appear while Main stays active, verifies no extra Main prompt, then verifies the same Attempt rows after restart. Neighboring recovery, permission, reliable-message, background-result and Artifact/Task journeys are included.
Review
Six sequential
pr-review-toolkitpasses cover correctness, tests, error handling, comments, types and simplification. The review findings were fixed and independently re-reviewed: retain cold-restore context across retries and consume it only on current provider evidence; reject array-valued persisted enums; preserve safe diagnostic categories; correct a misplaced sanitizer comment. Production restoration wiring now has direct coverage. No high-confidence findings remain; the simplification pass recommended no architectural rewrite.