Skip to content

Fix child completion wake-ups and handled-failure propagation - #494

Merged
rmcdaniel merged 6 commits into
mainfrom
fix/parallel-child-lost-wakeup
Sep 8, 2026
Merged

rmcdaniel merged 6 commits into
mainfrom
fix/parallel-child-lost-wakeup

Conversation

@rmcdaniel

@rmcdaniel rmcdaniel commented Sep 8, 2026

Copy link
Copy Markdown
Member

Problems

Addresses #493 and #495.

  • Concurrent embedded child completions could use different MySQL repeatable-read snapshots and leave an all() parent waiting with no resume task.
  • A child that handled an activity failure and completed could propagate historical failure metadata, violating the ChildRunCompleted contract and appending WorkflowFailed after WorkflowCompleted.

Changes

  • Persist each child outcome under the parent lock before the parallel barrier, using current locking history reads.
  • Recover already-stranded parents through the existing watchdog/explicit repair path using durable child terminal history, without duplicating tasks or waking incomplete groups.
  • Keep historical failure metadata out of successful resolutions across the embedded executor, service bridge and WorkflowStub. Genuine terminal failure references remain intact.
  • Roll back a completion-notification infrastructure error for task repair instead of converting it into an application failure.
  • Preserve the existing repair-candidate metrics contract.

No schema, public API or payload-format change. Old contradictory terminal histories are not automatically rewritten.

Released

Published as Workflow 2.0.8. Both reports are closed after source and published-package qualification.

  • Full source matrix: MySQL/PostgreSQL feature shards, MariaDB checks, Laravel 9-13 upgrades, replay corpus, static analysis and coverage.
  • Final PR checks passed on the release metadata/head.
  • Published package verification: all supported Laravel/PHP upgrade combinations passed.
  • Deterministic MySQL regression failed on 2.0.7 and passed with the fix; concurrency/recovery suite passed 6 tests / 53 assertions.
  • Handled-failure regressions failed before the fix and passed after it. Final MySQL outcome/metrics checks passed 5 tests / 185 assertions.
  • Unit suite: 2,003 tests / 15,087 assertions, two skips and 15 PHPUnit notices, no failures/errors. Combined V2 coverage 87.31%, above the 86.74% ratchet, not 100%.

Standalone Server adoption is tracked separately in durable-workflow/server#145. This release does not itself deploy Cloud.

@rmcdaniel rmcdaniel changed the title Fix parallel child completion lost wake-ups and repair stranded parents Fix child completion wake-ups and handled-failure propagation Sep 8, 2026
@rmcdaniel

Copy link
Copy Markdown
Member Author

Review and full qualification complete for runtime commit 2f93ea3: https://github.com/durable-workflow/workflow/actions/runs/34231911269 .

  • All four MySQL and all four PostgreSQL feature shards passed; bounded MariaDB checks passed.
  • Laravel 9, 10, 11, 12 and 13 embedded upgrade journeys passed.
  • Unit coverage completed 2,003 tests / 15,087 assertions, with two skips and 15 PHPUnit notices, no failures or errors. Combined V2 line coverage is 87.31%, above the 86.74% ratchet; this is not a 100% coverage claim.
  • Static analysis, style, replay-corpus counterfactual checks and the deterministic MySQL concurrency regression passed.
  • The final focused MySQL check for handled failures, notification rollback/repair, genuine terminal failures and the unchanged operator-metrics contract passed: five tests / 185 assertions.

Code review checked parent-lock ordering, current history reads, durable-history-only repair authority, idempotency, incomplete-group behavior, and the transaction boundary for notification errors. No schema or public protocol changes. Existing contradictory terminal histories are intentionally not rewritten.

Only the 2.0.8 changelog/package metadata and a tree-neutral merge of the existing main release commit follow the qualified runtime revision. Final required PR checks are running on that head before merge and publication. The reports remain open until the published package is verified.

@rmcdaniel
rmcdaniel marked this pull request as ready for review September 8, 2026 13:37
@rmcdaniel
rmcdaniel merged commit 12c7e8b into main Sep 8, 2026
16 checks passed
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