Close the index-truncation class behind the C.1:2 policy - #2108
Merged
Conversation
The three residuals from the capacity work all get the latch treatment. Air::push_inst stops at the per-body ceiling and Air::finish reports it as E1401 through a typed validation-error kind instead of collapsing to E9000. CFG blocks and values latch per function -- unreachability is false because drop elaboration re-emits every live binding's drop at every return, so entities grow quadratically in source and reach 2^32 from about 3 MiB; the arithmetic is recorded in Appendix C. The type-pool latch window closes from both ends: reference-returning reads degrade to field-less aliased definitions only under the latch (a kind mismatch without it still panics, pinned by test), and both the declaration-binding and CFG-query boundaries stop before any layout or drop-fact query runs against an aliased universe. New Appendix C rows distinguish per-program from per-function ceilings; the fuzz ICE surface strictly shrinks.
steveklabnik
marked this pull request as ready for review
August 5, 2026 07:23
steveklabnik
enabled auto-merge
August 5, 2026 07:23
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.
Finishes the capacity work #2105 started: the three remaining silent-truncation residuals get the latch treatment, and the one unreachability hypothesis on offer turned out to be false.
Air::push_instlatches at the per-body ceiling;Air::finishreports it as E1401 through a typedAirValidationErrorKind(ResourceLimitvsStructural) instead of collapsing into E9000 — no signature change across the ten call sites. A latched owner's structural findings are all consequences of the truncation, so the latch is checked first.return, so entities grow quadratically (N droppable bindings × M returns), reaching 2^32 from ~3 MiB of source. The arithmetic is recorded in new informative rule C.6:5; the latch reports through a newCfgEditError::OwnerLimitExceeded(the existingResourceLimitExceededmessage is about per-program payload words and would have been wrong). Boundaries check beforeCfg::finish, where the verifier would otherwise raise E9000 first.expected on kind mismatches reachable between latch and report. Reference-returning reads now degrade to field-less aliased definitions only under the latch — a kind mismatch without it still panics, pinned by a#[should_panic]test, so the ICE surface for real producer bugs is unchanged — and both the declaration-binding boundary and the (moved-up) CFG-query boundary stop before any layout/drop-fact query runs against an aliased universe.Appendix C gains rows for typed-IR instructions per body and CFG blocks/values per function, plus informative C.6:4 distinguishing per-program from per-function ceilings — a convention the appendix previously lacked. Fuzz ICE surface strictly shrinks (the AIR path previously truncated into a downstream verifier abort);
is_iceuntouched.Fixes RUE-1226.
Three latent notes being filed as follow-up:
add_local_string_content's per-bodylen() as u32(same shape, same magnitude as the new AIR ceiling), the frozen-pool validating accessors that remain a latent abort for any future pre-binding read path, and the observation thatMAX_CFG_ENTITIES_PER_FUNCTIONbecomes load-bearing when the ADR-0049 inlining driver lands (growth turns multiplicative).Validation
Premerge (78/78), quick (re-run post-rebase), rue-air 687 (post-rebase) / cfg 243 / compiler 786 / fuzz 95, spec appendices (22) + traceability green (794/801 normative, same known-uncovered set), debug-assert policy validator, clippy, fmt, manual smoke compile.
Generated by Claude Code