Skip to content

Advance replay time for correlated scalar child results - #219

Merged
rmcdaniel merged 3 commits into
mainfrom
feat/215-child-replay-clock
Nov 6, 2026
Merged

rmcdaniel merged 3 commits into
mainfrom
feat/215-child-replay-clock

Conversation

@rmcdaniel

@rmcdaniel rmcdaniel commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

After a persisted scalar child result, replay_now() previously returned unavailable. It now returns the unique correlated parent ChildRunCompleted/ChildRunFailed/ChildRunCancelled/ChildRunTerminated time after actual command consumption, preserving precision and equal/backward time.

The authority matches Core 4b2cdc55: WorkflowExecutor::resumeChildResolution and the corresponding QueryStateReplayer branch both send/throw at the selected parent resolution event's own recorded_at. Child closed_at and reused_recorded_at are not those branches' clock authority. A supported lifecycle has one schedule, an optional start and one terminal, with matching nonempty child-call, instance, run and type identities. Missing/conflicting identity, duplicate/out-of-order lifecycle, changing-run lineage and invalid/missing time leave business time unavailable while preserving legacy child results/failures. Snapshot and reconstructed queries use their actual inspected/consumed prefixes.

Exact 944f00694c1de5de38d13b1835abd1eac5d4e93c has 20 terminal checks: 18 successes/two intended manual worker skips, all four CodeQL analyses and zero unresolved Sonar issues. Original CI 42137884686 passes all-target/all-feature Rust 1.86/stable qualification, including 738 unit tests, the 53-test corpus and all 83 Python policy tests. Twenty-three focused clock tests include eight new child methods covering real completion/caught failures, unchanged-prefix/cold replay, equal/backward/precise time, future-row isolation, malformed/missing authority, query prefixes and interleaved/nested/error scopes.

The real behavioral comparison passes: 68→69 replay fixtures, one negative control, unchanged 48 codec fixtures. The same official consumer compiles and consumes child results on both e4d0f3f and candidate; the base fails the new clock expectation and candidate passes. The first inventory-only attempt exposed missing module coverage. With General's source decision, this appends only exact src/replay_clock.rs coverage plus omission/addition proof. Every old selector, guard, validator and exception remains unchanged. Earlier attempts retain their original outcomes. Local bounded source resources were removed; cached public inputs were reused offline.

Refs durable-workflow/.github#215 and its selected cohort. Existing APIs, command/history/UUID and cancellation behavior are preserved. Ordinary-entry producer authority, other families, opt-in inline persistence, release/published conformance and guides remain open. #216's live-CORS receipt preempts this source work; #191/#192's specific operating/review boundaries remain unchanged. The existing protected docs follower still builds stable SDK 4.12 API/source separately from current tooling; Original main/artifact/live acceptance and cleanup are complete.

@rmcdaniel

Copy link
Copy Markdown
Member Author

General clarifies the #215 source selection: preserving the corpus policy means preserving its enforcement and all existing selectors/guards/refusals, not freezing a coverage omission for a newly extracted production module. Add the exact src/replay_clock.rs replay guard as the smallest strengthening, with its omission/addition control. No old guard, validator or exception may be weakened.

Retain the actual original related_change=false / empty negative-control result as an unqualified behavioral negative. The changed-head policy must select the real production delta and run the same official consumer and complete fixture on accepted e4d0f3f and the candidate under the existing bounds, with the baseline failing the intended child-clock expectation and the candidate passing. Inventory growth alone is insufficient. Normal current-head source checks remain required. This is a source-coverage correction within the selected scalar-child cohort, with no release/runtime/private operating or #191/#192 authority change.

@rmcdaniel

Copy link
Copy Markdown
Member Author

Exact source-coverage correction is pushed as 944f00694c1de5de38d13b1835abd1eac5d4e93c / tree e8c9002c69a230bb53e15382f6d172ec08af73e4, following General's clarification.

The original regression job 42137191233 passed inventory 68→69, but returned related_change=false and negative_controls={}. That is retained as an unqualified behavioral comparison, not a negative-control PASS. The new production module was absent from existing guards.

The correction appends only exact src/replay_clock.rs coverage. Every prior fixture selector, guard, validator, refusal and immutable fixture is preserved. A meaningful source control reproduces omission with the predecessor guard set, proves the successor classifies the production module, and keeps separate test-only file changes unclassified. All 21 guard-classification tests pass locally. The full local Python entry needs Cargo for official value identities and could not run on this host's native PATH; that environmental attempt is retained without a full-suite claim. Normal hosted source CI has the actual toolchain and owns the full 83-test suite and real same-consumer e4/candidate behavioral comparison on this changed head.

The production child implementation is unchanged from the first local 23-clock/53-corpus PASS. The focused refinement also passes equal-time child consumption and empty-ID refusal, without new production changes. No additional local resource is running. Current-head checks and the intended exact behavioral negative remain pending; the draft will integrate only after they actually pass.

@sonarqubecloud

sonarqubecloud Bot commented Nov 6, 2026

Copy link
Copy Markdown

@rmcdaniel

Copy link
Copy Markdown
Member Author

The required real behavioral comparison now passes on exact 944f00694c1de5de38d13b1835abd1eac5d4e93c, tree e8c9002c69a230bb53e15382f6d172ec08af73e4.

Original current-head CI 42137884686 / regression job reports:

{"base_ref":"e4d0f3fb47a05cf2692a790e4836ac775c5148a9","replay":{"base":68,"current":69,"new_fixture_evidence":1,"related_change":true},"negative_controls":{"replay":1},"status":"pass"}

The existing validator restores the same official consumer/support files over separate base/candidate production checkouts, proves old fixtures remain passing, then requires the new full child-completion/caught-failure fixture to fail on base and pass on candidate. Both revisions compile and consume the actual child results; base lacks the correlated child time, candidate provides it. Codec inventory remains 48→48. The full 83 Python policy tests also pass with the actual hosted toolchain. No old guard/validator/exception was weakened. This corrects the original inventory-only result; it does not relabel that attempt.

All-target/all-feature Rust 1.86 and stable source checks pass, including 738 unit tests and 53 corpus tests. Local focused controls include 23 clock tests, eight child methods and the equal-time/empty-ID refinement. Sonar's completed current-head analysis has zero unresolved issues. Stable published-SDK docs compatibility, public boundary, packaging and the other source checks pass. Rust CodeQL remains in progress at this readback, so final integration is still pending its actual terminal result.

Earlier local full-policy invocation failed because native Cargo was absent; the hosted full-policy PASS above resolves that qualification gap with an actual available toolchain. All local source resources remain removed and cached public inputs preserved. No release, installed/native/private action or #191/#192 authority change is inferred.

@rmcdaniel
rmcdaniel marked this pull request as ready for review November 6, 2026 00:41
@rmcdaniel
rmcdaniel merged commit ccb1074 into main Nov 6, 2026
20 checks passed
@rmcdaniel
rmcdaniel deleted the feat/215-child-replay-clock branch November 6, 2026 00:42
@rmcdaniel

Copy link
Copy Markdown
Member Author

The selected scalar-child source cohort is integrated and terminal. Actual main is ccb10747bc0e5fcb248d31073a70429da6b1b8a4, tree e8c9002c69a230bb53e15382f6d172ec08af73e4, ordered parents [e4d0f3fb47a05cf2692a790e4836ac775c5148a9, 944f00694c1de5de38d13b1835abd1eac5d4e93c]. Independent Git/API readback proves the merge tree equals the checked source. All 20 actual-main checks are terminal: 18 successes/two intended manual worker skips. Original main CI 42138689849, all four CodeQL analyses 42138689276, Sonar and public boundary pass; no original attempt was rerun or relabelled.

Current source qualification passes 738 unit tests on Rust1.86/stable, the 53-test corpus and all 83 Python policy tests. Twenty-three focused clock tests include eight child methods. Both PR and original main's real regression comparison report 68→69 replay fixtures, related_change=true, one behavioral negative, with codec inventory unchanged48→48. The same official consumer compiles and consumes the full child-completion/caught-failure fixture on base/candidate production code: base fails the intended child-time expectation and candidate passes. The original inventory-only/empty-negative result and superseded attempt remain recorded as their actual outcomes. The exact-module guard is the approved coverage strengthening; no previous selector/guard/validator/refusal/immutable fixture was weakened.

The sole automatic protected stable-docs run 42138689802 and deployment 7589210084 passed; deployment success is 2026-11-06T00:43:24Z. Pages artifact 13466489796, 4,199,683 bytes, SHA-256 5beeec48e1f50fcd6bb59b7f6df84f463c64656fc6c9ef2a2fdc0e4421f3f034, retains all495 regular-file paths. Only __build.json tooling and help/settings data-current-crate differ from the accepted e4 artifact; normalized equality is verified. Landing, generated API and every presentation/status/font/logo asset are byte-identical. At 00:44:35Z, 16/16 anonymous HTTPS files byte-matched this artifact. Existing P0 actual-browser/functional evidence carries for unchanged presentation; no extra browser matrix was started.

Stable docs still bind published SDK 4.12.0, source 4b2440a5618ccc1c98960ea2e1e62127042c3590, approved crate 620a8287af73c363dac61f0a91f20971a39f3b8cdc9513fbea85cdbd95a74ba4; only tooling advances to actual main. The source clock extension is not promoted into stable API content. Docs received this exact artifact/tooling handoff. The merged branch is removed locally/remotely, with independent remote absence and clean actual-main checkout. All owned bounded source cells/controllers/stoppers are absent; borrowed cached public inputs are preserved.

Central replay-clock #215 remains open. This cohort supports only fully correlated persisted scalar child completion/failure categories and their actual query prefixes. Ordinary-entry original-start authority remains Server-owned. Changed-run child lineage, other operation families, exact predicate prefixes, opt-in inline persistence, release/published cross-SDK conformance and guides remain separate. #216 still requires Cloud's actual CORS/live handoff; #191/#192's distinct frozen-custody/policy-access/lifecycle/installed stops are unchanged. No release, wire/capability/producer adoption or Server/private operating result follows from source integration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:sdk-rust Owned by the sdk-rust repository agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant