Skip to content

Make the native-live routing E2E deterministic (no wall-clock races) - #333

Merged
luisleo526 merged 4 commits into
mainfrom
lv/routing-e2e-race-fix
Oct 4, 2026
Merged

luisleo526 merged 4 commits into
mainfrom
lv/routing-e2e-race-fix

Conversation

@luisleo526

Copy link
Copy Markdown
Collaborator

Summary

Makes tests/native_live_routing_e2e.py deterministic. It flaked intermittently in CI's sanitizer job (native-live), because several assertions compared wall-clock timings against the transport timeouts. For example, "all four initial deliveries start before the first hanging request times out (500 ms)" is a race a loaded runner can lose on any tree.

  • Every behaviour the test proves is now proven from events instead of elapsed time:
    • deliveries run concurrently and never block computation: shown by receivers that hold until they have seen the expected requests, and by attempt ordering in the delivery log;
    • retries happen only after a transport error and never delay a newer action: shown by attempt counts and sequence ordering;
    • timeouts end as the timeout class.
  • The one contractual duration bound, the drain within one total timeout, keeps a 5× margin under sanitizers.
  • Test-only: the test file plus its CTest properties in runner/CMakeLists.txt. No product code changes.

Verification

  • Under the live-sanitizers profile (ASan+UBSan Debug): 20 consecutive passes, 10 of them with the host loaded by stress-ng. Plain Release: 10/10.
  • A throwaway mutation that makes delivery blocking makes the test fail, so it still detects the bug it guards against.
  • Engine bundles pass; corpus parity is 312/312 with 0 moved.

🤖 Generated with Claude Code

@luisleo526
luisleo526 force-pushed the lv/routing-e2e-race-fix branch from d1fb785 to 9102298 Compare October 4, 2026 12:15
luisleo526 and others added 4 commits October 4, 2026 22:15
The runner retries a failed delivery at most twice and does not re-send it
automatically afterwards, so "at least once" over-stated the guarantee; the
sentence now states only the replay that receivers must deduplicate.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@luisleo526
luisleo526 force-pushed the lv/routing-e2e-race-fix branch from 856d7d2 to 072beb3 Compare October 4, 2026 14:16
@luisleo526
luisleo526 merged commit 7afba5c into main Oct 4, 2026
17 checks passed
@luisleo526
luisleo526 deleted the lv/routing-e2e-race-fix branch October 4, 2026 15:43
luisleo526 added a commit that referenced this pull request Oct 5, 2026
* docs: release notes and version scoping for v1.2.0

CHANGELOG: the Unreleased section becomes 1.2.0 (2026-10-05), a minor
release that adds the compiled execution-capabilities extension to the C
ABI (PF_CAPABILITIES_API_VERSION, strategy_capabilities_api_version,
strategy_capabilities_receipt). One bullet per change since v1.1.0 with
its PR (#328, #330, #331, #332, #333, #334, #335, #336, #337, #338 and the
session-clock change, written #VCP until its PR number exists), the
recipe additions under State hashes (#328, #330, #335; domain tags and
epoch unchanged), Report keys (docker/run_json.py is byte-identical to
v1.1.0's, so no key changes) and Migration.

Version scoping: README, install and public-contract pages name v1.2.0
and codegen 1.2.0; "since the next release" and "fixed on main" in the
capabilities guide and the runner guide become 1.2.0 and 1.1.0 (#325).
Lines that state what an earlier release shipped stay.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* docs: 1.2.0's grades from the facts tokens, #339, and codegen's license

- CHANGELOG: the session-clock change is #339 (merged as 52292db), in place
  of the #VCP token of 3082fbd; the "What a script author sees" bullet of
  3082fbd now states release 1.2.0's grades (registry baseline
  pineforge-parity-baseline-20261005-engine-52292db9: 7,970 excellent / 19
  strong of 7,989, none below strong) instead of the main scoreboard at
  6b77f06.
- README: the release sentence names 1.2.0 and renders releases[1.2.0], and
  the main scoreboard renders the same baseline, from pineforge-release
  facts/facts.json at 0c2f6838 (the facts export for the 1.2.0 release).
- README, LEGAL.md, docs/pages/index.md: pineforge-codegen is under the
  PineForge Source License 1.1 from its release 1.2.0; releases up to 1.1.0
  keep the PolyForm Noncommercial terms they shipped with.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant