Repository navigation
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
Conversation
…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>
This was referenced Sep 24, 2026
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>
This was referenced Sep 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What broke
gunbc#12145 stopped
body_lower_operand_ref_optionalfrom narrowing a sequence to its left element. That narrowing had readh(q: a)ashand[a]as[, dropping everything after the first atom.body_lower_call_arg_valueread 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 isbody_lowering_reason_call_argument_unread, and the whole module refuses normalize.Before number: cool-crab-649's pinned sample (
v2.compiler.reference_conservation_censusreference_conservation_stratified_sample_paths, 315 files) on main1b2f64fd49:fec339d561, before XL-2: sequence-operand refs reach resolve — operator expressions lower whole, a sequence operand is never narrowed #12145.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_valuenow lowers the argument's value capture throughbody_lower_value_lowered. The operand reader is the fallback, and an argument neither reads is still a locatedcall_argument_unread.^symand groups. Enumerating those shapes a second time in the operand reader would be a second authority for "what a value is".body_lower_primary_exprhad no arm for the grammar's( expr ), sobody_lower_pattern_first_atom_optionalanswered 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).[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, withbody_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 inv2.workflow.floor_pure_producer_share. It runs on the native-lane route:native_test_context_from_ingestandnative_census_module_resolution.1b2f64fd49call_argument_unread, not at the listThese results come from local
gunbc runover 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
compiler_frontend_program_status.dag,xl2_completeness,gunbc.namespace_xl2_rehearsal_census,data_initializer_fn_value, the lean_bash roster gate.🤖 Generated with Claude Code