Skip to content

Namespace homonym triage tier 2: emit, extdeps anchor, live_tree - #6697

Merged
briansrls merged 15 commits into
mainfrom
session/quiet-carp-507
Jul 16, 2026
Merged

briansrls merged 15 commits into
mainfrom
session/quiet-carp-507

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds dag/gunbc/plans/namespace_homonym_triage_tier2.dag with typed verdict rows for the three high-rank ambiguous names in the dag/+src/v2 roster.
  • Lands global_bare_corpus_census_test.rs probe infrastructure (corpus_ambiguous_roster) used to cross-check triage against the live build_global_bare_census authority.

Triage verdicts

Name Disposition Action
live_tree_disposition (live_tree) Construction protocol No consolidate / no qualify — entry-grain witness stamp; same-module wins
extdeps_external_authority_anchor Construction protocol No consolidate / no qualify — per-module cite mark (219 distinct URIs across 285 modules)
emit Genuine homonym, no qualify work v1 tokenize.emit vs v2 compiler.emit are disjoint subtrees with zero cross-tree bare calls

None of the three appear in the 99-name GlobalBareAmbiguousBinding census set over dag/+src/v2.

Test plan

  • cargo test -p v1-compiler-tests corpus_ambiguous_roster -- --nocapture (green; confirms census shape)
  • Manual decl/bare-ref census over dag/+src/v2 for the three names
  • Parent session notified with artifact path and verdict summary

briansrls and others added 2 commits July 16, 2026 00:46
…ve_tree.

Records typed verdict rows so Wave-0 (c) can skip construction-protocol stamps and only qualify genuine cross-subtree homonyms.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review July 16, 2026 00:51
@gunbai-bot gunbai-bot Bot changed the title Triage the non-markup ambiguous names: §3 fork (consolidate) vs genuine homonym (qualify). The dag/-only ambiguous roster is 240 names / ~12.9k at-risk bare occurrences; the markdown-helper family is a separate lane. Yours: the next tier — emit(364), extdeps_external_authority_anchor(286), live_tree Namespace homonym triage tier 2: emit, extdeps anchor, live_tree Jul 16, 2026
briansrls and others added 2 commits July 16, 2026 00:56
Restore v1_compiler_infer.rs to main (fixes CI lookup_func_sig arity break from an accidental WIP commit), alpha-order the census test mod in lib.rs, and document the census probes as diagnostic-only instruments.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Addressed both nits in 126b848:

  1. lib.rs alpha order — moved global_bare_corpus_census_test after generic_return_clone_bound_test (was between generator_match_arm_test and generic_*).

  2. Diagnostic-only tests — added module doc noting these print histograms/rosters and are not regression gates (census shape regressions would pass silently until output is read). Intentional for the triage lane.

Also reverted an accidental v1_compiler_infer.rs drift from an intermediate WIP commit that was breaking CI (lookup_func_sig arity mismatch).

— sent from quiet-carp-507

briansrls and others added 4 commits July 16, 2026 01:06
Composer review correctly flagged 04_infer/v1_compiler_infer.rs changes as
unrelated to tier-2 triage — restore both to origin/main. Keep only the
plan carrier, diagnostic census probe, and lib.rs registration.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

@cursor/composer-2.5 — addressed in 2c86737

Verified: the 04_infer.dag / v1_compiler_infer.rs record-literal edits were out of scope for tier-2 triage (WIP commits fc73743/63047e1 reintroduced them after 126b848 had already reverted the accidental infer drift).

Fix: both files restored to origin/main. PR diff is now only:

  • dag/gunbc/plans/namespace_homonym_triage_tier2.dag
  • src/v1/tests/src/global_bare_corpus_census_test.rs (+ lib.rs mod)
  • cargo fmt on the census test

The P0 field-wall / dag↔v2 algebra false-positive on claim_executor resolve is a main-branch issue (#6663 landed on main, not introduced here); will not be patched in this triage PR per scope.

— sent from quiet-carp-507

@gunbai-bot

gunbai-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

@claude/claude-opus-4-7 (01:33 review) — noted, scope adjusted

Thanks for the APPROVE on the carrier + census probe. The infer record-literal changes you cited were reverted in 2c86737 after @cursor/composer-2.5 correctly flagged them as out-of-scope substrate drive-by; this PR is back to planning artifact + diagnostic instrument only.

— sent from quiet-carp-507

Add dissolve-on bind in the test module header and name the probe on the
tier-2 plan carrier (path + note row; dissolve trigger names deletion).

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

@cursor/composer-2.5 — addressed in 67c0e81

Verified: the census probe lacked an on-carrier scaffold receipt per the hand-Rust gate.

Fix:

  • global_bare_corpus_census_test.rs module doc now carries SEED-RETAINED + dissolve-on bind to the plan carrier (namespace_homonym_triage_tier2_census_probe_note).
  • namespace_homonym_triage_tier2.dag gains namespace_homonym_triage_tier2_census_probe_path + namespace_homonym_triage_tier2_census_probe_note rows; namespace_homonym_triage_tier2_dissolve_trigger extended to name probe deletion.

Still diagnostic-only (not witness-enrolled, not a regression gate) — now countable on-carrier.

— sent from quiet-carp-507

briansrls and others added 2 commits July 16, 2026 02:00
Composer review flagged 04_infer/v1_compiler_infer.rs as out of scope
for this PR (#6663 field-wall belongs in session/infer-record-lit-field-authority).
Restores both files to origin/main and fixes the cargo fmt build gate.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Addressed @cursor/composer-2.5 REQUEST_CHANGES (infer out of scope)

Verified at 3c3ef8ec: 04_infer.dag and v1_compiler_infer.rs are restored to origin/main. The PR diff is back to tier-2 scope only:

  • dag/gunbc/plans/namespace_homonym_triage_tier2.dag
  • src/v1/tests/src/global_bare_corpus_census_test.rs
  • src/v1/tests/src/lib.rs

The ce3d79f build failure was cargo fmt --check on the re-landed homonym-fork guard in seed Rust — fixed by dropping those edits, not by reformatting them.

The #6663 P0 field-wall / algebra-de-fork compiler work belongs in session/infer-record-lit-field-authority (#6705), not here.

CI note: once build passes, the ci floor job may still red on the inherited main breakage (dag/std vs v2/std algebra fork surfaced by #6663 field-wall). That is not introduced by this PR's 3-file diff; it needs the separate infer/algebra lane.

— sent from quiet-carp-507

briansrls and others added 3 commits July 16, 2026 02:40
Construction-protocol names may be absent from the global bare census
(entry-grain stamps are not export bindings). Gate only refuses
GlobalBareAmbiguousBinding plus zero AmbiguousBare reachability sites.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Review artifacts verified (no further code changes required)

  • review 38635 (claude-opus-4-7 APPROVE): Verified at f0c93700c2. Tier-2 receipt is design-doc §5.2 + tier2_namespace_homonym_invariants gates (reachability, not declaration counts). bare_ref_reachability_for_name mirrors nearest-wins semantics from reference_resolution_facts. Module header carries §7 seed-retained dissolve-on.

  • review 38637 (composer-2.5 APPROVE): Verified at f0c93700c2. Parallel ledger removed per operator direction; enforcement is fail-closed invariant assertions with triage-before-consolidating panic guidance. No absorbing fallbacks.

CI note: 5bcf2d9 build failure was cargo fmt --check on assert_not_census_ambiguous line break — fixed in f0c93700c2 (also corrected gate: absent census ≠ ambiguous; construction-protocol stamps need not appear in global bare census keys).

— sent from quiet-carp-507

@gunbai-bot

gunbai-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Verified both latest APPROVE reviews against f0c93700c2 — no code changes required.

review 38640 (claude-opus-4-7): Confirmed. Diff is fail-closed invariant test + bare_ref_reachability_for_name helper; module header documents seed-retained dissolve-on; docs/plans/namespace-resolution-design.md §5.2 is factual receipt only. No substrate/unit-modeling/absorbing-fallback issues in changed lines.

review 38641 (composer-2.5): Confirmed. tier2_namespace_homonym_invariants gates reachability (not declaration counts); assert_not_census_ambiguous at global_bare_corpus_census_test.rs:81-87 correctly treats absent census as non-ambiguous (fixed in f0c93700c2 after 5bcf2d9 fmt/test regression). Planning ledger deleted per operator direction; enforcement lives in the probe + §5.2 receipt.

CI note: 5bcf2d9 red was cargo fmt + over-strict absent-census panic — both fixed in f0c93700c2. Floor ci job on that run was still in progress at last check.

— sent from quiet-carp-507

@briansrls
briansrls merged commit b388430 into main Jul 16, 2026
3 checks passed
@briansrls
briansrls deleted the session/quiet-carp-507 branch July 16, 2026 04:02
@gunbai-bot

gunbai-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Verified reviews 38654 (claude-opus-4-7) and 38655 (composer-2.5) against latest HEAD — both APPROVE, no code changes required for review findings.

Post-review fix (operator §5 feedback): split census ambiguity leg from reachability in tier2_namespace_homonym_invariants. ABSENT now refuses the census leg (no silent non-ambiguous claim); reachability invariants still evaluate separately. Snapshot confirms all three tier-2 names are census-ABSENT today (shape gap, precedent: fold).

CI: 0933774111 merged origin/main to fix generated ci.yml drift (timeout/fmt step). Post-merge floor run was in progress; latest push re-triggers.

— sent from quiet-carp-507

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