Skip to content

A body may open with a call — and a clause keyword is not one - #2785

Merged
gHashTag merged 6 commits into
masterfrom
w699-rung12-parked
Aug 29, 2026
Merged

A body may open with a call — and a clause keyword is not one#2785
gHashTag merged 6 commits into
masterfrom
w699-rung12-parked

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Refs #2754, #2774

Rung 12

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 exactly why the shape had never been reached. Clause keywords are now excluded.

before after
discarded tokens 23 926 23 644 (−282)
specs discarding 76 75
Zig / rustc / cc / iverilog / ALL FOUR 214 / 214 / 163 / 373 / 66 all held

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:

> 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 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:

class events share
quantification 901 93.5%
other 53 5.5%
mathematical = for equality 6 0.6%
Zig-style for capture 4 0.4%

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 — which makes that issue not "a construct in 35 specs" but nearly everything that is left.

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

🤖 Generated with Claude Code

gHashTag and others added 3 commits August 29, 2026 12:37
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>
@github-actions

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-29 06:24:01 UTC

Summary

Status Count
Total Open PRs 9
PRs with Failing Checks 7
PRs with All Checks Green 2
READY 0
FAILING 7
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=d25ac0cc159e != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

# Conflicts:
#	docs/reports/suite_expectations.json
gHashTag and others added 2 commits August 29, 2026 13:45
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
@github-actions

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-29 06:55:07 UTC

Summary

Status Count
Total Open PRs 8
PRs with Failing Checks 7
PRs with All Checks Green 1
READY 0
FAILING 7
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=d25ac0cc159e != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag
gHashTag merged commit eec142a into master Aug 29, 2026
34 checks passed
@gHashTag
gHashTag deleted the w699-rung12-parked branch August 29, 2026 07:08
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