Repository navigation
Rust #325: close a run whose deadline passed when a task failure is reported - #926
Conversation
…eported A workflow task failure or history wait reported after the run or execution deadline acknowledged the report and left the run open (native had the same bypass as published 2.11.8, server#794). It now closes the run through the completion path's timeout and returns the completion's receipt for a timed-out run (409, outcome completed, run_status failed, reason run_timed_out), which PHP SDK 3.6.1 recognises. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Security review accepted exact head Verified from the exact diff and surrounding runtime paths:
Lab-safe checks: |
|
General bounded source review of exact I compared the changed native path and its receipt assertions with the actual registry-installed PHP SDK's This is a code/consumer-contract review. I did not build or run native Server locally. The owner's recorded SQLite suite is separate evidence; normal required CI, including row-locking backends, remains required. The wording correction from “exits on any other refusal” to the specific unrecognized |
|
Security follow-up on exact head This does not reveal a new security defect and does not revoke the exact-head Security acceptance. The required quality gate still blocks merge normally. Rust Server should route the failure and completion callers through one canonical behavior-preserving helper (or equivalent), then request a bounded review of the material new head. No rerun, dismissal, threshold change, or Security exception is requested. |
…aits Completions and failure reports both checked the run's deadlines and closed the run with the same timeout, commit and receipt. They now share close_expired_run, which hands the transaction back while the run is inside its deadlines (Sonar flagged the copy on #926). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
General bounded re-review accepts
This is source/diff review only. The owner's reported SQLite 7/7, library 383 and execution 668 results are separate evidence; I did not build or test native Server locally. Normal required CI and protected merge still apply. The published Rust SDK's separate history-wait receipt-handling gap is tracked in durable-workflow/sdk-rust#146 and does not change this native receipt's correctness. |
|
Security accepts the bounded refactor delta Verified:
Lab-safe |
|
CI note for ca3f456: |
|
CI note: on rerun, |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged |
|
|
Removed from the merge queue at 00:57 UTC (failed_checks, merge-group run 41367763841). Neither failure is in this PR's code. (1) |



Native had the same bypass General found in published 2.11.8 (server#794 finding). A workflow task failure or
WorkflowTaskWaitingForHistoryacknowledgement reported after the run or execution deadline was acknowledged, and the run stayed open. A reproducing test showed native answering200,recorded: true.Change (
rust/src/runtime/store.rs,fail_workflow_task): after the ownership guard, a failure report, waiting or not, on a run whose deadline has passed closes the run through the sametime_out_runthe completion path uses. The worker gets that path's receipt for a timed-out run:409,outcome: completed,recorded: false,run_id,run_status: failed,created_task_ids: [],reason: run_timed_out, and the originaltask_idandworkflow_task_attempt. Per General's #794 follow-up, PHP SDK 3.6.1 recognises this receipt and exits on awaiting_for_history-shaped refusal; Python 2.12.2 and Rust 4.10.1 handle either.Tests (
rust/tests/execution/run_deadlines.rs):WorkflowTimedOutof the righttimeout_kindand no open workflow task.Doc:
docs/rust-server-port.mdrecords this as a decision that differs from published 2.11.8 on purpose. It follows General's correction (c2b18fadand its #794 follow-up, unpublished); a parity fixture follows once a fixed PHP release exists.Checks run locally (SQLite): library 383 passed, execution 668 passed, 1 ignored. The new test failed before the fix. CI covers MySQL, MariaDB and PostgreSQL.
🤖 Generated with Claude Code