Repository navigation
IR-744: consume admitted ContractPackage in routed code generation - #371
Merged
Merged
Conversation
kreneskyp
force-pushed
the
code/ir-744-contract-package
branch
from
October 12, 2026 09:13
a8d785e to
188c8d3
Compare
kreneskyp
marked this pull request as ready for review
October 12, 2026 09:46
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.
Problem and result
CG previously routed from a checked V2 graph after Contract IR had already admitted an FR-330 package. This change uses one admitted
ContractPackageV1and its full-root accounting sequence for package-backed settlement and generation. Every driver request retains its position, node identity, source occurrences, and caller-selected scalar application/conversion occurrence. Context-only roots remain distinct, and refused siblings keep typed IR accounting without an artifact.CG owns the routed lowering profile for built-in scalar, equality, and exact-function tags. The scalar package path reads Contract IR's
result_contextfor the selected occurrence; the equality and function paths consume the admitted reached closure. Routed Kani selects the exact sorted scalar claim entry while detecting duplicates by the selected application/conversion pair. Two positions sharing an expression node but selecting different conversions produce separate proofs with their own bounds; repeating one pair retains the typed duplicate refusal. Claim-map order and generated names are stable across request permutations within one admitted package. The direct V2 scalar and schedule APIs remain separate.Specs FR-014, FR-018, FR-021, FR-022, and FR-039 describe package admission, accounting, and refusal precedence.
Validation
2ec0b91: equality 35/35, exact function 42/42, routed 26/26, package controls 11/11; scoped Clippy, formatting, andmake specpassed. The fullmake cicode/test stages passed (498 integration tests and one doctest). Its local advisory DB lock required an exactmake denyretry, which passed;make cargo-audit audit-unsafe rustdocand realmake kani-gate(27/27) passed.188c8d3over CG mainc62ce32:cargo check --locked --offline --tests, all-target Clippy, formatting and diff checks passed. Focused operator-catalog, scalar, function, routed Kani distinct-selection, repeated-selection, and direct FR-015 controls passed.188c8d3, literalmake cipassed fmt, spec validation, Clippy, MSRV, 247 library tests, 500 integration tests (27 ignored for the Kani lane), and one doctest. It stopped at the sandbox's read-only advisory DB lock; exactmake denyandmake cargo-auditpassed with advisory DB access, andmake audit-unsafe rustdocpassed. The literal CI exit was 2 solely for that lock.make kani-gatepassed all 27 real Kani cases, with Kani 0.68.0 andtree=cleanon the same head.