Skip to content

Set completed_by_worker_shutdown field in matching poll responses#9551

Open
rkannan82 wants to merge 2 commits intomainfrom
kannan/poll-shutdown-rejected-field
Open

Set completed_by_worker_shutdown field in matching poll responses#9551
rkannan82 wants to merge 2 commits intomainfrom
kannan/poll-shutdown-rejected-field

Conversation

@rkannan82
Copy link
Copy Markdown
Contributor

@rkannan82 rkannan82 commented Mar 17, 2026

What

Add completed_by_worker_shutdown bool field to matching-internal poll response protos. When matching detects a poll from a shut-down worker, it sets this field in the response. The field is not propagated to the public API — it's for internal debugging of the frontend-to-matching RPCs.

Why

Gives us visibility into whether matching is correctly rejecting re-polls from shut-down workers, without changing the public API.

How did you test it?

  • Unit tests in matching engine for the pollResult struct and completedByShutdown behavior.

Base automatically changed from kannan/shutdown-worker-poll-rejection to main March 23, 2026 17:17
@rkannan82 rkannan82 changed the title Add shutdown_worker_rejected field to poll responses Add completed_by_worker_shutdown field to poll responses Apr 10, 2026
@rkannan82 rkannan82 force-pushed the kannan/poll-shutdown-rejected-field branch from f8d8b48 to e13248f Compare April 10, 2026 22:53
@rkannan82 rkannan82 changed the title Add completed_by_worker_shutdown field to poll responses Set completed_by_worker_shutdown field in poll responses Apr 10, 2026
@rkannan82 rkannan82 force-pushed the kannan/poll-shutdown-rejected-field branch 2 times, most recently from 4a806ee to b2248b3 Compare April 10, 2026 23:10
@rkannan82 rkannan82 requested a review from dnr April 11, 2026 02:50
@rkannan82 rkannan82 marked this pull request as ready for review April 11, 2026 02:50
@rkannan82 rkannan82 requested review from a team as code owners April 11, 2026 02:50
@rkannan82 rkannan82 changed the title Set completed_by_worker_shutdown field in poll responses [DO_NOT_SUBMIT] Set completed_by_worker_shutdown field in poll responses Apr 11, 2026
Add `completed_by_worker_shutdown` bool field to the matching-internal
poll response protos (workflow, activity, nexus). Refactor `pollTask` to
return a `pollResult` struct so callers can propagate the shutdown signal
to the response. Frontend propagation to the public API is pending an
api dep bump.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Keep the field only on matching-internal protos for debugging.
SDK already knows not to repoll, so no need to propagate to the
public API at this time.

Also fix pre-existing bug in matching_engine_test.go where two
references to `task` were not renamed to `result.task`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@rkannan82 rkannan82 changed the title [DO_NOT_SUBMIT] Set completed_by_worker_shutdown field in poll responses Set completed_by_worker_shutdown field in matching poll responses Apr 16, 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