Skip to content

XL-2 hotfix: call arguments lower as values; nested-call/record args no longer refuse the whole module (list args still refuse, located) - #12173

Merged
gunbai-bot[bot] merged 4 commits into
mainfrom
session/fierce-hawk-274-call-arg-read
Sep 24, 2026
Merged

gunbai-bot[bot] merged 4 commits into
mainfrom
session/fierce-hawk-274-call-arg-read

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

What broke

gunbc#12145 stopped body_lower_operand_ref_optional from narrowing a sequence to its left element. That narrowing had read h(q: a) as h and [a] as [, dropping everything after the first atom. body_lower_call_arg_value read every argument with that operand reader alone. After #12145, an argument whose value is a nested call, a record literal, a caret symbol, a parenthesised group or a list literal answers Absent. The result is body_lowering_reason_call_argument_unread, and the whole module refuses normalize.

Before number: cool-crab-649's pinned sample (v2.compiler.reference_conservation_census reference_conservation_stratified_sample_paths, 315 files) on main 1b2f64fd49:

The repair (the earliest wrong link, DESIGN §6b)

The wrong link was the argument reader, not the operand reader. A call argument is a value, and the fold already has a value reader: body_lower_value_lowered, used by field initializers and if-conditions (the bottom-up fold, then the walker).

  • body_lower_call_arg_value now lowers the argument's value capture through body_lower_value_lowered. The operand reader is the fallback, and an argument neither reads is still a located call_argument_unread.
    • This departs, with a reason, from the suggestion to route list and call sequences inside the operand reader. The value reader already covers nested calls, records, ^sym and groups. Enumerating those shapes a second time in the operand reader would be a second authority for "what a value is".
  • Parenthesised group. body_lower_primary_expr had no arm for the grammar's ( expr ), so body_lower_pattern_first_atom_optional answered it with (. The inner name was silently dropped on every route. A group now lowers to its inner expression, or refuses at the group (body_lowering_reason_paren_group_unread).
  • List literals still refuse (ruling C). Body lowering has no lowered form for a list literal on any route: [a] becomes [. Accepting list arguments now would trade a loud refusal for a silent drop. So a list literal anywhere inside an argument value refuses at the list, with body_lowering_reason_list_literal_unlowered. "Anywhere" includes a list inside a record argument this reader now accepts. List-literal lowering on every route is the next PR, in this lane.

Evidence

The witness is v2.test.claim.namespace_xl0.call_argument_value_resolve_refusal: 12 claims over one warm front end, enrolled in v2.workflow.floor_pure_producer_share. It runs on the native-lane route: native_test_context_from_ingest and native_census_module_resolution.

claim main 1b2f64fd49 this head
undeclared name in a nested-call argument → unbound at its atom red (module refused) green
… in a positional nested-call argument red green
… in a record-literal argument red green
… in a parenthesised argument red green
named list / positional list / list in nested call / list in record → refuses at the list red: refused as call_argument_unread, not at the list green
control: literal and string arguments resolve red green
control: nullary-call argument resolves red green
control: declared names in nested-call and record arguments resolve red green
neighbour: undeclared plain-name argument → unbound at its atom green green

These results come from local gunbc run over a ProcessExit entry that ANDs the 12 claims, run once against each fold.

After number: pending. The same 315-file sample on this head is running now. I'll post the refusing-module count and the silent-drop count as a comment, including how many of the remaining refusals are list-literal arguments.

Scope

🤖 Generated with Claude Code

Brian Searls and others added 4 commits September 23, 2026 20:10
…d arguments no longer refuse the whole module

gunbc#12145 stopped the operand reader narrowing a sequence to its left element,
which had read h(q: a) as h and [a] as [. body_lower_call_arg_value read every
argument with that reader alone, so a nested call, record, caret symbol or
parenthesised group became call_argument_unread and its whole module refused
normalize. An argument's value is now lowered by body_lower_value_lowered (the
field-initializer / if-condition reader), with the operand reader as fallback.
A parenthesised group lowers to its inner expression instead of its first atom.
A list literal anywhere in an argument value still refuses, at the list
(body_lowering_reason_list_literal_unlowered): body lowering has no lowered form
for a list literal yet, so reading it would trade a refusal for a silent drop.
Witness: v2.test.claim.namespace_xl0.call_argument_value_resolve_refusal.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…e no longer refuses the whole match

body_lower_match_scrutinee_optional read the scrutinee with the operand reader
alone: before gunbc#12145 match t(p: x) {..} narrowed to t, after it the match
refused as match_arm_navigation_refused (64 of the 133 still-refusing sample
modules). The scrutinee now goes through body_lower_value_lowered, operand reader
as fallback, refusal propagated. Witness claim: an undeclared name inside a call
scrutinee refuses at resolve at its atom.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@gunbai-bot
gunbai-bot Bot added this pull request to the merge queue Sep 24, 2026
Merged via the queue into main with commit bc61f22 Sep 24, 2026
5 checks passed
@gunbai-bot
gunbai-bot Bot deleted the session/fierce-hawk-274-call-arg-read branch September 24, 2026 04:52
gunbai-bot Bot pushed a commit that referenced this pull request Sep 24, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
gunbai-bot Bot pushed a commit that referenced this pull request Sep 24, 2026
 landed) into MQ-1

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
gunbai-bot Bot pushed a commit that referenced this pull request Sep 24, 2026
…2173 repaired, identity counts, holds vs expected-red separated (side-chat verdict)

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