Skip to content

Configure legacy workflow overlap release delay - #903

Merged
rmcdaniel merged 4 commits into
mainfrom
fix/897-overlap-release-delay
Oct 22, 2026
Merged

rmcdaniel merged 4 commits into
mainfrom
fix/897-overlap-release-delay

Conversation

@rmcdaniel

@rmcdaniel rmcdaniel commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Legacy queue jobs always release immediately when an overlap lock is busy. Parallel activities can therefore churn database-queue reservations and exhaust queue attempt counters. Add WorkflowOptions(overlapReleaseAfter: 5) and its array configuration form to select a nonnegative delay in seconds.

The setting persists with the legacy run, is inherited by children and continue-as-new unless explicitly replaced, and applies to root/parent workflow locks, activities, signals and child results. Existing serialized options and the zero default stay compatible. Lock ownership, expiry and activity exception backoff are unchanged. Queue releases still count toward Laravel attempt limits.

Real database-queue controls prove delay/readmission boundaries, unchanged payloads, eventual workflow completion and the selected lock owner for each legacy job type. Positive-delay V2 controls compare start, signal-with-start and child-start arguments, routing and portable task/history shapes against zero-delay executions. No portable contract change is required.

Companion 1.x backport: #904. English, all seven translated current guides and the English-only versioned 1.x guide: durable-workflow/durable-workflow.github.io#356. The routine minor versions are 2.11.0 and 1.1.0. Both packages are published and installed-artifact acceptance passes. The normal 2.11.0 published-package verification passes all 16 PHP/Laravel upgrade cells plus package/platform checks. All nine affected guides are live and verified. The complete main-branch build, including all database shards, coverage and Sonar, passes at https://github.com/durable-workflow/workflow/actions/runs/39767271006. Issue #897 is closed with complete release, installed-package and live-documentation acceptance.

@rmcdaniel
rmcdaniel marked this pull request as ready for review October 22, 2026 10:12
@sonarqubecloud

Copy link
Copy Markdown

@rmcdaniel

Copy link
Copy Markdown
Member Author

Qualification of candidate 31dda765529902f95bb51d1b46bf50230bd0c330 for 2.11.0:

  • Full ECS and PHPStan pass. The complete unit coverage run passes: 4,687 tests, 69,248 assertions, 15 PHPUnit notices and seven skips, with no failures or errors. Statement coverage is 56,431/73,929 (76.33%), above the repository's 60% floor. PHP 8.3.36, PCOV 1.0.12, SQLite 3.46.1; array cache for unit clock controls.
  • The real database-queue regression retains both zero-delay and positive-delay controls, original payload and identity, delayed readmission and eventual completion. Root and parent lock ownership and expiry remain covered. Invalid-input, old serialization and child/continue-as-new inheritance controls pass.
  • The positive-delay V2 boundary controls pass through completion: start, signal-with-start and child start, three cases and 55 assertions. Arguments and routing are retained, portable task/history shape matches the zero-delay control, and the legacy option does not enter portable payloads.
  • The current-head hosted run has passed unit contracts, MySQL features, quality, regression corpus, HTTP tracing and preflight jobs. CodeQL, dependency-security and Sonar checks also pass. The final build aggregate is queued. The complete local PostgreSQL feature suite remains running and will be reported before merge.

Consumer review against current public main manifests and lockfiles: Server pins Core 2.10.1; Sample App accepts ^2.0 and currently locks 2.9.0; Waterline's Core 2.5.12 pin is a development dependency. These V2 consumers do not use the legacy middleware setting, so this feature requires no Server image, SDK, Waterline or Sample App publication. No portable contract, resolver, schema or database migration changes are introduced. Published-package checks will still verify the exact 2.11.0 artifact and the normal release-verification journey.

The scoped 1.x backport is already delivered as 1.1.0, with fresh installed acceptance and reporter instructions. The companion documentation PR stays unpublished until 2.11.0 is available.

@rmcdaniel
rmcdaniel merged commit d7db4a2 into main Oct 22, 2026
23 checks passed
@rmcdaniel

Copy link
Copy Markdown
Member Author

2.11.0 is published at immutable commit d7db4a2ea4ffb0c8dfda7cae4c846cce61ef5aec. Its tree 7c422d0c70151baae6bc9d134c327742a25ac98a exactly matches qualified candidate 31dda765529902f95bb51d1b46bf50230bd0c330. Packagist source and distribution references match, and GitHub Latest now selects 2.11.0.

A fresh Composer consumer installed the public 2.11.0 distribution without a path repository or mounted runtime source. Only regression tests were supplied separately. The installed src/ tree matches the immutable tag byte for byte. Bootstrap checks the exact installed version/reference, restores old serialized options with non-null routing and zero delay, and verifies the origin of every loaded runtime class.

  • Queue/options and positive-delay V2 boundary controls: 18 tests, 160 assertions, all passing. This includes real database-queue contention, delayed readmission, zero default, invalid configuration, payload preservation, eventual completion and unchanged V2 start/signal-with-start/child-start boundaries. 272 installed runtime classes verified.
  • Child and continue-as-new inheritance: four tests, 32 assertions, all passing. 136 installed runtime classes verified.
  • Environment: PHP 8.3.36, Laravel 13.38.0, Testbench 11.3.0, PHPUnit 12.5.40, SQLite 3.46.1, array cache.

The normal published-package verification and the broader source PostgreSQL feature run remain active follow-through. The documentation PR is being rebuilt with the new published Core install pin before deployment. The already published 1.x backport is 1.1.0. Issue #897 remains open until documentation and final release follow-through complete.

@rmcdaniel
rmcdaniel deleted the fix/897-overlap-release-delay branch October 22, 2026 11:05
@rmcdaniel

Copy link
Copy Markdown
Member Author

General accepts triage of the separately observed V2 concurrent-child control failure. Keep #897's legacy middleware qualification and this existing V2 observation distinct; do not change V2 runtime, the original 30-second assertion or a failed original merely to complete the legacy feature.

The owner reports the unchanged 2.10.2 baseline also misses the same test deadline on a fresh disk-backed PostgreSQL 17.11 service with 1 GiB, no OOM: twelve activities complete, parent tasks remain ready/queued and Workers are alive. The matched 2.11.0 control is finishing. The earlier 512 MiB tmpfs database OOM and cascading connection errors are a separate runner failure. These observations do not establish a new #897 regression, a production failure or a root cause.

Please preserve the final matched result and bounded exact diagnostics, task/history/queue identities, source hashes, original clock and actual DB/Worker exits. Then retire the test resources; do not expand into another capacity study. General will review the evidence and route any actionable product or fixture correction to its own record, checking the existing #892 scope before filing a duplicate. #748's retired broader study and stopped work are not resumed.

Correct the pre-merge qualification wording above as well: the broad local PostgreSQL feature run was still active when this PR merged and the release was tagged, despite the earlier intention to report it before merge. Its later failure must remain explicit. The already recorded required hosted gates, scoped real-queue tests, full unit coverage and normal installed legacy/V2 controls retain their actual scope. Finish the remaining published verification and live localized docs before closing #897.

@rmcdaniel

Copy link
Copy Markdown
Member Author

Additional PostgreSQL qualification and the interrupted broad-run disposition:

  • Fresh PostgreSQL 17.11 / Redis controls for the changed legacy behavior pass: 19 tests, 137 assertions. This includes the real database-queue zero/positive-delay controls, all related lock owners, stored options, invalid values and child/continue-as-new inheritance.
  • The broader local feature attempt is excluded from passing totals. Its database used a 512 MiB container with a temporary memory-backed data directory; the database exhausted that limit and entered recovery. The complete SQLite unit coverage result and the separately installed-package results remain valid.
  • Before that database interruption, V2EmbeddedParallelChildConcurrencyTest::testThreeFourChildParentsCompleteWithConcurrentQueueWorkers reached its 30-second deadline. A clean comparison used PHP 8.3.36, four CPU limits, a fresh disk-backed PostgreSQL database with a 1 GiB limit, and isolated cache databases. Unchanged 2.10.2 reproduced the deadline failure with completed activities and parent tasks ready/queued. The matched 2.11.0 control passed: one test, 15 assertions, 33.432 seconds including setup. Neither clean control had an OOM event. V2 source, the fixture and the test harness are unchanged between the two tags. The original observations are retained; this is not being reported as a passing full local feature run.

The normal full source-feature run remains authoritative for the complete hosted matrix. The published-package verification has passed package/platform checks and its first four upgrade cells; remaining cells are queued.

The all-locale documentation is merged in durable-workflow/durable-workflow.github.io#356. Its complete current-head build and checks passed, and the site publish workflow succeeded. GitHub Pages' final delivery job is still pending, so live-site acceptance is not yet complete. Issue #897 stays open through that follow-through.

@rmcdaniel

Copy link
Copy Markdown
Member Author

The hosted PostgreSQL shard 2 now passes on the exact released commit. The unchanged weighted splitter confirms that it includes V2EmbeddedParallelChildConcurrencyTest.php, including the parallel-child control discussed above. Together with the clean local 2.11.0 control, this resolves that observation for this release qualification. The interrupted local run and baseline deadline failure remain recorded above and are excluded from passing totals. No V2 source or test changes were made. The remaining hosted matrix cells and final GitHub Pages delivery are still progressing.

@rmcdaniel

Copy link
Copy Markdown
Member Author

General accepts ordinary shared-main CI follow-through for exact released 2.11.0 / d7db4a2, run 39767271006. At this review every materialized database, quality, tracing, corpus and Laravel-upgrade job passes; coverage is still running and is not claimed passed.

Published-package/platform verification 39767325630 is terminal SUCCESS. The owner's separately verified installed packages and live localized guides retain their stated scope. The preserved local database OOM and baseline deadline failures remain excluded from passing totals; there is no new V2 source transfer or reopened performance study. General retains any actionable follow-through from the remaining ordinary main check. This acknowledgment does not require a competing implementation or another release.

@rmcdaniel

Copy link
Copy Markdown
Member Author

The remaining ordinary main-source run 39767271006 is now terminal SUCCESS at exact released d7db4a2, including coverage. General independently read the terminal run result. The scoped release verification and live-doc results remain as recorded, and the earlier local OOM/baseline deadline observations stay preserved and excluded from passing totals. There is no remaining shared-main CI handoff blocker from this run.

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