Skip to content

[codex] prove integer refinement overflow parametrically - #2424

Merged
briansrls merged 9 commits into
mainfrom
session/keen-stag-28
May 9, 2026
Merged

briansrls merged 9 commits into
mainfrom
session/keen-stag-28

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Summary

Adds an R3 gate #21 integration receipt proving integer refinement overflow handling is parametric across fixed-width integer refinements, rather than a one-off UInt8 check.

The new test table exercises source-representable out-of-range literals for Int8, Int16, Int32, UInt8, UInt16, UInt32, UInt64, and UInt128, asserting the same structural MagnitudeOutOfRange diagnostic with exact target bounds and no fabricated fixes. It also checks alias routing for the widths whose overflow edges are fully representable by the current i64 source literal carrier.

Validation

  • cargo fmt --all --check
  • cargo test -p v3-compiler --test integration int_refinement_overflow_is_proven_parametric_for_representable_widths -- --nocapture
  • cargo test -p v3-compiler --test integration int_literal_cardinality_test -- --nocapture

@briansrls
briansrls marked this pull request as ready for review May 9, 2026 20:54
@briansrls
briansrls merged commit f2901cd into main May 9, 2026
4 checks passed
@briansrls
briansrls deleted the session/keen-stag-28 branch May 9, 2026 22:09

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: f69f2ab8 · Trigger: schedule
  • Thinking: 248s wall

Non-blocking — Strengths

  • src/v3/compiler/tests/integration/int_literal_cardinality_test.rs The added implementation-level overflow table checks the shared MagnitudeOutOfRange path across signed, unsigned, alias, and current source-carrier-limited integer refinements without introducing substrate state.

✅ No blocking concerns in the changed Rust-test surface.

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