Skip to content

test(cross-impl): F8d temporal sequence replay against the Python SDK - #42

Merged
aeoess merged 5 commits into
mainfrom
f8d-temporal-replay
Nov 29, 2026
Merged

aeoess merged 5 commits into
mainfrom
f8d-temporal-replay

Conversation

@aeoess

@aeoess aeoess commented Nov 29, 2026

Copy link
Copy Markdown
Member

Python port of the F8d replay: the Lean generated temporal corpus is run against the Python SDK, as tests/v2/lean-temporal-sequences.test.ts runs it against the TypeScript SDK.

  • tests/cross_impl/lean-temporal-sequences.json is vendored byte for byte from agent-passport-system main at 189a85d. The provenance file records the commit, path and SHA-256, and the test checks the digest before replaying any trace.
  • tests/cross_impl/test_lean_temporal_sequences.py replays every trace, compares the state at session begin and after each step, asserts time order, and asserts the exact number of clock reads per verification.
  • Negative controls corrupt a counter, a result code, a session, an association, the state at begin, and a state inside a session that ends with unknown revocation status. Each must be caught.

No SDK source change. Tests only.

Replays the Lean F8d boundary and generated traces from agent-passport-system
formal/lean/TemporalVectors.lean against the Python SDK, with the same rules as
the TypeScript replay: SDK behaviour for verification, revocation store, handle
gate, reserve, commit and cancel, and harness rules for the reservation
association and dispatch admission. The corpus digest is pinned.

Signed-off-by: Tymofii Pidlisnyi <tima@aeoess.com>
Repins the corpus, compares the full state at every event inside a
session from within the revocation queries, compares charged delegations
in chain order, requires every clock read to be a trace time, and tracks
coverage per corpus part, as the TypeScript replay does.

Signed-off-by: Tymofii Pidlisnyi <tima@aeoess.com>
Signed-off-by: Tymofii Pidlisnyi <tima@aeoess.com>
…ock reads

Mirrors the TypeScript follow-up: compares the state after every begin
event, asserts exact clock reads for valid and failed verifications, and
adds negative controls for a corrupted begin state and a corrupted state
inside a session that ends REVOCATION_UNKNOWN, which also shows that a
failure raised inside the revocation callback is not absorbed.

Signed-off-by: Tymofii Pidlisnyi <tima@aeoess.com>
Signed-off-by: Tymofii Pidlisnyi <tima@aeoess.com>
@aeoess
aeoess merged commit 9f4330c into main Nov 29, 2026
9 checks passed
@aeoess
aeoess deleted the f8d-temporal-replay branch November 29, 2026 05:16
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