Repository navigation
Retry embedded application heartbeats after SQLite contention - #925
Conversation
|
|
Owner source review complete at b5ad807, tree 5be44fa6c8919c61a1d5c48ce8f0c86f785034fa. All 16 applicable PR checks pass / 6 intended skips on the exact head, including quality, unit contracts, MySQL, tracing, regression corpus and the aggregate. Direct PR Sonar analysis The existing Normal source merge follows the repository's delegated owner review path. The original full-main run40092272923 remains failed evidence. Independent full main/coverage/Sonar, immutable2.13.1 publication and normal installed cancellation/heartbeat plus affected downstream acceptance remain required; no delivered fix is claimed yet. |
|
Core 2.13.1 is normally published from The exact source passed full main verification40101884828, including all database shards, complete coverage, five Laravel upgrades, quality, corpus and Sonar. Normal published verification40132873412 passed all17 jobs, including the package contract and16 Laravel/PHP upgrade cells. A fresh normal Composer consumer on PHP8.3.36 / Laravel13.38.0 / Testbench11.3.0 / PHPUnit12.5.40 passed 11 tests /132 assertions, with no skips or warnings. It exercised cooperative cancellation after retry under both cancellation policies, completed-task preservation, the current attempt/task snapshot and successful+duplicate stop acknowledgement, plus all ten embedded lease-maintenance, genuine-progress, deadline and worker-loss controls. Stock Composer autoload resolved Activity, WorkflowExecutor and ActivityCancellationWait from the installed package; no product-source override was used. All 2,176 package files matched the tagged source before and after the tests. Composer reported zero security advisories. This delivers the library repair and preserves the earlier failed main run as failed evidence. PHP Server adoption is continuing in durable-workflow/server#733, followed by the exact published-image acceptance. This issue remains open through the affected Server image; no native parity or rejected-outcome emitter acceptance is claimed. |



A genuine embedded application heartbeat can collide with lease maintenance, throw SQLite5
database is locked, and fail an activity that is making progress. This failed one existing control among4,816 cases in the full main coverage run40092272923. Database/upgrade jobs passed; the coverage ratchet and main Sonar were not reached.Current head b5ad807, tree 5be44fa6c8919c61a1d5c48ce8f0c86f785034fa, based on #924 merge
b7573a66. Use the existing boundedSqliteTransactionfor heartbeat mutations. It retries only a failed, rolled-back root SQLite transaction, re-reading task/attempt/run/deadline authority each time. The application callback stays outside this transaction; nested/uncertain-commit protections remain.A real second PDO connection commits a metadata write after the first heartbeat read, forcing a WAL snapshot conflict. The original runtime fails the retained test (1 case/4 assertions). Corrected source passes1/8, with one callback, four accepted progress events, one completion and no failure. The full lease/deadline/worker-loss class passes 10 tests/82 assertions on1a595b25 with an init process; that runtime is unchanged in this head. The final two-line parameterized fixture update passes the affected case again1/8. Full src/tests PHPStan passes, and final changed-file ECS passes without fixes. The initial full-class run without an init process failed its helper-exit assertion10/77; that original is retained, without changing any deadline or assertion. Fresh hosted qualification is running.
Refs #878 and #923. Draft until terminal source qualification. Core2.13.1 remains untagged/unpublished; this joins that unreleased patch. Published-package and affected downstream acceptance remain required. No retry/lease/heartbeat deadline, failure assertion, corpus guard or coverage gate is weakened.