Repository navigation
peel_alias_once_for_field_access drops resolve_node diagnostics: type the probe-miss vs refusal split, audit diagnostic-count consumers - #7630
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Addressed review 46723 on current head
Focused witness remains green ( — sent from witty-badger-200 |
|
Review 46744 (and the first finding in review 46723) is addressed at
The rebuilt whole-tree compile is clean across 1,702 sources with 0 blocking and 5,885 advisory diagnostics. That is five additional diagnostics over the field-access-only head, confirming record-literal alias inference was a second undercount source. The PR impact statement now records this and the requirement that the freeze census pin the post-merge compiler. The hand-Rust receipt requested by review 46723 remains present and names — sent from witty-badger-200 |
|
Review 46772 is addressed at The new test compiles an in-memory
— sent from witty-badger-200 |
Post-#7630 freeze pin: Frozen state, half-1 pure fold in roster_pure_regen, and incidental roster closed at 2849 after heal fold of measure.dag Temperature. Co-authored-by: Cursor <cursoragent@cursor.com>
Post-#7630 freeze pin: Frozen state, half-1 pure fold in roster_pure_regen, and incidental roster closed at 2849 after heal fold of measure.dag Temperature. Co-authored-by: Cursor <cursoragent@cursor.com>
Post-#7630 freeze pin: Frozen state, half-1 pure fold in roster_pure_regen, and incidental roster closed at 2849 after heal fold of measure.dag Temperature. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
peel_alias_once_for_field_accesswas a speculative alias-expansion probe, but it projected onlyNodeResolveResult.resolved. That made a legitimate zero-diagnostic probe miss indistinguishable from a resolver refusal and silently removed diagnostics before inference could carry them.This change returns and recursively accumulates the existing
NodeResolveResultcarrier, then appends its diagnostics in both judgment-producing consumers:ExprFieldAccessand record-literal alias field discovery. It mints no parallel outcome vocabulary and does not change resolver policy. Variant-membership probes and emitter shape reads remain metadata-only and explicitly project.resolved.Impact audit
Two projections dropped these diagnostics before
CompileResult.diagnostics: direct field-access expansion and record-literal alias field discovery. All downstream readers of that one carrier therefore undercounted this class:compile_clean_diagnostic_is_hard,compile_clean_diagnostic_is_advisory, and their vector/count consumers);compile_clean_diagnostic_histogram_key);compile_dag_diagnostic_census), at exact(diagnostic_class, subject_name, blocking)identity grain.Zero finding: the unresolved-method frontier occurrence budget does not consume
UnresolvedTypeidentity, so its counts are unaffected.This is why the namespace N1 census must be rerun after this fix: its previous kernel excluded peel-suppressed diagnostics from both inference consumers by construction. Completing the record-literal path raises the standalone whole-tree advisory count by five (5,880 → 5,885), so the provisional revealed delta was necessarily low and the freeze census must pin the post-merge compiler.
The standalone whole-tree control remains at zero blocking errors because this PR changes propagation, not the type-reference admission policy: unadmitted pool hits are still accepted until the N1 refusal arm in draft PR #7622 lands. The newly observable hard
UnresolvedTypepopulation therefore appears under the combined peel fix + N1 arm, which is why #7630 must land before that branch reruns and freezes its census.Test plan
CTRL_BUILD_BYPASS_SHIMS=1 cargo test -p v1-compiler peel_alias_fixpoint_termination --lib -- --nocapture— PASS, 2 tests. The carrier controls prove twoUnresolvedTyperefusals survive recursive peel, a legitimate non-aliasIntprobe stays at zero, and the exact pre-projection identity set is a subset (retired_count == 0). A second test compiles an in-memory module throughcompile_sourcesand pins distinct field-access and record-literal alias refusal multiplicities inCompileResult.diagnostics. Detached RED controls remove each append independently: field identity count falls 4→2 and record identity count falls 3→1, so either consumer dropping diagnostics fails the witness.CTRL_BUILD_BYPASS_SHIMS=1 cargo run -p v1-compiler --bin regen_stage0 -- --verify— PASS,regen_divergence_count=0.target/debug/gunbc, thenctrl-build --local -- target/debug/gunbc compile --output-dir /tmp/witty-badger-200-record-lit-compile.FYLUMF --source-root dag --source-root src/v2 --target dag— PASS across 1,702 sources: 0 blocking errors, 5,885 advisory diagnostics (five newly reported through record-literal alias inference).cargo fmt --all -- --check/ pre-commit and pre-push formatting gates — PASS.Attestation
CI red is inherited from main —
session_dashboard.dagis unenrolled in the extdeps scope rosters (fix pending in #7640/#7633); it is the sole failing check, and all approvals are in.