Skip to content

own https://github.com/gunb-ai/gunbc/pull/11574 - #11695

Closed
briansrls wants to merge 59 commits into
mainfrom
pr-11574-rebase
Closed

briansrls wants to merge 59 commits into
mainfrom
pr-11574-rebase

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Auto-opened by session-dashboard for session still-carp-221.
Pushing to pr-11574-rebase advances this PR.

Worker attestation

Before flipping this PR to ready for review, confirm each item:

  • Title describes the change (not the session id or branch).
  • PR body summarises what and why (replace the TODO below).
  • Tests run: name the command (e.g. npm test, cargo test) and the result.
  • If this closes a work item, the body contains a Closes #N directive.
  • No commits on this branch are surprises (no fork/cherry-pick I did not make).
  • No secrets / credentials / large binaries staged.

Summary

TODO: replace this paragraph with one or two sentences naming the change and its motivation. Reviewers read this first.

Test plan

  • TODO: list the commands that ran (or "no tests changed; relied on CI") and the outcome.

Brian Searls and others added 30 commits September 18, 2026 03:58
Flattening kept fn members and dropped type/data shells (or reconstructed raw
parse units when nothing else was present). Graft those declarations as Named
containment so symbol_index_fill sees them regardless of neighboring fns.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…ion name.

Co-authored-by: Cursor <cursoragent@cursor.com>
…eld block.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…odule mentions.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…uence-left.

Co-authored-by: Cursor <cursoragent@cursor.com>
A record declaration can lose its type_decl shell while the field block
survives as a non-projection node, so unit collection never sees it.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…only for functions.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ield atoms.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…t-spine segment.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…sidual.

Co-authored-by: Cursor <cursoragent@cursor.com>
… QN spine.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…s standing RED.

Fielded records are lost in body_lower_type_decl (where-clause-only rehome), not in the flatten-drop arm this PR closed. Grafting field_decl_block here greened a different writer's defect.

Co-authored-by: Cursor <cursoragent@cursor.com>
…s per-PR.

A dag_/grammar_ prefix silently dropped user Named edges that happen to share those spellings. Flatten keep now keys off grammar production names and emitted identities. Green assemble rows move out of test/claim/long/; record rows stay there as the standing body_lowering RED.

Co-authored-by: Cursor <cursoragent@cursor.com>
Graft still skips field_decl_block. Those rows were flipped to presence as if record rehome had landed; they now measure the remaining body-lowering gap again, not flatten-drop.

Co-authored-by: Cursor <cursoragent@cursor.com>
Skipping field_decl_block as Absent and then taking nonempty combined deleted Rec beside Flag — the same silent-drop this PR closed for flatten. Reconstruct those residual units into the body; do not Named-rehome records.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Brian Searls and others added 27 commits September 18, 2026 10:26
…subtree walk.

Machinery filtering and unit collection now consume dag_grammar_root().productions from body_edges_for_graft instead of reconstructing the grammar per edge. parse_subtree_has_production and parse_subtree_find_production_captured both read parse_subtree_locate_production.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ted as not-named.

Declaration idents live in dag_surface_kw_then_ident_from_captured (sequence-right then sequence-left). Graft no longer DFS-widens on a miss; type and data units without a Named edge stay residuals. Record naming tests that greened on any assemble refusal are gone.

Co-authored-by: Cursor <cursoragent@cursor.com>
The sequence-right/left node walk is one decoder. alias_binding_row_binding_from_decl consumes it. body_lower_*_ident_from_captured still live in body_lowering_fold, which gunbc#11582 owns.

Co-authored-by: Cursor <cursoragent@cursor.com>
…d blocks.

field_decl_block also sits on coproduct variants; a anywhere-in-subtree skip left those types as reconstructed shells. Gate the residual on type_alias_rhs absence so Leaf | Node { … } and Bar {} become Named edges.

Co-authored-by: Cursor <cursoragent@cursor.com>
…n if.

The if arms disagreed (Optional<Node> vs Node) when typechecking the graft assemble claims after the record-form skip started locating type_alias_rhs as well as field_decl_block.

Co-authored-by: Cursor <cursoragent@cursor.com>
…residual.

Graft runs after sugar replaces type_alias_rhs with Disj, so alias-rhs absence alone still skipped Leaf | Node { … }.

Co-authored-by: Cursor <cursoragent@cursor.com>
…unit.

Sugar replaces type_alias_rhs with Disj, so looking only at the type_decl_target root still treated Leaf | Node { … } as a record residual. Pair a dummy fn on the new assemble controls so a miss cannot hide behind type-only graft dissolve.

Co-authored-by: Cursor <cursoragent@cursor.com>
… alias-rhs presence.

The unchosen type_decl choice arm still carried type_alias_rhs under `type Rec { … }`, so that skip Named-rehomed records and unbound Flag+Rec. Records stay residual; `type Foo = Bar {}` and Leaf | Cell { … } take the Named arm.

Co-authored-by: Cursor <cursoragent@cursor.com>
…homed records.

review 67681 is right that the skip is wider than records, but type_alias_rhs / `=` discriminators either missed post-sugar Disj coproducts or treated Rec as Named and unbound Flag+Rec. Record residual stays until body_lower_type_decl.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ker.

Call sites match parse_subtree_locate_production Optional directly. Flatten keeps Named members whose subtree holds Arrow or Disj via node_subtree_nodes, not a recursive is_* over every Conj.

Co-authored-by: Cursor <cursoragent@cursor.com>
…no capture.

parse_subtree_locate_production stays first-emitted-id; find_production_captured again walks children if that node has no captured child, which is the contract 06_translate still consumes. Rename the type_decl Disj search parameter to root — it is called on the type_decl unit, not the captured child.

Co-authored-by: Cursor <cursoragent@cursor.com>
…l_block Conj.

Dropping every Conj for review 67688 refused where-aliases, silent-drop Name, and
graft-shape on required-floor. Arrow/Disj stay; a Conj target is kept only when it
does not carry field_decl_block.

Co-authored-by: Cursor <cursoragent@cursor.com>
…d from decls.

Graft-shape exports are Named atoms, so requiring Arrow/Disj emptied the body.
Concatenating from_decls with flatten also duplicated Flag/alias names and refused
well-formed Conj (where-alias and Flag+Rec on required-floor f6ea532).

Co-authored-by: Cursor <cursoragent@cursor.com>
… for locate and find.

The field_decl_block residual and its next-rung trigger (body_lower_type_decl Named rehome)
were only in comments. find_production_captured now uses the same matching walk as locate,
continuing past a hit with no captured child.

Co-authored-by: Cursor <cursoragent@cursor.com>
The skip is locate of that production, so fielded variants take the same arm as records.
Nullary coproduct Named is a different class and does not stand for this row.

Co-authored-by: Cursor <cursoragent@cursor.com>
Leftover from the reverted flatten-by-Arrow/Disj pass.

Co-authored-by: Cursor <cursoragent@cursor.com>
body_edges_for_graft was walking each type_decl twice: once for Named edges and
again to collect residuals. One type_decl | data_decl dispatch classifies both.

Co-authored-by: Cursor <cursoragent@cursor.com>
field_decl_block type_decls are skipped from Named and kept as residual shells,
so Xl0Wrapper, Xl0FieldOnly, and fld are present on an Accepted ingest.

Co-authored-by: Cursor <cursoragent@cursor.com>
… present.

Partition already owns those decls. Walking them in flatten promoted record
fields to module members (native_decl collision, assemble unique-Named).
Absence probes that assumed the silent drop are now survival, matching XL-0.

Co-authored-by: Cursor <cursoragent@cursor.com>
…RHS.

Units that were neither type nor data vanished when flatten dropped them and
combined was nonempty. Each unit is now Named or residual. Flatten does not
walk top-level items. Type Named targets type_alias_rhs, not the first Disj.

Co-authored-by: Cursor <cursoragent@cursor.com>
… body_lowering_fold)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…hem), never reconstruct as a body shell

A residual import shell in the graft body is walked by resolve as bare
mentions and refuses any ingest whose closure lacks the imported module's
spine — v2.test.native_decl_selection's 4 witnesses went red on this
(green on origin/main with the same binary). Typed as
NamespaceGraftUnitDisposition { UnitNamed | UnitResidual | UnitDissolved };
the empty-combined arm reconstructs residuals only. Control enrolled:
declaration_graft_import_beside_fn_accepts_and_dissolves_the_import.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…readable as a spine segment

The containment spine is a chain of single-Named-edge Conj wrappers, and a
body whose only member targets a Conj has the same shape, so p { Flag: Conj }
read as module p.Flag (resolve_module_not_found on every type-only module;
CI declarations: unresolved-module-identities). Every spine consumer asks one
predicate and could only guess.

namespace_graft_build_body_conj now stamps the body with the provenance
vocabulary the module shell already uses,
grammar_production_identity_node_projection -> Atom(namespace_graft_module_body),
and namespace_graft_spine_segment_edge_optional stops at a marked body.
Export admission and the reference-site collector treat that edge as
machinery, as symbol_index_fill already did.

Witnesses: one_conj_member_body_is_not_a_segment_RED (fails with the marker
removed), two_segment_path_still_reads_two_segments (the other direction),
body_carries_producer_marker. Class rostered:
gunbc.recurring_failure_mode.one_encoding_carries_a_module_body_and_a_spine_segment.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…e refused the in-body form)

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

gunbai-bot Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Duplicate: this is #11574's rebase-in-progress branch (auto-opened by the dashboard). The work lands on #11574 once #11694 merges.

@gunbai-bot gunbai-bot Bot closed this Sep 19, 2026
@gunbai-bot
gunbai-bot Bot deleted the pr-11574-rebase branch September 19, 2026 07:03
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