Skip to content

Keep an earlier worker reply from completing a new delegation - #1061

Merged
Kuddev merged 2 commits into
mainfrom
fix/delegation-submission-1120
Nov 20, 2026
Merged

Kuddev merged 2 commits into
mainfrom
fix/delegation-submission-1120

Conversation

@Kuddev

@Kuddev Kuddev commented Nov 20, 2026

Copy link
Copy Markdown
Owner

A worker could finish an earlier turn while its next delegated prompt was queued. Pebrel then returned the earlier answer and discarded the new task. The runtime now checks the worker at registration and again in the UI update that writes the prompt. Only hooks received since that write can complete the task. A timed-out client can cancel a queued write, and a write failure releases the worker.

Adapted from @yjjheizhu's #919. The regression exercises busy and replaced workers, a delayed completion across submission, a timeout on either side of the write, and a failed write followed by another delegation. Both desktop adapters use the same submission check. Local architecture, formatting and diff checks passed. Native tests run in CI. The preceding callback change is tracked by #1060.

@github-actions github-actions Bot added the size/M 101–500 行 label Nov 20, 2026
@Kuddev
Kuddev merged commit 995dcc0 into main Nov 20, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M 101–500 行

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants