Repository navigation
Expose an additive clock for consumed scalar replay - #320
Conversation
|
|
The initial scalar implementation now has 53 focused clock controls passing, plus official corpus/redrive evidence controls and PHPStan. A prior full cached-source run passed8,087 tests /85,099 assertions with56 optional-dependency skips; fresh normal CI qualifies each subsequent source head. The official immutable-base comparison on9b6b979 already proved replay corpus66→67, candidate pass / base fail, consumer=worker, revision_verified=1. The new fixture follows the canonical Core redrive activity/timer prefix; old fixture bytes, selectors, validators and enforcement are retained. New implementation paths are covered by the existing related-change guards. Two material draft-source findings were reproduced and corrected before readiness:
Narrow source comparison used maintained Core All five actual initial analysis findings were corrected without suppression; direct unresolved inventory on the later80c head was zero. Fresh current-head qualification is required for the provenance successor. This remains the initial bounded remote scalar activity/plain-timer/redrive SOURCE slice, not full215 acceptance. Child/signal/grouped and remaining callback/entry authority follow the maintained source contracts in the existing215 train; P0 matching setup/adoption still preempts. No release/cohort/tag, installed/native/runtime/authentication or publishing effect was selected. |
|
Initial scalar clock source acceptance is complete.
This accepts the bounded scalar Activity/plain-Timer/canonical-redrive SOURCE cohort. It does not close full215, qualify ordinary-entry/callback/other-family authority, choose a version/cohort or supply installed/native/published conformance. The existing child/signal, then grouped Source sequence continues from this accepted main under General's maintained-source assignment; P0 matching setup/adoption preempts when that input returns. #219 remains draft/excluded and #267's ABI window remains separate. |



WorkflowContext::replayNow()returns the UTCDateTimeImmutableat the most recently consumed, proved scalar activity/timer boundary. Repeated reads stay identical; equal/backward instants and microseconds are preserved. Missing, invalid, ambiguous or unsupported authority throws the dedicatedReplayClockUnavailableinstead of inventing time.Each Fiber invocation has an engine-owned try/finally scope, and every resume/throw resets its authority. Only the matched supported scalar step supplies a new instant. This prevents retained, nested, direct, capture, predicate, local, cancellation and force-closed-finally callbacks from borrowing a prior clock. Existing cancellation's monotonic budget clock, errors, UUIDs, history and command behavior remain separate.
Canonical redrive entry/reuse binds the workflow/run, source, link, resume step and original-time evidence. A step below the resume boundary must have its original provenance even if both reuse keys are missing. Failed/timed-out/cancelled activity delivery retains its original error and uses its own consumed event time. Shared StartAccepted proves correlation only; it never identifies the producer.
Initial scope is bounded remote scalar activity lifecycles, plain persisted timers and canonical redrive. Local/inline/grouped/child/signal and other unproved families remain unavailable; queries/updates need their own validated consumed prefix. Ordinary-entry anchor adoption and remaining215 families are separate source work. This does not complete the original cross-SDK/published/guide acceptance.
Validation on exact head
3c53eb65e3ca288ea0dc330c531dbd5a3dcb6cf5:Maintained Core field/consumption readback and detailed source evidence: #320 (comment) . Persisted activity and timer event paths are compared with Core WorkflowExecutor
8fd6cb792e36f1583eb13006f0b5e40ac327a44a; its legacy model-only closed_at/fired_at fallback is not substituted for absent service history. Refs durable-workflow/.github#215 and its accepted additive/callback contracts.P0 portal matching setup/adoption preempts when its input returns. No version/cohort/tag, package solve/install, native/runtime/authentication, operating route or publication is selected.