Skip to content

Advance replay time on persisted scalar child outcomes - #290

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

rmcdaniel merged 2 commits into
mainfrom
feat/215-child-business-clock

Conversation

@rmcdaniel

@rmcdaniel rmcdaniel commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

After a persisted scalar child resolves, ctx.replay_now() currently remains unavailable. This change advances it to the selected parent ChildRunCompleted/ChildRunFailed/ChildRunCancelled/ChildRunTerminated event's own recorded instant after actual send/throw consumption, preserving precision and equal/backward time. Child results, failures, legacy ctx.now() and cancellation behavior stay unchanged.

A supported lifecycle has one schedule, an optional start and one terminal with matching nonempty call/instance/run/type identities. Missing/conflicting identities, duplicate/contradictory evidence, cross-call reuse, unsupported groups/scopes or changing-run lineage leave business time unavailable. closed_at and reused_recorded_at are not clock authority for this branch. Queries retain the existing supported final-prefix rule; unsupported/inline transitions cannot borrow the earlier instant.

The time/field mapping follows maintained Core 4b2cdc5507120d9c213b0b02a85738bec96c574a: WorkflowExecutor::resumeChildResolution and QueryStateReplayer send/throw with the selected parent resolution's own recorded_at. This is an independent Python implementation with its own consumed history, tests and counts; Rust #219 is comparison data.

Validation: 62 new child controls and all 51 existing clock controls pass, plus the 104-case official corpus consumer (217 combined). Ruff/mypy and corpus policy pass. The identical consumer/helper/fixture on immutable base 03d7062 consumes the child result then fails exactly the new time assertion; candidate 8199fe8 passes all 104, with no collection/import errors. The single append-only fixture grows replay inventory 107→108; codec stays 43 and every old selector/guard/checker remains unchanged. The existing source guard already covers replay_clock.py. Full local units pass: 5697 passed, three existing optional-dependency skips, 130 integration tests deselected. All 21 current-head hosted checks pass, including Python 3.10–3.15, integration/teardown, docs, corpus, CodeQL and Sonar. Direct PR Sonar issue inventory is zero.

Refs durable-workflow/.github#215 and the selected scalar-child source cohort. Ordinary-entry authority, additional families/callbacks and published cross-SDK conformance remain open. Main only builds a source preview; the stable portal stays bound to published SDK 2.14.1. No package/version, wire field, release, portal dispatch, #123 driver/SQL/TLS execution or #184 route is selected.

@rmcdaniel rmcdaniel added the agent:sdk-python Work by the sdk-python repo agent label Nov 6, 2026
@sonarqubecloud

sonarqubecloud Bot commented Nov 6, 2026

Copy link
Copy Markdown

@rmcdaniel

Copy link
Copy Markdown
Member Author

Current exact source is 8199fe8054f50d8a050429fdd8cdcd163f349f46 / tree 003868805854dd342f05712d25ad00052b1fe149 / base 03d706228ae67939eec4103fa6402b5c794aedb6.

The first local full run at 238e557 retained a real invariant failure: 5696 passed / one failed / three optional skips / 130 integration tests deselected. The new ordinary child fixture included reused_recorded_at, which correctly made the unchanged redrive registry require redrive evidence registration. This successor removes that marker only from the new fixture and gives its optional child closed_at a distinct prior time. Focused controls retain the deliberate stray reused_recorded_at/closed_at values and prove they do not replace selected parent-resolution time. No registry/selector/checker/validator or existing fixture was changed. Original CI 42163010800 was superseded/cancelled by normal PR concurrency, not relabelled as success.

The two direct Sonar findings were corrected with a shared family constant and one exception-producing invocation in the query-error control. Current Sonar issue inventory is zero.

Current source validation:

  • 5697 local unit tests passed, three existing optional-dependency skips, 130 integration tests deselected; Ruff/mypy pass.
  • 62 child controls + 51 previous clock controls + 104 official corpus cases pass; adding all redrive evidence controls gives 444 passes.
  • Corpus policy passes: replay 107→108, codec 43 unchanged, with every old guard/checker retained.
  • The identical official consumer compiles/imports and consumes the child result on both immutable base 03d7062 and candidate 8199fe8. Base: 103 passes / one behavioral failure, expected completed-child time 2026-11-01T00:00:05.654321+00:00, observed unavailable. Candidate: 104 passes / zero failures. No collection/import failure supplies the negative.

Exact shared input SHA-256 values: consumer 2ed9d1f60616f033e04b7ee0bb1f8ecfff532a648f6602d1a2dd140d86c84d2e; workflow/helper 3160b2c25acac7b44dc04765971d700371ec475bce0d9aaef0a3bf4749e09993; new fixture 12a991c839f313ba4ec02967db7c219e617a6ddde77eedb987c8643376dd4c72.

Core source inputs were independently fetched and Git-blob/SHA-256 bound at maintained 4b2cdc5507120d9c213b0b02a85738bec96c574a: WorkflowExecutor.php blob 8fd6cb792e36f1583eb13006f0b5e40ac327a44a, query replayer 53e0cc2fb07f32da0f8bdfd3767c810d9e3272d6. Both selected resolution send/throw branches use that event's own recorded_at. No Core/Rust/SQL/driver execution occurred. A narrow owner field/correlation correction was requested; this is not a blanket integration gate or a transferred verdict.

Fresh original CI 42163246521, docs 42163246567, Sonar 42163246332 and CodeQL 42163240774 qualify this exact new head. No earlier-head CI is carried. No release, manual docs dispatch, published-artifact conformance or #123/#184 operation is selected.

@rmcdaniel

Copy link
Copy Markdown
Member Author

Exact source 8199fe8054f50d8a050429fdd8cdcd163f349f46 / tree 003868805854dd342f05712d25ad00052b1fe149 / base 03d706228ae67939eec4103fa6402b5c794aedb6 is CLEAN with 21/21 successful current-head checks, no pending/skipped/failed contexts. Original CI 42163246521 includes all six supported Python versions and successful integration 127714144132/teardown. Docs 42163246567, Sonar 42163246332 and CodeQL 42163240774 pass. Direct current PR issue inventory is zero.

The 5697-test local result, 62 new child controls, unchanged earlier clocks/legacy/cancellation behavior, 104-case same-consumer base/candidate comparison and exact final fixture hash are recorded above. The original invariant failure and superseded CI keep their separate outcomes; no old check is carried to this head.

Proceeding through normal protected merge. Actual-main qualification, source-preview/deploy-skip, stable portal preservation and exact branch cleanup remain my next checkpoint. This source change does not select an SDK release, stable portal dispatch, cross-SDK published conformance or #123/#184 operation.

@rmcdaniel
rmcdaniel marked this pull request as ready for review November 6, 2026 04:41
@rmcdaniel
rmcdaniel merged commit 6950eda into main Nov 6, 2026
21 checks passed
@rmcdaniel
rmcdaniel deleted the feat/215-child-business-clock branch November 6, 2026 04:49
@rmcdaniel

Copy link
Copy Markdown
Member Author

Actual-main acceptance is complete at 6950edac2568d1e243d458234e85280325157ae4 / tree 003868805854dd342f05712d25ad00052b1fe149, ordered parents [03d706228ae67939eec4103fa6402b5c794aedb6,8199fe8054f50d8a050429fdd8cdcd163f349f46]. The normal merge preserves the reviewed tree exactly.

All 21 PR checks passed. Main has 19 successes plus the declared docs-deploy skip, no pending/failed/cancelled checks, across five successful original workflows:

The source evidence remains exact: 5697 local unit passes / three optional-dependency skips / 130 integration tests deselected, 62 child controls, 51 prior clock controls, 104 official corpus cases and 444 combined clock/corpus/redrive controls. The same official consumer consumes child results on immutable base 03d7062 then fails exactly the new time expectation (103 passes / one behavioral failure); candidate passes all 104. Final child fixture SHA-256 is 12a991c839f313ba4ec02967db7c219e617a6ddde77eedb987c8643376dd4c72. Replay inventory is 108, codec 43 unchanged. All earlier guards, frozen evidence and legacy behavior remain enforced. The first fixture-profile failure and superseded run retain their recorded outcomes.

Main Pages artifact 13477479714 is source preview only. ZIP SHA-256 1fb32bc110a1c36c1c8914a769c34619342b5a55a937039b31a34d261fa7b0d3; tar e202ca3bb9fbb2fa318a5c0da0546b69e64423e70041a3bb2a7ae4ee41223aa0. All 92 regular members have safe paths/types. Audit v2 binds docs and SDK source to 6950edac, channel source-preview, source version 2.15.0, published wheel null. All 45 API source rows match exact Git blob bytes/sizes/digests; inventory SHA-256 cec1118a16345f7809d4a80da9de484db8f3a263c7e4460cc8ed1db5ab1da5b4.

Five live byte comparisons (deployment audit, landing, SDK reference, Client and Worker API) match the accepted stable artifact. The public portal still binds docs d3e72974 + published SDK dc47958c / 2.14.1. This main push performed no portal deployment or SDK publication.

Exact branch feat/215-child-business-clock was deleted remotely and locally, and absence verified after detaching the clean review checkout at accepted main. The shared main checkout advanced normally; local source tests and their resource claim are finished. SDK Python owns temporary source-comparison diagnostics through 2026-11-13 04:55 UTC, then removal. The frozen #184 inputs/ref/wheel and its set-aside review/operating gates are unchanged.

This completes the selected persisted scalar child source cohort. Full central #215 remains open for ordinary-entry authority, additional families/callbacks, changing-run lineage, guidance and published cross-SDK qualification. No version, release, manual stable dispatch or #123/#184 operating action is selected by source acceptance.

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

Labels

agent:sdk-python Work by the sdk-python repo agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant