Repository navigation
feat: add bounded embedded queue continuations - #834
Conversation
|
Exact Sonar feedback has changed the source: the dispatcher is split into task/call phases, parallel writes are explicit, the unused timer assignment is removed while preserving its call, and condition resolution/satisfaction/timeouts have focused handlers. The final local corpus/continuation/executor selection passes 129 tests / 5,061 assertions. The unchanged gate passed before issue triage, with 1.7% new-code duplication. I reviewed and accepted twenty return-count warnings individually, recording each method's guard states in Sonar. These retain flat waiting/failure/replay exits. Eight cognitive-complexity findings remain open and visible for further decomposition alongside the related runtime work. No rule, threshold or source exclusion changed, and no zero-findings claim follows. All task-owned local containers, dependencies, databases and raw output are removed. This remains experimental source, disabled by default; the original #748 acceptance is unfinished. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #834 +/- ##
==========================================
+ Coverage 93.77% 93.89% +0.11%
==========================================
Files 530 535 +5
Lines 74795 74969 +174
==========================================
+ Hits 70141 70389 +248
+ Misses 4654 4580 -74
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…ution-continuation
|
Pushed The eight open Sonar complexity findings are addressed in source by separating activity/timer/signal/service/child replay resumption from waiting, scheduling and parallel outcomes. Frame references, original cursor advancement, exception identity, failure handling, replay clocks and catch boundaries are preserved. No profile, threshold, exclusion, configuration, schema or dependency change. Final local source passes 163 existing replay tests / 1,274 assertions, style and full source/test PHPStan. The first local replay setup used the unavailable PostgreSQL driver; an in-memory SQLite setup then lost schema between cases. The fresh file-backed SQLite run passes unchanged assertions. A superseded local continuation selection was stopped before completion and supplies no completed-suite qualification. Fresh normal checks and Sonar are running separately; analyzer resolution and final hosted continuation/process-loss acceptance remain pending. Both boundary checks pass. The prototype stays disabled by default. All seven #748 acceptance boxes remain open; the earlier one-hour pilot remains failed. No new performance experiment, stable release, native/shared adoption or published-consumer claim follows. |
|
Exact The analyzer raised eight new S1481 findings on reference bindings in the activity/timer/signal/service/child/parallel-failure resume helpers. Each was reviewed against source and individually marked FALSE-POSITIVE with a method-specific explanation: Hosted style/static quality and regression corpus now pass. MySQL and the exact continuation/process-loss controls remain running, so this is Sonar/source progress rather than final prototype acceptance. Local final replay controls pass 163 tests / 1,274 assertions. All local tooling, copied dependencies, cache, database and raw output are retired; the source stays clean and pushed. The feature remains disabled by default and all #748 acceptance boxes stay open. |
|
Exact Sonar and both boundary checks pass. All eight prior complexity findings are CLOSED/FIXED; the individually reviewed reference-alias false positives and unchanged rules/gates are explained in 6242640715. No OPEN/CONFIRMED PR finding remains at that read. Local final replay checks pass 163 tests / 1,274 assertions, style and full source/test static analysis. Local tooling/dependencies/cache/database/raw are actually removed. This completes the scoped source-quality follow-through. The default-disabled prototype, all seven #748 acceptance boxes, incomplete larger/concurrent measurements and published consumers remain unchanged. |
|
The current-main small growth report records all twelve fresh At 100 events, within-host retained worker CPU is 7.33%, 9.86% and 6.42% lower, while wall differences are small and history SELECTs increase from 433 to 512. Ten-event CPU differences vary in sign. Host models differ between pairs, so no cross-host median or production saving is claimed. Whole-worker CPU remains distinct from isolated replay attribution. The old one-hour failure remains failed. Runtime follow-up The rollback and post-commit acknowledgement controls now continue through supported repair/watchdog recovery to completion. They retain the original failed task record, committed prefix and deadlines, execute the activity once, and leave no new failed jobs or queued work. The first added observer incorrectly expected ordinary failed tasks to become completed and checked a never-dispatched timer before the existing stale-dispatch interval. Diagnostics identified those observer errors; no product repair interval or deadline changed. RepairRequested deliberately selects cold replay. Final focused controls pass 3 tests / 79 assertions, cache controls 8 / 24, style and focused PHPStan pass. The earlier 55 / 2,248 whole continuation selection remains attributed to its pre-follow-up source, not transferred. Final tooling/report head The tracing owner confirmed that a retained Fiber must not inherit a prior job's ended processing span/task context. #748 will integrate #773 after its qualified minor and add an explicit tested cold fallback for tracing contexts until safe per-resume refresh is proven, including context toggles. Final qualification must cover real sequential jobs and caller-context restoration. This requirement and the remaining replay-phase, concurrency, lifetime, published-package and consumer acceptance keep #834 draft and #748 open. |
|
The claimed-attempt correction is pushed at
The 100-event concurrent report retains all eighteen original source-
Release order is coordinated with #773: no tracing minor is qualified or reserved; an independently qualified embedded minor may publish first. The tracing owner reviewed the observer diff and confirmed no current bind/throw/finally conflict. Runtime/migration coordination is also recorded in #871. The original 1,000-event pilot 39452413954 remains within its original per-mode bounds; it is not restarted or counted as passed. |
|
The 1,000-event pilot report preserves both passing source- The already-started source- |
|
The worker now clears resolved retained state on The full current continuation/process/cache/profile selection passes 65 tests / 2,408 assertions; focused style and static analysis pass. Earlier The new CPU/drift report preserves all eighteen passing source- |
|
Full source run39463825695 on
The |
|



Persistent embedded PHP workers replay the committed instruction prefix on every workflow task. This adds optional bounded live execution for asynchronous database-queue jobs, so an eligible workflow can resume its suspended Fiber after a committed outcome. Cold replay remains the default. Delivers the initial bounded profile for #748, with normal published Core and affected embedded consumers qualified.
Released behavior
An explicit workflow allowlist and immutable application build ID enable sequential remote activities and positive ordinary timers. A frame holds the workflow/Fiber, suspended call and sequence, without retaining a job, task, lease or transaction. The worker removes a candidate before advancing it and publishes it only after root commit. Rollback, uncertain acknowledgement, job exceptions and shutdown discard retained execution.
Before resuming, the runtime verifies backend/schema/table scope, physical PDO session, namespace/run/configured-model identities, definition/build/runtime, immutable run fields, the complete contiguous committed history prefix and the attempt generation captured in the claim transaction. Changed or missing authority selects cold replay. Weak PDO keys do not keep disconnected sessions alive.
Bounds are four entries, a nonrenewing 30-second monotonic age and a 128 MiB whole-worker RSS threshold checked at loop, lookup and publication. Missing RSS selects cold replay. Ordinary queues require no affinity wait or lease extension. Normal worker supervision remains required. Eviction preserves the existing #480 Fiber-disposal contract.
Object-capable entry signatures, object injection, explicit bindings, decorated workflows, unsupported history/features, fake/synchronous jobs and caller-owned transactions select cold replay. Excluded operations fall back before their durable handler. Configuration, diagnostics and limitations describe the initial profile. The optional CPU observer measures authored forward execution plus replay, rather than isolated completed-prefix CPU.
The release integrates 2.7.3
dda951d9, preserving pre-entry refusal, supported repair of the same original and genuine workflow-body failures. Inherited source77132094does not qualify 2.7.3. This change adds no migrations or portable protocol changes, and changes no native/shared/frozen/catalog fixtures.Qualification and publication
Merged commit
2edaa6b1c6f45fcec4570813c2e741aadde92b3bis published as Core 2.8.0. The entire merge tree equals checked PR head82acd9b1; product source, resources and Composer metadata equal functional sourcefa5d2300.Measurements and limits
The source-specific report records the actual source for each comparison. It separates cold process startup, history/projection, dispatch/validation, authored PHP, timer/queue delay, cache hits/misses and worker memory. Timings from
5dd594e3are not attributed to the later immutable release.The 1,000-event single-worker study passes all three pairs / six originals with complete audits and zero errors, unfinished runs, task repairs, healthy redispatches, OOM kills or restarts. The 100-event four-worker/eight-run study passes six cohorts / 48 workflows, with frequent cache misses and no consistent worker-CPU saving. The functional-source 10-event study passes all three pairs. Retention saves dispatch/validation work in the measured hit-heavy case; authoritative history remains a substantial cost and history SELECT counts increase.
All failed originals remain failed. The large-study report retains six failed four-worker/one-run originals: three OOM kills and three ordinary worker memory exits, with SQLite lock errors and unfinished work. Both one-worker/eight-run and four-worker/eight-run large pilots miss their original observation deadlines; all eight workflows remain unfinished. The four-worker pilots record 57/62 failed jobs and 7/11 tasks with positive repair counts, without enough evidence to classify those increments. Remaining large concurrent repetitions were not admitted, so there is no completed 72-original grid or general capacity claim. The earlier one-hour pilot (642 events, 128 effects, 512/513 completed tasks, one unfinished original, no OOM) and observer originals remain preserved.
Consumer follow-through
Server #552 and Sample App #264 now pin normal published Core 2.8.0. Server's combined TLS/security source passes 69 focused controls / 885 assertions, all 955 installed Core file hashes and a fresh-volume candidate-image first-run. Sample App #264 is merged at
1ee51252, with its entire tree identical to the checked candidate. Its four PHP cells, all five Compose samples, polyglot smoke and candidate devcontainer checks pass. Normal two-architecture devcontainer publication and installed acceptance pass, with both public main channels promoted. Server #552 is merged at987b07e1; its final combined-source checks and protected Server 2.9.11 / chart 0.2.1 publisher all pass. Exact published-image acceptance includes SQLite first-run, MySQL Compose, anonymous chart install, all 955 Core file hashes and 18 direct PostgreSQL/MySQL/MariaDB TLS probes. General's subsequent Sample #265 security delivery retains these Core pins and passes its own native two-architecture installed publication. Earlier unpublished source-alias rehearsals and their failed stable-version guards remain historical evidence, not published-package proof.Waterline's Core dependency is development-only; its unchanged runtime is exercised in Sample App. SDK packages and the portable contract are unchanged. Native/shared/frozen/catalog adoption and Cloud rollout remain with their separate owners. #773 follows the agreed next-minor order against actual main and owns tracing-enabled cold fallback/context-toggle qualification. Service-mode warm execution remains PHP SDK #113.