Phase 2: seal and replay outcome-independent intent tapes #648

Merged
erikinkinen merged 8 commits from phase2/p2-09-immutable-intent-tapes into main 2026-10-21 00:55:04 +02:00
Owner

Task

Closes #100 (P2-09).

Summary

An expected denial can change a mechanism's graph and event count. The new
immutable intent tapes keep the already generated source continuation identical
across those outcomes. Logical handles resolve through engine-owned reservations,
and every source action has an auditable range of actual v4 execution events.

Scope

Included

  • Closed canonical tape schema, sealed values, named RNG substreams and recorded
    draw provenance, logical dispatcher and immutable initialized prefixes.
  • Checksummed compressed tape artifacts with optional trusted expected hashes;
    shared bounded zstd transport preserves existing event replay behavior.
  • Differing-prefix/graph comparisons, all fourteen source actions, expected
    denials, exact full/resumed replay, independent codec/schema/RNG/artifact checks,
    documentation and hashed acceptance evidence.

Explicitly excluded

  • Paired research-family generation and scientific campaigns, owned by later
    backlog leaves. These tests are implementation fixtures.
  • Modeled restart/recovery, formal proofs and manuscript results. Checkpoints
    accelerate offline replay; the requested csaI Phase 5 supplement remains due.

Design intent

Seal and validate the entire tape before execution. Expose no mutable byte,
entry or RNG state. Bind the prefix to that tape, then stage copies for the
continuation. Preserve actual engine allocations even when issuance is denied;
missing parents cannot create authority. Policy/query expansion records actual
events without affecting the common source suffix or sampling future choices.

Archive whole-tape and continuation identities separately. A compressed reader
returns a sealed artifact only after framing, identity and complete tape
validation. It materializes the full tape and must discard partial failed writes.
Expected hashes establish manifest provenance when supplied; self-hashes alone
do not. The event transport extraction retains its prior reference fingerprint.

Phase discipline

Protocol 2.2 / backlog 2.2.1; Phase 2 only. The accepted schema-terminator bug
found during this work was filed separately as #646 and merged in #647; that
signed fix is integrated here. Frozen historical fixtures and protocol identities
remain intact.

Verification

  • All 91 CTests passed at signed implementation commit
    37ff6e476884f4b162a35eba8e5fb09c1ab4cf15 in Debug, Release and Clang
    ASan/UBSan, with no skips. All eight repository hooks passed.
  • Seven mechanisms each passed twelve tape/full/resumed cases. Boundary tests
    accepted 35 cases and rejected 31 malformed stream/identity cases per build.
  • Independent Python and zstd CLI checks verified 548 tape records, fourteen
    complete event streams and 56 checkpoints. Both reference fingerprints agree
    across all three configurations; the existing event fingerprint is unchanged.
  • Typed sealing, independent draw/schema/lexical checks, and all accepted replay
    corruption/schema regression tests passed. The frozen workspace scope passed.
  • Downloaded and hash-verified acceptance evidence.
    Tracked acceptance records are under artifacts/backlog/2.2.1/P2-09/.

The issue's three checklist steps will be checked once after all eight checks
pass on the final PR head, immediately before the guarded fast-forward merge.

CI integration

The first PR head's two sanitizer jobs hit the 15-minute overall deadline after
80 passing tests; neither had an assertion failure. #649 / #650 preserves the
failure evidence and raises the bounded job budget while retaining the full
suite and 120-second per-test limit.

Signed integration head 4838e393be82ddb58f930d2244b479baa78eec45 includes that fix. Every implementation,
test, schema and build-target file is byte-identical to validated source
37ff6e476884f4b162a35eba8e5fb09c1ab4cf15; all 25 acceptance output hashes still
match. The only additions relative to that source are the two original acceptance
records and the CI budget/documentation change. The existing three complete local
suite runs remain exact-source evidence; no redundant new local simulator run is
claimed. All hooks and the frozen workspace scope pass on the integrated head.

Integration identity and verification evidence, SHA-256
9ce938b3af99ca0e2ac18bbccece16d66a8c040e069dc2ca64c053648c361cb2. All eight final-head remote checks are required, and the merge guard
also verifies that every native issue dependency is closed before changing any
checklist item. #649 must close through its own PR first.

# Task Closes #100 (P2-09). ## Summary An expected denial can change a mechanism's graph and event count. The new immutable intent tapes keep the already generated source continuation identical across those outcomes. Logical handles resolve through engine-owned reservations, and every source action has an auditable range of actual v4 execution events. ## Scope ### Included - Closed canonical tape schema, sealed values, named RNG substreams and recorded draw provenance, logical dispatcher and immutable initialized prefixes. - Checksummed compressed tape artifacts with optional trusted expected hashes; shared bounded zstd transport preserves existing event replay behavior. - Differing-prefix/graph comparisons, all fourteen source actions, expected denials, exact full/resumed replay, independent codec/schema/RNG/artifact checks, documentation and hashed acceptance evidence. ### Explicitly excluded - Paired research-family generation and scientific campaigns, owned by later backlog leaves. These tests are implementation fixtures. - Modeled restart/recovery, formal proofs and manuscript results. Checkpoints accelerate offline replay; the requested csaI Phase 5 supplement remains due. ## Design intent Seal and validate the entire tape before execution. Expose no mutable byte, entry or RNG state. Bind the prefix to that tape, then stage copies for the continuation. Preserve actual engine allocations even when issuance is denied; missing parents cannot create authority. Policy/query expansion records actual events without affecting the common source suffix or sampling future choices. Archive whole-tape and continuation identities separately. A compressed reader returns a sealed artifact only after framing, identity and complete tape validation. It materializes the full tape and must discard partial failed writes. Expected hashes establish manifest provenance when supplied; self-hashes alone do not. The event transport extraction retains its prior reference fingerprint. ## Phase discipline Protocol 2.2 / backlog 2.2.1; Phase 2 only. The accepted schema-terminator bug found during this work was filed separately as #646 and merged in #647; that signed fix is integrated here. Frozen historical fixtures and protocol identities remain intact. ## Verification - All 91 CTests passed at signed implementation commit `37ff6e476884f4b162a35eba8e5fb09c1ab4cf15` in Debug, Release and Clang ASan/UBSan, with no skips. All eight repository hooks passed. - Seven mechanisms each passed twelve tape/full/resumed cases. Boundary tests accepted 35 cases and rejected 31 malformed stream/identity cases per build. - Independent Python and zstd CLI checks verified 548 tape records, fourteen complete event streams and 56 checkpoints. Both reference fingerprints agree across all three configurations; the existing event fingerprint is unchanged. - Typed sealing, independent draw/schema/lexical checks, and all accepted replay corruption/schema regression tests passed. The frozen workspace scope passed. - [Downloaded and hash-verified acceptance evidence](https://git.erikinkinen.fi/attachments/78f21f36-976c-4e41-b9ca-9b2f9a69da1d). Tracked acceptance records are under `artifacts/backlog/2.2.1/P2-09/`. The issue's three checklist steps will be checked once after all eight checks pass on the final PR head, immediately before the guarded fast-forward merge. ## CI integration <!-- p2-09-ci-budget-integration --> The first PR head's two sanitizer jobs hit the 15-minute overall deadline after 80 passing tests; neither had an assertion failure. #649 / #650 preserves the failure evidence and raises the bounded job budget while retaining the full suite and 120-second per-test limit. Signed integration head `4838e393be82ddb58f930d2244b479baa78eec45` includes that fix. Every implementation, test, schema and build-target file is byte-identical to validated source `37ff6e476884f4b162a35eba8e5fb09c1ab4cf15`; all 25 acceptance output hashes still match. The only additions relative to that source are the two original acceptance records and the CI budget/documentation change. The existing three complete local suite runs remain exact-source evidence; no redundant new local simulator run is claimed. All hooks and the frozen workspace scope pass on the integrated head. [Integration identity and verification evidence](https://git.erikinkinen.fi/attachments/51bee4e4-c340-4f5f-85d2-2c0cc8750995), SHA-256 `9ce938b3af99ca0e2ac18bbccece16d66a8c040e069dc2ca64c053648c361cb2`. All eight final-head remote checks are required, and the merge guard also verifies that every native issue dependency is closed before changing any checklist item. #649 must close through its own PR first.
erikinkinen added this to the Phase 2 milestone 2026-10-21 00:13:14 +02:00
Phase 2: record validated intent tape acceptance (#100)
Some checks failed
markdownlint / markdown-lint (push) Successful in 23s
markdownlint / markdown-lint (pull_request) Successful in 23s
clang-format / check-format (push) Successful in 39s
clang-format / check-format (pull_request) Successful in 41s
ci / smoke (pull_request) Successful in 11m10s
ci / smoke (push) Successful in 11m12s
ci / sanitizers (push) Failing after 15m1s
ci / sanitizers (pull_request) Failing after 15m1s
885bb62f80
CI: budget cold sanitizer jobs for the complete suite (#649)
Some checks failed
markdownlint / markdown-lint (pull_request) Successful in 18s
clang-format / check-format (pull_request) Successful in 35s
ci / smoke (pull_request) Successful in 9m59s
ci / sanitizers (pull_request) Successful in 13m3s
markdownlint / markdown-lint (push) Successful in 20s
clang-format / check-format (push) Successful in 34s
ci / smoke (push) Successful in 6m40s
ci / sanitizers (push) Has been cancelled
f47ad2925b
Phase 2: integrate sanitizer job budget fix for validation (#100, #649)
All checks were successful
clang-format / check-format (pull_request) Successful in 58s
markdownlint / markdown-lint (pull_request) Successful in 32s
ci / smoke (pull_request) Successful in 13m39s
ci / sanitizers (pull_request) Successful in 18m38s
markdownlint / markdown-lint (push) Successful in 13s
clang-format / check-format (push) Successful in 27s
ci / smoke (push) Successful in 6m31s
ci / sanitizers (push) Successful in 10m21s
4838e393be
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erikinkinen/AES!648
No description provided.