Repository navigation
fix(worker): deliver completed results to the coordinator once - #69
Merged
Merged
Conversation
mingtaojin
force-pushed
the
fix/worker-completion-notification
branch
from
November 20, 2026 11:47
4150452 to
2d35963
Compare
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.
Why
A Worker must deliver its completed work to its coordinator even without a task group or an owner report request. A turn final alone does not establish completion, so Workers now declare the deliverable before Runtime publishes it after that turn succeeds.
What changed
deliver_resultwith a stable result identity and trusted Thread and Turn binding.Scope
Tradeoffs
Workers must declare completed work explicitly. Forwarding every final would misclassify ordinary discussion; immediate publication could report completion before a later interruption.
Blast Radius
The new path reuses coordinator inbox delivery and uncertain-response reconciliation. Existing report and ordinary output tests remain in place, and a stable result ID prevents repeat publication across turns and restarts.
Verification
Rebase verification
Rebased onto main after PR #67. Base is
07e61da195583c1ab47b3b885c90e39570b42bad; head is2d35963c76053efaf25551d10b6e09fd092eae9d. The three author commits and prior verification notes above are retained.Resolved one import conflict in
src/project-runtime.tsand two lifecycle conflicts insrc/loop.ts. Both fixed Worker execution selection and pending-delivery invalidation remain. Invalidation precedes execution-identity early returns. The two test commits have identical patches after rebase. No feature scope changed.Fresh TypeScript check, build and full suite pass, 765/765 tests. The first test launch hit the macOS Unix socket path limit before running tests; the successful run uses a shorter Runtime-owned temporary directory. Final-head independent verification remains required before merge.