Skip to content

feat: qualify parallel activity replay time with canonical-v1 arithmetic - #293

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

rmcdaniel merged 2 commits into
mainfrom
feat/215-parallel-activity-clock

Conversation

@rmcdaniel

@rmcdaniel rmcdaniel commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

After a validated parallel list of remote activities, ctx.replay_now() can read the consumed group's time. Success compares authored members using exact canonical-v1 integer milliseconds, retains the first member on a tie and returns its original full-precision instant. Caught failure preserves Python's existing exception and reconstructs the selected millisecond only when that member agrees with the canonical selector; mismatched winners or reconstruction overflow remain unavailable.

The reader validates every member's lifecycle, execution/type/counter identity and full authored group path. It binds actual Core recorded_at/created_at inputs without substituting scalar redrive time or a history maximum. Empty groups preserve the existing boundary. Unsupported, mixed, local, select and scoped groups remain unavailable. Group query body/callbacks cannot borrow executor time; later independent scalar boundaries can recover their own authority.

The unreleased canonical-v1 decision uses signed UTC microseconds U and M = sign(U) * ((abs(U) + 500) div 1000), with integer arithmetic throughout. A separate table covers 31 fixed numeric vectors and six group cases across offsets, half boundaries, pre-epoch/large dates, ties and overflow. The original 17 observed PHP 8.4.27/Carbon 3.15.1 answers and independently bound source hashes remain byte-identical and separately attributed. This does not claim universal legacy Core Workflow::now() parity.

Validation at 4530321c:

  • 114 focused group controls and 5,888 full source tests pass; three optional skips, 130 integration tests deselected locally. Ruff and mypy pass.
  • The same official 109-case consumer produces two behavioral missing-clock failures on immutable accepted base 46ebdad, one new-contract large-date failure on prior measured-profile draft b6382381, and 109/109 passes on the successor. No import/collection failures. Original first-draft evidence is retained under its original numeric profile.
  • Three appended corpus fixtures preserve supported groups, the OPEN multi-failure selection gap and exact large-date arithmetic. Replay inventory 110→113; codec 43 unchanged. Existing fixtures, validators, legacy clocks, results/errors and cancellation remain intact.
  • Fresh current-head hosted qualification is running; local source proof does not stand in for it.

Related: durable-workflow/.github#215 and its consumed-group mapping. The versioned failure-selection proposal remains open. Full published conformance, matching versioned additive Core context and ordinary-entry/query authority remain open. This PR does not select a wire, workflow marker, version or release change.

@rmcdaniel rmcdaniel added the agent:sdk-python Work by the sdk-python repo agent label Nov 6, 2026
@rmcdaniel
rmcdaniel marked this pull request as ready for review November 6, 2026 07:21
@rmcdaniel rmcdaniel changed the title feat: qualify replay time after parallel activity groups feat: qualify parallel activity replay time with canonical-v1 arithmetic Nov 6, 2026
@sonarqubecloud

sonarqubecloud Bot commented Nov 6, 2026

Copy link
Copy Markdown

@rmcdaniel
rmcdaniel merged commit 7a36e43 into main Nov 6, 2026
21 checks passed
@rmcdaniel
rmcdaniel deleted the feat/215-parallel-activity-clock branch November 6, 2026 07:54
@rmcdaniel

rmcdaniel commented Nov 6, 2026 •

Copy link
Copy Markdown
Member Author

PR #293 is merged and actual-main source acceptance is complete at 7a36e433e308f5288055625ff6d004b1688299d3 / tree fdd7cf3f4f3331fe16fd10d324f7cbedb140e580. Ordered parents are accepted 46ebdad68803116033216da54000f74cb0c18011 and qualified successor 4530321ca9f86bbcd5a0311d783d382c9a4561f8; the merged tree exactly matches the qualified head. All 21 head contexts, including protected target-branch qualification, passed; direct Sonar unresolved inventory is zero and the first-head composite-assert finding is CLOSED/FIXED.

The canonical-v1 implementation follows the chosen unreleased integer contract: consumed remote Activity-all members only, authored first-on-ms-tie selection, original full-precision success time, exact integer failure reconstruction only for an agreeing legacy-selected member. Python's published legacy clock, results/errors and cancellation remain unchanged. The 17 original PHP 8.4.27 / Carbon 3.15.1 observations and source attribution are retained unchanged beside the separate canonical-v1 table; this is not a universal legacy Core numeric-parity claim.

Verification:

  • Local 5,888 full source tests pass, three optional skips and 130 local integration deselections; 114 focused group controls, Ruff, mypy over 44 source files, corpus policy and 57 policy controls pass. Replay inventory 110→113; codec 43 and existing guards/fixtures remain unchanged.
  • The identical 109-case official consumer produces two actual missing-clock failures on immutable accepted base 46eb, exactly the new-contract large-date failure on prior measured-profile b638, and 109/109 passes on 4530321. No import/collection errors. The earlier profile's original 108-case success is preserved under its original scope.
  • All five original main workflows, attempt 1, succeeded: CI 42183600595, portal 42183600577, Sonar 42183600580, CodeQL 42183600181, and boundary 42183600614. Their 19 jobs comprise 18 successes and the intended Pages deploy skip. Main integration job 127778814928 passed 73 tests / 49 declared skips in 157.41s, then Teardown succeeded. These are ordinary source-CI results, not immutable published/native qualification.
  • Original portal artifact 13485704015 binds build 127778626771 / deploy 127779132243 (skipped), 92 regular files and 46 API source rows, each byte/hash-checked against merged main. ZIP SHA2076997714dbf4b50017f7ba9f5befb6c0f10b71bf97c8e766523bec9ee1bdf5; tar SHAd0d871fd5e1e775c85be680b869fa3aea3f94e1b35eba830375df8a73b16ad23; inventory SHA65f31df0c515e823634ebc4ee0c8cc1ce1e2553a0b23face6495f39e5d41005f. The v2 audit says source-preview, both revisions 7a36e43, source version 2.15.0 and no published wheel.
  • At 07:53:08Z the actual stable audit, home, SDK reference, client and worker pages all matched their retained lengths/SHA values. They still bind presentation d3e7297 and published SDK dc479 / 2.14.1. No stable portal deployment or SDK release occurred.

Merged remote branch absence is independently verified by GitHub 404; its local ref is absent. Shared main and the retained detached review checkout are clean at 7a36e43. The owned temporary prior-profile comparison checkout was removed; no owned local test/browser/container process remains. SDK-Python owns the public source diagnostic evidence through 2026-11-13 09:00 UTC, then removes/redacts its temporary copies. Existing failed evidence and separately sealed inputs are unaffected.

Full central #215 stays OPEN: matching versioned additive Core context, ordinary-entry carrier, group-query/predicate authority, remaining consumed families and published cross-SDK conformance are not completed by this source cohort. The mismatched multi-failure outcome/versioning gap stays OPEN; no wire/marker/release or #123/#184 operating route is selected.

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