Tighten IR construction and replay boundaries - #210
Draft
wangxiao1254 wants to merge 6 commits into
Draft
wangxiao1254 wants to merge 6 commits into
wangxiao1254 wants to merge 6 commits into
Conversation
wangxiao1254
force-pushed
the
audit/ir-foundations
branch
from
August 22, 2026 13:47
e8ad0af to
2fb1c26
Compare
wangxiao1254
force-pushed
the
audit/crypto-foundations
branch
from
August 22, 2026 13:47
ad590de to
b3c2173
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Tighten IR construction, persistence, scheduling, composition, session boundaries, and replay lifetimes while keeping trusted circuit code as the execution model.
Checks are concentrated at compile, load, raw-plan, and session boundaries; scalar, scheduled, and SIMD gate loops do not gain structural validation scans.
Changes
Frontend contracts
WireBundlevalues and width-preserving context rebinding;Ctx&;Program identity and validation
.empbcframing, reserved bytes, count narrowing, and write completion;Prepared execution
ScheduledProgram;Composition and chunked sessions
ComposePlan;Lifetimes and compaction
Source compatibility
DigestCtx::digestbecomesDigestCtx::value();digest_gate_stream()is the trace identity;digest_program()is the full structural identity;ScheduledProgramrather than a separately mutable plan;Tests
The suite covers compile-time frontend contracts, malformed programs/artifacts/files/plans, prepared schedule/SIMD replay, composition, chunk recording and reveal boundaries, float workspace lifetime, ClearSession ownership, dense validation, and compaction equivalence.
Stack
This is PR 5 of 6 and targets
audit/crypto-foundations.