A body may open with a call — and a clause keyword is not one - #2785
Merged
Conversation
W699 rung 12, PARKED UNMERGED. Written and measured, not landed: the repository
owner has forked to continue the parser line, and this touches the same arm.
A bench body beginning with a call --
bench ternary_not_performance
@setEvalBranchQuota(10000);
var result : i32 = 0;
-- had no earlier clause to take a column from, so `first_clause_col` was still
None, the bare-call arm never ran, and the whole block fell back. The const/var
arm already seeds the column from the statement itself when it is the first thing
in the block (W904); this is the same seed. The `c > 1` guard against unindented
blocks is unchanged, and a failed parse un-seeds the column so a later shallower
statement cannot pass a guard on a column the block never established.
Measured in a dirty tree, which is how it was found:
discarded tokens 23926 -> 23738 (-188)
specs discarding 76 -> 75
NOT verified beyond that: no corpus run, no conformance case, no re-bless. Whoever
picks this up owes it those three things.
Refs #2754
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This case was written with the rung-12 fix and left behind in the working tree
when the fix was parked. On master it is a test for a fix that is not there:
`parse-conform` exits 1 with
case a_body_may_open_with_a_call
expected Full with 1 decl(s), 0 discarded
actual Full with 1 decl(s), 14 discarded
A case and the change it covers are one unit. Splitting them leaves a red gate
behind and a fix nobody can tell is load-bearing.
Refs #2754
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ot one
W699 rung 12, plus the regression it caused and the ledger entry that caught it.
A body that OPENS with a call had no earlier clause to take a column from, so
`first_clause_col` was None and the bare-call arm never ran:
bench ternary_not_performance
@setEvalBranchQuota(10000); <- and everything after it
var result : i32 = 0;
The const/var arm already seeds the column from the statement itself (W904); this
is the same seed.
THE SEED EXPOSED A HOLE NOTHING HAD EVER TESTED. `given (exp, mant) = f(15)` is
an identifier followed by `(`, so the bare-call arm matched a CLAUSE KEYWORD.
Before the seed the arm could not reach a block's first token at all, which is
why the shape had never been reached. Clause keywords are now excluded.
discarded tokens 23926 -> 23644 (-282)
specs discarding 76 -> 75
Zig 214, rustc 214, cc 163, iverilog 373, ALL FOUR 66 -- all held
THE PER-ENTRY RATCHET CAUGHT ITS AUTHOR, ONE DAY OLD. With only the seed, the
corpus total FELL and no acceptance column moved -- a clean win by every
aggregate. The ledger disagreed:
> phi_split_optimality.t27 discards 214, pinned at 129 (+85)
> phi_universal_attractor.t27 discards 108, pinned at 73 (+35)
A total that falls can hide two entries that rose. That is what #2777 was for.
AND MY FIRST FIX FOR IT WAS WRONG. I assumed the seed skewed the W905 clause
anchor and stopped writing `first_clause_col`. The total went 23 738 -> 24 046
and the spec was still broken: a plausible cause, disproved in one build. The
real one was the clause keyword.
Also here: docs/DISCARD_WHAT_IS_LEFT.md -- a census of the 964 remaining fallback
events, classified by reading the source line each fired on. 93.5% is
QUANTIFICATION in four notations, which makes #2774 not "a construct in 35 specs"
but nearly everything left. It also corrects this loop's own earlier report,
which called the 38 `for` events a Zig-capture syntax problem: 35 of the 38 are
quantifier SUFFIXES (`... for all Trit`) and belong to #2774.
parse-conform 25/25, new case load-bearing
cargo test --no-fail-fast 2432 passed, 0 failed
suite --ratchet RATCHET: CLEAN, ledger 167 -> 166
check_seal_coverage.py exit 0
check_elab_ratchet.py exit 0
check_specs_generate.py exit 0
Skill 179-181, including the one about this checkout being shared: this branch
was parked under me mid-iteration by another session and the work was finished
in a private worktree.
Refs #2754, #2774
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
# Conflicts: # docs/reports/suite_expectations.json
The W700 pin (`max_gate_failures`) came in from master; the discard numbers are this branch's. Their schema, my measurements. Refs #2754 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
# Conflicts: # .claude/skills/ci-gates/SKILL.md
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
PR DashboardGenerated at: 2026-08-29 06:55:07 UTC
Summary
Seal Status
|
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.
Refs #2754, #2774
Rung 12
A body that opens with a call had no earlier clause to take a column from, so
first_clause_colwasNoneand the bare-call arm never ran:The
const/vararm already seeds the column from the statement itself (W904); this is the same seed.The seed exposed a hole nothing had ever tested
given (exp, mant) = f(15)is an identifier followed by(, so the bare-call arm matched a clause keyword. Before the seed the arm could not reach a block's first token at all — which is exactly why the shape had never been reached. Clause keywords are now excluded.The per-entry ratchet caught its author, one day old
With only the seed, the corpus total fell — 23 926 → 23 738 — and no acceptance column moved. A clean win by every aggregate. The ledger disagreed:
A total that falls can hide two entries that rose. That is what #2777 was for, and it worked on the next change after it landed.
And my first fix for it was wrong
I assumed the seed skewed the W905 clause anchor and stopped writing
first_clause_col. The total went 23 738 → 24 046 and the spec was still broken — a plausible cause, disproved in one build. The real one was the clause keyword.docs/DISCARD_WHAT_IS_LEFT.md
A census of the 964 remaining fallback events, classified by reading the source line each one fired on:
=for equalityforcaptureIt also corrects this loop's own earlier report, which called the 38
forevents a Zig-capture syntax problem. 35 of the 38 are quantifier suffixes (… for all Trit) and belong to #2774 — which makes that issue not "a construct in 35 specs" but nearly everything that is left.🤖 Generated with Claude Code