Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ data call_expression_erased_at_v2_body_lowering: RecurringFailureMode = Recurrin
"CENSUS CONSEQUENCE, recorded because the cut consumes it: the whole-tree native census (the emitted closure binary's census mode) runs only tokenize, parse and normalize per file and never calls resolve, so its roster carries front-end refusals only. Restoring call lowering does not by itself add resolve refusals to that census. That needs the census mode to resolve per module as well.",

"CONSUMER-SIDE RECEIPT AND A SECOND SHAPE, 2026-09-13 (deep-newt-301, dispatched on `fold_shape_visible_to_no_lens`). The same route (tokenize, parse_module, normalize) was dumped for fold-family calls, which this class also erases, and for a body that is a `let` followed by a call. `{ fold(xs, init: 0, f: step) }` and `{ g(xs, init: 0, f: step) }` both become `Transform [ Atom dag_token_lbrace, Atom dag_token_int_literal, Atom step ]`: the named-argument VALUES survive as positional operands with their labels and the callee and positional `xs` dropped, which refines the earlier receipt's `a second named argument adds one node` -- what is kept is the value atom of each named argument, not the argument. The let form is a DIFFERENT erasure shape under the same class: `{ let seed = 0 \n fold(xs, init: seed, f: fn(acc, x) { .. }) }` lowers to a Bind whose body is a bare left/right sequence spine with `fold` as its leftmost atom and every right projection an empty Conj -- here the callee SURVIVES and the arguments, including an fn literal, do not, with the production shells stripped. So the two shapes lose complementary halves and neither carries a call. THE CONSUMER THIS SILENCES beyond resolve: `v2.lens.complexity_accumulator_copy.analyze`, a required root lens at the compile door, enumerates fold sites by seam Loop or by surface fold call, and both are produced only where fold_lowering runs BEFORE this erasure -- the sole-body position. A planted quadratic after a let, in a match arm or in an if branch is Accepted with no finding, in every step spelling; enrolled RED at `gunbc.explicit_witness_admission` as `let_prefixed_fold_copy_is_caught`, `match_arm_fold_copy_is_caught` and `declared_named_step_fold_copy_is_caught` in `src/v2/test/claim/long/accumulator_copy_fold_analysis_test.dag`, each dissolving on this row's trigger. The trigger's clause (iii) gains a shape: the controls must cover the let-prefixed body, whose loss is the argument half rather than the callee half.",

"PARTIAL REPAIR OF ONE SHAPE, AND THE TRIGGER IS NOT FIRED BY IT (2026-09-19, gunbc#11683, superseding gunbc#11612). A call whose CALLEE is a dotted chain -- `wall.peer.peer_leaf()`, in an expression body or a brace body -- previously lowered to the chain's FIRST ATOM with the remaining segments and the call itself dropped, so it lost both halves at once; the bare value chain `= wall.peer.peer_leaf` lost the same way even after gunbc#11582 built the spine, because the bottom-up reduce built the spine and the expression-body readers then decomposed it to its first atom, the spine not being recognised as lowered substrate. v2.compiler.body_lowering_fold body_lower_dotted_chain_lowered_optional now reads both shapes off one walk (DottedChainTailRead) at the three expression sites ABOVE the first-atom fallback, and body_lower_is_core_substrate admits the spine; a call on a non-final segment (`a.f().b`) is named by the walk and declined to the existing arms (see the next sentence). Measured on the normalize route before the repair: `{ x.step(a: 1) }` reached the arrow body as `x` and `= x.field` as `x`, so the receiver-method reading and the field-access refusal of body_lower_try_postfix_projection were never reached on that route and nothing that executes is retired by lowering the bare chains and the final-segment calls to the one spine; what the head denotes is the resolver's to decide. Executed evidence: v2.test.claim.body_lowering_qualified_path, whose subject is LOWERING and whose inputs are therefore SUPPLIED AT THAT BOUNDARY (DESIGN section 3; review 68361 on gunbc#11683). Four reds that fail on main before this repair -- bare value, final-segment call, block-body call and the LOCAL-RECEIVER call -- hand parser-shaped nodes the module constructs to body_lower_dotted_chain_lowered_optional and to the expression-body and brace-body sites that consult it, beside the bare-local control that stays an atom and body_lowering_first_atom_fallback_would_truncate_the_chain, which establishes that the fallback those sites sit above answers the head atom for the same input. The DESIGN section 3 pairing is discharged by exactly two route claims that execute the real stages: body_lowering_real_parser_emits_the_supplied_dotted_shape feeds the real parser's own postfix node to the same door, and body_lowering_qualified_value_reaches_arrow_body_whole runs tokenize-parse-normalize end to end and reads the real arrow body, so deleting either integration reddens a control. A CALL ON A NON-FINAL SEGMENT (`a.f().b`, the method-on-a-value shape) IS NAMED BY THE WALK AND DECLINED, STILL ERASED: it is live idiom -- v2.workflow.floor_diff_observe floor_env_optional, v2.workflow.floor_terminal_ledger_wire ledger_wire_field_at, v2.test.claim.cargo_build_run_argv_witness, v2.lens.schedule_lens (review 68280 on gunbc#11683) -- so refusing it would have turned normalize of those modules red; it is pinned as a today-row (body_lowering_call_before_end_is_erased_today_holds, the head atom the expression-body site still answers) beside body_lowering_call_before_end_is_named_and_declined, which reads the DECLINED verdict by name so a reader that simply stopped recognising the shape cannot satisfy the row. THE ARGUMENT HALF, MEASURED ON THE SAME ROUTE AND UNTOUCHED: a plain `{ step(a: x) }` reaches the arrow body as Transform(step) with the named argument dropped, `{ step(x, 1) }` as the bare literal `1`, and `{ x.step(a: 1) }` after this change as Transform(spine x.step) with no argument -- the callee half is repaired for the dotted shapes and the argument half stays as this row states it. WHAT THIS DOES NOT DISCHARGE, stated so the row is not read one rung high: this row's trigger names the whole call-expression population and demands argument-dependent NATIVE execution, a resolve-stage refusal for an undeclared callee, and controls that discriminate ARGUMENT-subtree loss. None of those is delivered here, the argument subtrees of other call shapes are untouched, and the row stays open at its stated rung.",
],

evidence: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ data dotted_reference_truncated_at_v2_body_lowering: RecurringFailureMode = Recu
"REPAIR, landed in the same change: v2.compiler.body_lowering_fold body_lower_dotted_reference_optional lowers every chain of bare segments (head plus one or more dot-suffixes, every suffix slot EMPTY) to the fold_list qualified-name spine built by v2.std.algebra fold_list_node, in the body operand reader, the postfix dispatch and the fn-body chain; body_lower_qualified_name_production_spine_optional does the same for a multi-segment dag_surface_qualified_name in type position; and dag_token_dot is no longer admitted as a binary operator. Lowering does not decide what the chain denotes: field access over a parameter and a module path are one containment relation (docs/plans/namespace-resolution-design.md section 3) and the resolver's unique-on-chain rule (section 13) is the one place with the scope to decide.",
"RUNG FOUND AT: outside the ladder -- silent wrongness. The lowering Accepted a program whose body it had rewritten to a different reference.",
"CEILING: structurally guaranteed. Whether a lowered node spells every segment of the surface chain it came from is decidable on the pair. The interim wall is mechanically preventable: v2.test.claim.namespace_xl0.call_argument_mention_survival asserts the WHOLE spelling reaches the collector and that no segment appears as a mention of its own; v2.test.claim.namespace_xl0.cross_module_reference_resolution asserts the full chain survives to the resolver: a declared cross-module target is FOUND and refused identity-unrepresentable (distinct from an undeclared one, which refuses unbound), and a same-module control stays Accepted.",
"NEXT-RUNG TRIGGER, naming the capability: the forward body producer derived from the grammar's own rows (v2.compiler.body_producer_forward, general-body-producer-design section 3) replacing the hand-walker, so that a postfix chain's lowering is the grammar relation row for dag_grammar_postfix_dot_suffix_expr read forward and a truncating arm has no place to be written. A chain whose LAST segment carries a call or brace suffix stays with call_expression_erased_at_v2_body_lowering's trigger; this row's repair deliberately answers Absent for it.",
"NEXT-RUNG TRIGGER, naming the capability: the forward body producer derived from the grammar's own rows (v2.compiler.body_producer_forward, general-body-producer-design section 3) replacing the hand-walker, so that a postfix chain's lowering is the grammar relation row for dag_grammar_postfix_dot_suffix_expr read forward and a truncating arm has no place to be written. A chain whose LAST segment carries a call or brace suffix stays with call_expression_erased_at_v2_body_lowering's trigger for its ARGUMENT half.",

"SUPERSEDED IN PART (2026-09-19, gunbc#11683). Two facts above no longer hold as written. A chain whose last segment carries a call or brace suffix is NO LONGER answered Absent: v2.compiler.body_lowering_fold body_lower_dotted_chain_lowered_optional reads both shapes off one walk (DottedChainTailRead) and lowers the callee to the same spine, so it is that producer -- not body_lower_dotted_reference_optional -- that answers at the three expression sites, while body_lower_dotted_reference_optional keeps the operand reader. What stays with call_expression_erased_at_v2_body_lowering is the ARGUMENT subtree, and a call on a NON-FINAL segment (`a.f().b`), which the walk names and declines.",
],
evidence: [
DeclarationRef { module_path: "v2.compiler.body_lowering_fold", decl_name: "body_lower_dotted_reference_optional", field: WholeDeclaration },
DeclarationRef { module_path: "v2.compiler.body_lowering_fold", decl_name: "body_lower_qualified_name_production_spine_optional", field: WholeDeclaration },
DeclarationRef { module_path: "v2.compiler.body_lowering_fold", decl_name: "body_lower_dotted_chain_lowered_optional", field: WholeDeclaration },
],
}
Loading