Conversation
`while (cond) : (step) { body }` parses to THREE children -- condition,
continue expression, body. Every `while` emitter read `children[1]` as
the body and never looked at `children[2]`.
spec while (i < corpus.len) : (i += 1) {
scores[i] = compute_similarity(query.embedding,
corpus[i].vector);
}
emitted while (i < corpus.len) {
i += 1;
}
A loop that advances a counter and computes nothing, in code all four
target languages accept.
The audit that found this (#2860) reported it for Zig. It is Zig, C,
Verilog AND Rust: four emitters, the same off-by-one into the child
list. Verilog is the one that reaches silicon.
6 sites across 4 specs, counted. None of the six bodies contains a
`continue` or a `break` -- which is what makes the repair correct for the
three languages that have no continue expression, where the step becomes
the LAST statement of the body. A `continue` would skip it, and that is
written beside each one rather than left to be discovered.
Zig gets the real `: (step)` form back.
The continue expression arrives wrapped in a block node: emitting
`children[1]` directly printed `/* unsupported expr: Module */` in C and
Verilog alike, so a shared `unwrap_single` descends to the statement.
Nothing moved, and that is the point -- the wrong loop was already valid:
zig ast-check 224 / 559 -> 224 / 559
cc accepts 171 -> 171
suite 2455 / 0 -> 2455 / 0
FROZEN_HASH resealed.
Refs #2860
gHashTag
enabled auto-merge (squash)
August 29, 2026 18:46
Contributor
PR DashboardGenerated at: 2026-08-29 18:46:47 UTC
Summary
Seal Status
|
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
This was referenced Aug 29, 2026
gHashTag
added a commit
that referenced
this pull request
Aug 29, 2026
…ived its failure (#2909) * fix(seals): re-seal 926 gen-drifted specs -- master has been red for 29 runs `seal-coverage` last passed on master at 588074c, 18:23. The first red is d7ee76d -- #2866, mine -- which changed four emitters, so generated output moved while the specs did not. The `coverage` check was already failing on PR #2866 when I merged it. Twenty-nine runs later the drift is cumulative: 926 seals [gen-drift] 926 gen_hash_rust 62 gen_hash_verilog 33 gen_hash_zig 31 gen_hash_c The gate calls re-sealing a STATEMENT that the new output is wanted and says to read the acceptance columns first. Read: corpus ratchet, master: UNEXPECTED PASSES 1 DISCARD WORSENED 0 GATE FAILURES 0 Red on an improvement -- one more spec passes than the ledger expects, nothing worsened. Acceptance is better than what is recorded, so this records outputs whose acceptance rose. That ledger entry (151 -> 150) belongs to the parallel session's #2906 and is not touched here. After: 1318 seals, 1224 hold, 94 known-broken already in seal_baseline.txt. `check_seal_coverage.py` exits 0, and its --self-check still exits 0, so the green is the gate working rather than the gate skipped. Closes #2908 * fix(ratchet): drop the emitter_xdc entry -- 151 -> 150, cap lowered with it The second of master's two red gates, and like the first it is not a regression. --- Ratchet (W628) --- ledger: 151 / 151 cap observed (primary): 150 UNEXPECTED FAILURES: 0 UNEXPECTED PASSES : 1 - specs/pins/emitter_xdc.t27 [typecheck] (fixed -- remove from the ledger) #2906 fixed it: an integer literal above i64::MAX fell to the float branch, so a bit mask read as a float initialising an integer. The spec typechecks; the ledger entry outlived the failure it recorded, and the ratchet named the repair itself. `max_entries` drops with the entry rather than staying at 151, so the slack cannot hide the next one. The reason is written into the file beside the number. Refs #2908
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.
while (cond) : (step) { body }parses to three children — condition, continue expression, body. Everywhileemitter readchildren[1]as the body and never looked atchildren[2].A loop that advances a counter and computes nothing — in code all four target languages accept.
Four backends, not one
The audit that found this (#2860) reported it for Zig. Checking the other three took one command each:
while (i < k) { i += 1; }while ((i < k)) { i += 1; }while ((i < k)) begin i = i + 1; endwhile (i < k) { i += 1; }Verilog is the one that reaches silicon.
6 sites, and why "step last" is correct at all of them
4 specs, 6 sites, counted. None of the six bodies contains a
continueor abreak— which is what makes the repair sound for the three languages with no continue expression, where the step becomes the last statement of the body. Acontinuewould skip it, and that limitation is written beside each emitter rather than left to be found later.Zig gets the real
: (step)form back.The step arrives wrapped
Emitting
children[1]directly printed/* unsupported expr: Module */in both C and Verilog — the continue expression is inside a block node. A sharedunwrap_singledescends to the statement.Nothing moved, and that is the point
zig ast-checkccacceptsiverilogon the affected specThe wrong loop was already valid. No acceptance measure could ever have caught this.
bootstrap/stage0/FROZEN_HASHresealed.Refs #2860