Skip to content

Report leased and empty poll statuses like the worker protocol - #509

Merged
rmcdaniel merged 3 commits into
mainfrom
rust-325-poll-status
Oct 20, 2026
Merged

rmcdaniel merged 3 commits into
mainfrom
rust-325-poll-status

Conversation

@rmcdaniel

Copy link
Copy Markdown
Member

Part of #325.

Native reported poll_status: "task" on a claim and "timeout" on an empty poll. The worker protocol (resources/platform-protocol-specs/worker-protocol-api.openapi.yaml) requires const: leased on a workflow task claim. Published PHP 2.5.14 and 2.8.0 report leased and empty for workflow, activity and query polls alike. Native now reports the same two values for all three kinds. The task_queue_changed wake hint and every refusal status are unchanged.

A raw query-poll probe against published PHP 2.8.0 and native showed this difference directly (see #499). No published SDK branches on these two values: the Rust SDK checks only stop, unavailable and capacity statuses, and passes the field through to callers.

The cross-kind poll contract, which accepted either claim status, now requires leased.

Tests

Three assertions in rust/tests/execution/cross_kind_poll.rs now expect leased and empty. At c4e37fd28 the full native suite passes on SQLite locally: 116 library tests (20 ignored) and 277 execution tests (1 ignored).

🤖 Generated with Claude Code

The worker protocol requires poll_status "leased" on a workflow task
claim, and published PHP (2.5.14 and 2.8) reports "leased" and "empty"
for workflow, activity and query polls alike. Native reported "task" and
"timeout". It now reports the same two values. The wake hint
task_queue_changed and every refusal status are unchanged.

The cross-kind poll contract, which accepted either claim status, now
requires "leased".

Part of #325.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rmcdaniel

Copy link
Copy Markdown
Member Author

Branch updated with main (295038c84). Main gained only scripts/perf and benchmarks/ changes since 726427f11, whose Shared Server fixtures run passed every job, so that parity result still covers this code; the duplicate run on the update is cancelled to save runners. Merging once the required PHPUnit check passes.

@sonarqubecloud

Copy link
Copy Markdown

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.

2 participants