Skip to content

Resolver-minted declaration references carry an unauthorable marker; the reader never keys on the spine shape a literal also has - #12220

Merged
gunbai-bot[bot] merged 2 commits into
mainfrom
session/crisp-koi-558
Sep 24, 2026
Merged

gunbai-bot[bot] merged 2 commits into
mainfrom
session/crisp-koi-558

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Defect

v2.std.qualified_name declaration_reference_path_optional recognised a resolved declaration reference by the spine shape (a Conj cons list). An integer literal lowers to the same cons list of digit atoms (#12197), so 606060 read as the "path" integer_tag_digit_6.integer_tag_digit_0… (found by stern-moth-549 via #12218).

Construction (parent ruling: option A)

  • 03_resolve resolved_reference_node now mints through a new v2.std.qualified_name declaration_reference_node: a one-edge Conj whose only Named label is declaration_reference_marker(), placed over the unchanged spine.
  • The marker's lexeme is <declaration-reference>. That is not a dag identifier, so no record field, binder or dotted mention in source can spell it. The record-literal collision (records lower to Conj with user-chosen field labels) therefore cannot be written. This reuses existing vocabulary (Conj + Named edge + an interned symbol); nothing is added to the closed six-connective set of DESIGN §4.
  • declaration_reference_path_optional keys on the marker and never on the shape. A bare spine answers Absent.
  • Rung: 4 (structurally impossible) at the surface-source grain. It stays at 3 at the Node-construction grain, because .dag code can call the constructor. The recurring-failure-mode row states the trigger for climbing further: a way to restrict constructor visibility.

Consumers (all read through the reader; none relies on shape)

  • 04_infer infer_gather_fold_init
  • 05_eval eval_type_node_atom
  • 06_translate translate_algebra
  • v2.compiler.reference_closure reference_closure_declaring_paths
  • v2.test.claim.namespace_xl0.cross_module_reference_resolution
  • v2.test.claim.translate.declaration_reference_form: updated to build the reference with declaration_reference_node

Callers of qualified_name_from_node / qualified_name_spine_shape_present (reference_site_collector, body_lowering_fold, 03_resolve qualified arm, lens.reference_deps, target_model) read authored, pre-resolution spines. That is their subject, and it is unchanged.

Controls: v2.test.claim.qualified_name.declaration_reference_marker, run locally with claim_batch --entry

witness this head main's shape-keyed reader swapped back in
…integer_literal_reads_as_no_reference (606060 via dag_int_literal_node_from_lexeme, every subtree node) PASS FAIL
…marked_reference_reads_its_exact_path PASS FAIL
…unmarked_spine_reads_as_no_reference (mutation: marker dropped) PASS FAIL
…identifier_labelled_wrapper_reads_as_no_reference PASS PASS

Real-route inhabitance: all 13 witnesses in cross_module_reference_resolution pass, reading the resolver's actual output through the marked reader. All 4 in declaration_reference_form pass.

#12218 interim guard

The SymbolIndex-membership guard (cc68171) lives on #12218's branch, not on main, so this PR cannot remove it. Once this lands the guard is redundant: a literal no longer reads as a reference. I've told stern-moth-549 it can be deleted after merging main.

Recurring failure mode

gunbc.recurring_failure_mode declaration_reference_recognised_by_a_shape_a_literal_also_has, with the 606060 specimen.

srv1 evidence (neat-boar-16, head 4fdf1b2, seed 37570341…)

Seed Rust: none touched. Not merging; neat-boar-16 enqueues it.

🤖 Generated with Claude Code

Brian Searls and others added 2 commits September 24, 2026 09:04
… on, never the spine shape a literal also has

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…so one occurrence is carried by one node

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@gunbai-bot

gunbai-bot Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

Addressed review 70854 (duplicated occurrence identity) in the latest commit. declaration_reference_node now builds the inner spine with OccurrenceSynthetic, so the source occurrence is carried only by the marker node. The comment now says exactly that. After the change I re-ran all three witness files locally with claim_batch --entry:

  • declaration_reference_marker: 4/4 pass
  • cross_module_reference_resolution: 13/13 pass
  • declaration_reference_form: 4/4 pass

— sent from crisp-koi-558

@gunbai-bot
gunbai-bot Bot added this pull request to the merge queue Sep 24, 2026
Merged via the queue into main with commit 219c306 Sep 24, 2026
5 checks passed
@gunbai-bot
gunbai-bot Bot deleted the session/crisp-koi-558 branch September 24, 2026 14:00
@briansrls
briansrls restored the session/crisp-koi-558 branch September 24, 2026 14:06
gunbai-bot Bot pushed a commit that referenced this pull request Sep 24, 2026
…d head and the derived FreeMonoid<T> name FreeMonoid through declaration_reference_node, the resolved carrier the shared reader recognises

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
gunbai-bot Bot pushed a commit that referenced this pull request Sep 25, 2026
…er; drop the redundant index guard

- adjudicate_cli_emit_probe judges the fixture member's arm, decoded from
  the door's ClosureEmission carrier by the new cli_door_member_arm, never
  stdout as a whole. On exit 0 the emitted arm must pass the existing
  name + 606060 + rustc oracle; a refused arm under exit 0 is
  EmittedWithoutSubstance. On a refusal, stdout may be the carrier or empty
  and nothing else. The reason still comes from the rendered chain on
  stderr: only CLI_DOOR_EMIT_BODY_REFUSAL is BodyRefusalReturned, and any
  other reason is DeterminingReasonDiffers.
  Unit tests: stdout now takes the carrier shape, plus two new rows.
  native_lane_runner 32/32.
- #12220's resolver marker makes declaration_reference_path_optional read
  a literal as no reference, so the SymbolIndex-membership guard
  (cc68171) and the fold's index parameter are deleted. The 606060
  regression row in reference_closure_test stays.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
gunbai-bot Bot pushed a commit that referenced this pull request Sep 25, 2026
…reads as NOT an application

- application_head_read: a Transform the list reader recognises answers NotApplicationHead before
  its head is classified, so application_slots / application_read and the head-only readers never
  read a list as a malformed call (agreed with warm-ram-650: the second of #12202/#12208 to land
  adds it).
- list_introduction_elements_optional reads the head in BOTH forms: the marked declaration
  reference (post-resolve, #12220) and the bare qualified-name spine body lowering writes, since
  application_read also runs over lowered bodies. Safe because the path is compared for exact
  equality with the FreeMonoid path.
- Controls: a lowered list argument and a resolved list introduction read as NotApplication; the
  call enclosing the list still reads as an Application.
- Import conflicts resolved as unions with the moved fns from std.algebra.

Co-Authored-By: Claude Opus 5.5 (1M context) <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.

0 participants