Repository navigation
Repair the coproduct-variant-name escape in 05_emit_rust already-filter (:3496): local_decl_names takes ONE name per top-level ITEM so variant names are never in it, a bare self-reference falls to the closure-global last-write-wins registry and a fabricated pub use is synthesised - fix module-local - #9523
briansrls wants to merge 3 commits into
Conversation
…port candidates
reference_derived_use_lines already filters candidates against the names the
module declares, and its own note names the hazard: the bare-name registry is
last-write-wins across the closure, so a homonym in another module steals the
row and a self-colliding `pub use` is synthesized. The filter was written over
`items` -- one authored name per TOP-LEVEL item -- and a coproduct's variants
are CHILDREN of the item, so they never entered it. The guard was at the wrong
grain, not missing.
A bare self-reference to a local variant therefore fell through to
`map_get(registry, name)`, resolved to whichever module last wrote that global
name, passed export proof, and got a use-line for a symbol the module already
binds itself.
The variant set is read from each coproduct item's OWN children, never from
`emit_info.variant_to_enum` or `type_summaries`: both are keyed by bare name and
carry the same closure-global last-write-wins, so answering a module-local
question through them would reintroduce the defect one layer down.
MEASURED, two arms, each built from its own stage0 mirror, over the emitted
closure of `src/v2/compiler/00_compile.dag` (175 files):
membership delta: exactly one file, `v2_std_node.rs`, which loses
pub use crate::std_constructors::{Cardinality};
use crate::std_constructors::Cardinality::*;
`Cardinality` is a variant of v2.std.node's own `Connective`; the homonym is
`std.constructors`' `type Cardinality = Required | Optional`. Nothing else in
the 175 files changes membership -- the predicted set exactly.
regen is a fixed point with the mirror installed
(first_generation_equal=true, 136/136), so the v1 seed closure moves zero
bytes.
CONTROL, and it is a finding rather than a pass: run-to-run over the same
binary, BOTH the unmodified and the modified compiler emit
`v2_lens_enforcement_vocab.rs` and `v2_std_cross_tree_resolution.rs` with
import blocks in varying ORDER (identical membership). That instability is
present on main, is not caused by this change, and is why the arm comparison
is stated at membership grain for those two files.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
# Conflicts: # src/v1/05_emit_rust.dag # src/v1/stage0/src/v1_compiler_emit_rust.rs
|
No fix owed — the failure is on a superseded head, and the current head is already fully green.
The failing run is on The alert reports "1 failing" because a failed check-run from the older head is still attached to the PR; that is a property of the check-run list, not of this head. — sent from snappy-dove-250 |
|
Closing as SUPERSEDED by #9461, not as rejected — the defect this PR describes is real and the repair it proposes is the one that shipped. Measured, not inferred.
and a direct file comparison between main and this branch produces zero differing lines mentioning Every line that is unique to this branch is older content main has since revised — the pre- Why the diff looked like it still had content: One note for whoever picks up the underlying class, since the fix landed without executing evidence: neither this PR nor #9461 carries a discriminating RED. A witness is authorable via the The branch's merge conflict was in the generated mirror — sent from snappy-dove-250 |
Auto-opened by session-dashboard for session
deep-raven-866.Pushing to
session/deep-raven-866advances this PR.Worker attestation
Before flipping this PR to ready for review, confirm each item:
npm test,cargo test) and the result.Closes #Ndirective.Summary
TODO: replace this paragraph with one or two sentences naming the change and its motivation. Reviewers read this first.
Test plan