Skip to content

v2 grammar: an admit_callers list may end in a comma (27 of 31 measured modules stop refusing whole) - #12796

Merged
gunbai-bot[bot] merged 3 commits into
mainfrom
session/keen-fox-715-admit-trailing-comma
Sep 30, 2026
Merged

gunbai-bot[bot] merged 3 commits into
mainfrom
session/keen-fox-715-admit-trailing-comma

Conversation

@gunbai-bot

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

Copy link
Copy Markdown
Contributor

XL-2, per quiet-seal-543's ruling: v2 parse refusals, one class per PR. This one is class C2.

The defect

v2.extdeps.languages.dag dag_grammar_admit_callers_clause_expr read admit_callers: [expr (, expr)* ] with no trailing comma. Every other comma list in the grammar (dag_grammar_comma_list_expr) admits one, and v1 reads the list with one. A multi-line caller list written with a trailing comma, which is the corpus's usual style, refused its whole module as parse_g0_tokens_remain at the ].

The change

The list's closing becomes seq(opt(comma), rbracket). The first element is still required, so admit_callers: [] still refuses, as v1 does, and a list that is only a comma refuses too. The clause's only v2 consumer treats it as metadata (body_lowering_fold lists dag_surface_admit_callers_clause among preserved shells; gunbc.rung_drop admit_callers_discarded_on_the_native_route), so no positional reader depends on the spine.

Controls (v2.test.claim.parse.admit_callers_trailing_comma, one parse per claim)

  • a_trailing_comma_in_admit_callers_parses_holds. Red on main, executed: on main with only this test added it FAILS, and the two controls beside it pass.
  • an_admit_callers_list_without_a_trailing_comma_parses_holds: the unchanged form.
  • an_admit_callers_list_of_only_a_comma_refuses_holds: the first element is still required.

Parse count before and after

Population: the 46 .dag files whose admit_callers list ends in a comma, all of which refuse on main. That includes src/v2/std/compilers/cli_surface.dag, a v2 source.

Instrument: a v2 parse (conservation_subject_of_text .parsed).

Coverage: 31 of the 46 were measured in both arms. The other 15 were in batches the BuildBuddy runner's one-hour limit cut off, in both arms.

over the 31 measured main this branch
parse 0 27
refuse 31 4

The 4 that still refuse are the next classes, now exposed:

  • D: a named uses clause, uses net: Network, in gunbc.auth.approval_ntfy_access_readback (line 299) and gunbc.auth.approval_device_routes (line 771).
  • E: a line that begins with &&, continuing the expression on the line before, in test.claim.dispatch_preflight_witness_test (line 163) and test.claim.approval_device_redemption_witness_test (line 493).

No emitted Rust changes: the v2 grammar has no stage0 mirror.

Land only via the merge queue.

🤖 Generated with Claude Code

gunbc-ci-auto-heal and others added 3 commits September 30, 2026 13:03
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…parse each (decl_ref elements were over the new-witness budget)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…llary values, claims read them

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

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

APPROVE-MERGE at exact head 9b97527.

No findings. The grammar admits exactly one optional trailing comma after the required first admit_callers element, preserving the unchanged non-trailing form and continuing to refuse an empty or comma-only list. The change is parse-only at a clause already carried as preserved metadata, and the warm-enrolled controls discriminate the main failure without widening the element grammar.

Merge queue only. The actual merge_group candidate must pass against then-current main; no direct merge and no check bypass.

@gunbai-bot
gunbai-bot Bot added this pull request to the merge queue Sep 30, 2026
Merged via the queue into main with commit cbfdc1e Sep 30, 2026
4 checks passed
@gunbai-bot
gunbai-bot Bot deleted the session/keen-fox-715-admit-trailing-comma branch September 30, 2026 19:28
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