Skip to content

fix(mir): validate global HIR type metadata - #677

Merged
sanohiro merged 1 commit into
mainfrom
agent/pkg-db-l2b-a2-am-g-t
Jul 30, 2026
Merged

fix(mir): validate global HIR type metadata#677
sanohiro merged 1 commit into
mainfrom
agent/pkg-db-l2b-a2-am-g-t

Conversation

@sanohiro

@sanohiro sanohiro commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • reject malformed program-global HIR type metadata before any MIR entrypoint publishes partial output
  • validate concrete roots, abstract template reachability, reference ranges, scalar widths and lanes, and inline recursive cycles with an iterative graph walk
  • preserve header-mediated recursion through heap, dynamic-array, task, and function headers
  • add exhaustive mutation/identity owners and a 512-root boundary benchmark

Validation

  • scripts/test-pr.sh
  • cargo clippy --workspace --all-targets --locked -- -D warnings
  • cargo test -p align_mir
  • cargo test -p align_driver --test per_unit_codegen
  • cargo clippy -p align_mir --all-targets --locked -- -D warnings
  • bench/library_boundary/run.sh (mir-global-type-validation: 0.240 ms/lower for 514 total HIR types)

Review

  • align-self-review: no unresolved findings
  • fresh adversarial preflight: one P2 test-coverage finding, closed by adding all ledger-required header-cycle twins across all four lowering entrypoints
  • final preflight verdict: clean

@sanohiro
sanohiro marked this pull request as ready for review July 30, 2026 18:09
@sanohiro
sanohiro merged commit dd215b2 into main Jul 30, 2026
5 of 6 checks passed
@sanohiro
sanohiro deleted the agent/pkg-db-l2b-a2-am-g-t branch July 30, 2026 18:09
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