Skip to content

Lane A: kill E0255 std_dup at the emitter root (local-decl exclusion + use-symbol ownership) + re-probe wave carriers - #7097

Merged
briansrls merged 29 commits into
mainfrom
session/smart-crane-730
Jul 23, 2026
Merged

briansrls merged 29 commits into
mainfrom
session/smart-crane-730

Conversation

@briansrls

@briansrls briansrls commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Lane A (XL): kills the E0255 std_dup class at its emitter root and rides the resulting re-probe onto the self-host frontier (probe TSVs, flips where cargo-green, plan-row updates).

Summary

Seam probe (decides the fix location, by execution). The E0255 List defined multiple times resurfacence (v1_deletion_plan std_dup_assembly_fix, first-error on the curated 4-module baseline) is emitter-root: the raw pre-assembly emit of the 04_infer closure already carries the colliding lines (pub use crate::v2_std_collection::List; into std_types.rs, which declares type List<element> itself; same shape for Map and GroupCompletion); cssl assembly introduces none.

Fix A — local-decl exclusion (reference_derived_use_lines, src/v1/05_emit_rust.dag): a name the module itself declares is never a synthesized-import candidate. The pass previously consulted only the bare-name last-write-wins registry, so a dual-std-tree homonym stole the row and the pass emitted a self-colliding pub-use. By execution on 04_infer: E0255 zero (was first-error); the unmasked residue is recorded per-module in the TSV. Discriminating RED control: new local_homonym arm in tools.namespace_import_closure_behavioral_transport (consumer declares an alias colliding with a provider enum) — verified in both directions (pre-fix binary emits the colliding line; post-fix does not); receipt PASS wet.

Fix B — cross-line use-symbol ownership (strip_repeated_use_symbols ending dedupe_rust_import_lines): within a module header a symbol binds through exactly one crate-use line; later repeats via a second transitive provider path drop, emptied lines disappear. This moves the last live cssl sanitize rule (dedupe_pub_use_symbols, its recorded dissolution trigger) to the construction seam. Proven on the measured firing (emit_produced closure, duplicate Optional via v2_std_grammar + v2_std_collection — now gone; whole-closure raw census 0).

Both fixes hold regen_stage0 at a 2-generation byte fixed point (divergence 0) — a green seed contains no duplicate bindings, so the passes are byte-inert on it by construction.

Named emit class (parent-directed carrier): curated_cargo_probe_record_fold_accumulator in frontier_probe_types.dag — the v1 emitter cannot faithfully emit compound-record fold accumulators (dropped-receiver field access, Rc<Vec<()>> mistyping); hit by execution while writing fix B; list-accumulator workaround noted in the row.

Probe instrumentation (classifier v3): curated_cargo_probe_one.sh gains residual_histogram (every rustc E-code + count — rustc masks later layers behind first_error; operator hard requirement) and raw_dup_pub_use (duplicate pub-use census on the raw emit BEFORE assembly rewrites — the by-execution receipt for dissolving the sanitize rule); unshimmed greens are CARGO_GREEN, PHANTOM reserved for lane-shimmed greens.

Wave results (complete)

  • Definitive 21-module sweep TSV landed (docs/probes/curated_cargo_frontier_probe_sweep.tsv, classifier rule1-first-error-plus-residual-histogram-v3): E0255 = zero occurrences in any first_error or any histogram; raw dup-pub-use census = 0 on all 20 measurable rows (program_assembly is emit_fail — no artifact exists for the rule to fire on).
  • cssl sanitize scaffold DISSOLVED (its recorded trigger fired): dedupe_pub_use_symbols / sanitize_emitter_artifact_in_place + fixture tests deleted; assembly now leaves emit-retained artifacts byte-untouched; remaining 8 assembly unit tests green; a fold_lowering re-probe through the sanitize-free assembly reproduces its sweep row byte-identically.
  • Flips: ZERO — no module reaches cargo-green; the negative result is the receipt (2026-07-21 precedent). The unmasked successor classes are measured per-module: six deep modules share ONE type-ref histogram shape (E0433:15 E0425:14 E0422:8 E0109:8 E0107:6 E0391:1 — few shared-closure roots, exactly one E0391 cycle everywhere); materialization_carriers is the repr outlier (E0308:87 E0277:80 E0599:66 E0369:61); the rest is Lane D's emit-shape/dotted family.
  • Frontier refresh: 6 knowledge_attributed rows → execution_measured on the sweep (attributed triggers removed per the 2026-07-22 disentangle ruling); 03_name_resolve corrected off ProbeStageAssemble (its closure contamination is gone — it now emits+assembles and refuses at cargo); honest_frontier_refresh_2026_07_23_note; census tests 10/10 green.
  • v1_deletion_plan re-based: std_dup_assembly_fix → Placed with the emitter root named; import-closure pub-use gap closed; emit_representation_mismatch re-sized from ~4400-corpus-wide to one-module-deep (materialization_carriers); deep_module_lanes/probe_flip_fanout re-pointed at the measured successor classes.

The 03_normalize wet-receipt red (stale hand shims vs post-#7057 closure) is routed to stern-badger-729 — deliberately not absorbed here.

Test plan

  • regen_stage0 --verify → divergence 0 (both fixes, 2-gen)
  • 04_infer cssl probe (CSSL_STD_SEED_LINK=1): E0255 first-error → gone; residual histogram recorded
  • emit_produced raw-emit census: duplicate pub-use symbols 1 → 0
  • claim_batch --entry dag/test/claim/namespace_import_closure_witness_test.dag --function namespace_import_closure_receipt_holds --wet → PASS (incl. new homonym arm; red arm still refuses)
  • A/B fixture vs pre-fix binary (origin/main control worktree): colliding line present pre-fix, absent post-fix

Brian Searls and others added 13 commits July 23, 2026 01:59
…s (E0255 std_dup root)

Seam probe by execution (04_infer cssl closure, raw emit pre-assembly): the
E0255 'List defined multiple times' class is EMITTER-root — the reference-derived
use-line pass consulted only the bare-name last-write-wins registry, so a
dual-tree homonym (dag/std List/Map/GroupCompletion vs src/v2/std twins) steals
the registry row and the pass synthesizes a pub-use that collides with the
module's own declaration (std_types.rs List/Map, std_algebra.rs GroupCompletion).

Fix: local-decl exclusion in reference_derived_use_lines — candidates fold
local_type_names + authored item names into the exclusion map before registry
lookup (containment binds a bare ref to the module's own declaration first).
Byte-inert on the green seed by construction; regen_stage0 stage-2 divergence 0
(only v1_compiler_emit_rust.rs changes, the edit's own footprint).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…sifier v3)

Two new TSV columns per operator requirement (2026-07-22): residual_histogram
(every rustc E-code + count — rustc masks later layers behind first_error) and
raw_dup_pub_use (duplicate symbols across pub-use lines measured on the RAW emit
BEFORE assembly rewrites — the by-execution census for dissolving the last cssl
sanitize rule). Green verdict split: CARGO_GREEN for unshimmed builds; PHANTOM
retained only where a lane shim replaced the cssl lib.rs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gunbai-bot gunbai-bot Bot changed the title Lane A: std_dup seam probe + fix + cargo-green flip wave Lane A: kill E0255 std_dup at the emitter root (local-decl exclusion + use-symbol ownership) + re-probe wave carriers Jul 23, 2026
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review July 23, 2026 04:53
@cursor

cursor Bot commented Jul 23, 2026

Copy link
Copy Markdown

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.

…ymbols (advisory b)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gunbai-bot

gunbai-bot Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Re review 41673 (both advisories addressed):

(a) Variant names in the local-decl filter — confirmed unreachable by execution, no code change needed. Fixture: a provider declaring a top-level type PilotRed homonym + a consumer declaring type PilotColor = PilotRed | PilotGreen | PilotBlue locally and returning bare PilotRed from a fn body, with a genuine cross-module ref alongside. The emitted consumer header synthesizes only the genuine refs (PilotWidget, pilot_provider_widget_default) and binds the local variant through use self::PilotColor::*; — no PilotRed use-line appears. Variant references don't enter the candidate walk as importable names (they ride is_known_variant routing plus the local enum's self-glob), so the exclusion set is complete for the class as framed.

(b) dissolve-on for strip_repeated_use_symbols — landed in strip_repeated_use_symbols_note (commit 3c9f8ed): the pass is named a bounded post-hoc scaffold and dissolves when the import surface derives from one symbol→provider ownership map built before any line renders (duplicates unwritable by construction), or when the resolver step-2 typed refusal replaces reference-derived synthesis (the existing nic_scaffold_dissolution_trigger event); the raw_dup_pub_use sweep column is the census that must read zero first. Seed regen included, divergence 0.

— sent from smart-crane-730

@gunbai-bot

gunbai-bot Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Addressed in 6aac97e (three items, one push):

  1. Seed/authority drift on strip_repeated_use_symbols (review 41751 blocker, also the minor in reviews 41737/41750): the .dag rewrite to the linear symbol→owning-line owner map is now regenerated into the seed — v1_compiler_emit_rust.rs carries the owner-map shape (single-pass build, per-line projection), two-generation fixed point, regen_divergence_count=0. The quadratic per-line seen recomputation is gone from both carriers.

  2. The CI regen-gate red on d559e92 (field 'alias' not found in type 'Present') was a merge-ref collision with v1 seed alias-decl parse arm (§13): syntax spec row + v1.compiler.parse arm + typecheck-env binding + regen fixed-point + corpus probe (dissolves the walk_target_alias_apply corpus --write gate) #7094, which made alias an item-declaration keyword in the v1 parser: my Present { value: alias } binding in rust_use_bound_symbol misparsed under the merged grammar (local checkout without v1 seed alias-decl parse arm (§13): syntax spec row + v1.compiler.parse arm + typecheck-env binding + regen fixed-point + corpus probe (dissolves the walk_target_alias_apply corpus --write gate) #7094 passed, merge ref failed). Renamed the binding to bound_name. regen_stage0 --emit-fresh --verify green locally on the merged tree.

  3. Roster dedupe: merged origin/main and dropped this PR's nfr backfill block in favor of main's Main-latent nfr red: roster the two #7088 cheap-gate wildcard sites (unblocks PR floors) #7114 block (one authority for the backfill provenance); nfr witness trio PASS locally with the deduped roster.

— sent from smart-crane-730

@briansrls
briansrls merged commit cae46ae into main Jul 23, 2026
3 checks passed
@briansrls
briansrls deleted the session/smart-crane-730 branch July 23, 2026 12:27
briansrls added a commit that referenced this pull request Jul 23, 2026
…ior auto-commit race

The auto-committer captured a WIP snapshot mid-merge (commit 7c25ef6) before this
session's conflict resolution had been staged, landing raw <<<<<<</=======/>>>>>>>
markers in docs/probes/curated_cargo_frontier_probe_sweep.tsv and
src/v2/compiler/self_host/frontier_probe_types.dag (flagged by review 41850).

Resolution: adopt main's v3 TSV schema/rows (docs/probes/curated_cargo_frontier_probe_sweep.tsv)
as the base — a full re-sweep against the merged code (both Lane D's dotted-name emit fixes
and Lane A's std_dup fix, #7097) is in progress to refresh it with true post-merge state.
For frontier_probe_types.dag, kept BOTH honest_frontier_refresh_2026_07_23_note (Lane D) and
honest_frontier_refresh_2026_07_23_lane_a_note (Lane A, renamed from the conflicting duplicate
name) since they document distinct, complementary work rather than competing claims.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Jul 23, 2026
…pe-position) + orch_while falsifier fast-lane relocation (#7098)

* WIP: Lane D: emit-shape dotted-name roots + While-emit falsifier reds

* WIP: Lane D: emit-shape dotted-name roots + While-emit falsifier reds

* WIP: Lane D: emit-shape dotted-name roots + While-emit falsifier reds

* WIP: Lane D: emit-shape dotted-name roots + While-emit falsifier reds

* WIP: Lane D: emit-shape dotted-name roots + While-emit falsifier reds

* WIP: Lane D: emit-shape dotted-name roots + While-emit falsifier reds

* WIP: Lane D: emit-shape dotted-name roots + While-emit falsifier reds

* WIP: Lane D: emit-shape dotted-name roots + While-emit falsifier reds

* WIP: Lane D: emit-shape dotted-name roots + While-emit falsifier reds

* WIP: Lane D: emit-shape dotted-name roots + While-emit falsifier reds

* WIP: Lane D: emit-shape dotted-name roots + While-emit falsifier reds

* WIP: Lane D: emit-shape dotted-name roots + While-emit falsifier reds

* WIP: Lane D: emit-shape dotted-name roots + While-emit falsifier reds

* Fix recipe wording in orch_while_long_lane_note (gunbc run --function, not claim_batch --functions)

Corrects the local-recipe command in the note added per cursor review 41792's
suggestion (PR #7098) to match the actual CLI surface, verified by execution.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Resolve merge-conflict markers left in TSV/frontier_probe_types by prior auto-commit race

The auto-committer captured a WIP snapshot mid-merge (commit 7c25ef6) before this
session's conflict resolution had been staged, landing raw <<<<<<</=======/>>>>>>>
markers in docs/probes/curated_cargo_frontier_probe_sweep.tsv and
src/v2/compiler/self_host/frontier_probe_types.dag (flagged by review 41850).

Resolution: adopt main's v3 TSV schema/rows (docs/probes/curated_cargo_frontier_probe_sweep.tsv)
as the base — a full re-sweep against the merged code (both Lane D's dotted-name emit fixes
and Lane A's std_dup fix, #7097) is in progress to refresh it with true post-merge state.
For frontier_probe_types.dag, kept BOTH honest_frontier_refresh_2026_07_23_note (Lane D) and
honest_frontier_refresh_2026_07_23_lane_a_note (Lane A, renamed from the conflicting duplicate
name) since they document distinct, complementary work rather than competing claims.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* WIP: Lane D: emit-shape dotted-name roots + While-emit falsifier reds

---------

Co-authored-by: Brian Searls <briansrls@gunb.ai>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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