Skip to content

IR-744: consume admitted ContractPackage in routed code generation - #371

Merged
kreneskyp merged 13 commits into
mainfrom
code/ir-744-contract-package
Oct 12, 2026
Merged

kreneskyp merged 13 commits into
mainfrom
code/ir-744-contract-package

Conversation

@kreneskyp

@kreneskyp kreneskyp commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

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 ContractPackageV1 and 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_context for 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

  • On the pre-rebase head 2ec0b91: equality 35/35, exact function 42/42, routed 26/26, package controls 11/11; scoped Clippy, formatting, and make spec passed. The full make ci code/test stages passed (498 integration tests and one doctest). Its local advisory DB lock required an exact make deny retry, which passed; make cargo-audit audit-unsafe rustdoc and real make kani-gate (27/27) passed.
  • On the reviewed rebased head 188c8d3 over CG main c62ce32: 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.
  • Independent scoped code/Rust, gap, and spec reviews passed after the selected-occurrence fixes; the same reviewer passed the post-rebase delta.
  • On final exact head 188c8d3, literal make ci passed 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; exact make deny and make cargo-audit passed with advisory DB access, and make audit-unsafe rustdoc passed. The literal CI exit was 2 solely for that lock.
  • Literal make kani-gate passed all 27 real Kani cases, with Kani 0.68.0 and tree=clean on the same head.

@kreneskyp
kreneskyp force-pushed the code/ir-744-contract-package branch from a8d785e to 188c8d3 Compare October 12, 2026 09:13
@kreneskyp
kreneskyp marked this pull request as ready for review October 12, 2026 09:46
@kreneskyp
kreneskyp merged commit 2ac7cf6 into main Oct 12, 2026
3 checks passed
@kreneskyp
kreneskyp deleted the code/ir-744-contract-package branch October 12, 2026 09:47
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