Skip to content

Negotiate replay-safe task delivery and retain uncertain acceptances - #219

Draft
rmcdaniel wants to merge 3 commits into
mainfrom
fix/526-task-delivery
Draft

rmcdaniel wants to merge 3 commits into
mainfrom
fix/526-task-delivery

Conversation

@rmcdaniel

@rmcdaniel rmcdaniel commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Worker polls can lose a response after the Server has claimed a task. The PHP client now negotiates Server offer/accept delivery, accepts one selected packet before exposing a task, and retains that exact request across uncertain responses and Client clones. Registration replacement fences old packets; explicit worker stops remain terminal. Servers without the capability retain the existing poll behavior.

Refs durable-workflow/server#526 and supporting Server draft durable-workflow/server#758. This PR remains draft while latest-head checks and the remaining delivery qualification run. It does not establish fixed published Server-image acceptance.

Validation: latest head 13700088131c74a00fb3b656eb5d2c1c8c543d5a passed all 41 checks with one intended skip. Hosted PHP 8.3: 2,858 tests / 14,911 assertions, 56 existing fixture-dependent skips; PHP 8.1/8.2/8.4 also passed. Local focused qualification: 106 tests / 488 assertions and PHPStan pass. Sonar has zero unresolved PR findings; both earlier maintainability findings were corrected without waiving rules.

Actual PHP SDK HTTP tests against two candidate PHP Servers with MySQL/Redis passed all three four-second idle polls through a three-second nginx proxy. Lost positive replies replayed the original workflow/activity/query claim after offer expiry and a normal heartbeat on the other replica, with attempt 1 and identical acceptance requests. An abandoned offer left a peer immediately able to claim. The query public consumer used a direct Server control route and received its completed result; worker polls stayed behind the short proxy. All disposable services/network/volumes were removed. HTTP checks used source 086b383; the later terminal-stop and classification changes are covered by the focused suite.

@sonarqubecloud

Copy link
Copy Markdown

This branch has not been deployed

No deployments
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