Skip to content

fix(worker): publish acknowledged group replies once - #66

Closed
mingtaojin wants to merge 1 commit into
mainfrom
fix/worker-group-reply-once
Closed

mingtaojin wants to merge 1 commit into
mainfrom
fix/worker-group-reply-once

Conversation

@mingtaojin

Copy link
Copy Markdown
Owner

Why

A Worker can publish an intermediate group report and then publish a paraphrased ordinary final for the same answer. The two paths use different outbox identities, so the group shows two messages. This change adds an explicit, trusted acknowledgement for a report that already contains the answer.

What changed

  • Bind report acknowledgements to the original task, Thread, Turn, task group, and report outbox target.
  • Suppress only the one final output explicitly acknowledged by that report. Preserve ordinary finals, new output IDs, steering replies, and native requests.
  • Persist report intent, delivery target, and acknowledgement resolution across retries and restarts. Update Worker guidance to use one publication path.

Scope

  • Covers the compliant report acknowledgement workflow through the native project tool and capability bridge.
  • Keeps legacy and unmarked report plus paraphrased final behavior unchanged. The Runtime does not infer semantic duplicates from prose.
  • Does not change coordinator dispatch, model selection, live messages, deployment, or service operations.

Blast Radius

Worker report and final delivery paths gain one explicit action and a pinned task group target. Malformed or stale acknowledgement state fails open, so a legitimate final remains deliverable.

Verification

  • npm run check
  • node --import tsx --test test/project-runtime.test.ts with 114 passing tests.
  • Focused fake-transport tests cover native and capability ingress, restart, steering, same-text separate outputs, malformed or foreign references, uncertain report delivery, and native request preservation.

@mingtaojin
mingtaojin force-pushed the fix/worker-group-reply-once branch from 82b8a93 to 72086d4 Compare November 20, 2026 08:19
@mingtaojin

Copy link
Copy Markdown
Owner Author

Superseded by merged PR70 (d8ff23e). Current main uses WorkerChatTurn and stable assistant-item delivery in src/loop.ts and src/worker-chat-turn.ts; the old report/acknowledge_report API is no longer present. Validation on current main passed: test/runtime.test.ts 37/37 and test/project-runtime.test.ts 90/90. The obsolete branch and worktree remain preserved.

@mingtaojin mingtaojin closed this Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant