Skip to content

fix(specs): seven ml specs stop discarding tokens - #5575

Merged
dmitrii-f-t27 merged 1 commit into
masterfrom
fix/ml-spec-discards
Oct 2, 2026
Merged

dmitrii-f-t27 merged 1 commit into
masterfrom
fix/ml-spec-discards

Conversation

@dmitrii-f-t27

@dmitrii-f-t27 dmitrii-f-t27 commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

What

These are the last seven core specs that the corpus ratchet reported as newly discarding tokens after 2026-09-12, all under specs/ml/. After #5572 and this PR, the ratchet's unexpected failures go 29 -> 2. The two that remain are typechecker defects, filed with a patch as #5573 and #5574.

spec discarded repair
gelu_approx_activation 112 []f32{len = 3; [...]} pseudo-literals -> braced tests on real arrays (lengths, signs)
sgd 104 new f32[2]{...} / 3u32 -> braced tests; update moves both parameters; init runs on a fresh state, by value
attention_mechanism 729 [0.0] * 12, then result == void -> braced tests: output, gradients, causal masking
ppo_actor 463 BDD with loops and } -> braced tests: probabilities in [0,1] summing to 1, bounded log_std and actions, entropy >= 0
sac_critic 49 soft update -> braced test checking targets move toward sources (t = tau*s + (1-tau)*t)
contrastive_loss 1 the loop body was pasted twice; the copy read anchor[anchor_len] and its } closed the function before the average. Removed.
sigmoid_activation 22 a std.meta.fields reflection test t27 cannot lower is removed; the @sizeOf test beside it pins the empty config

Checks (on master db870cd)

  • t27c parse-complete --show: nothing discarded in any of the seven.
  • Every backend generates each spec exactly as on master.
  • t27c test-report (Zig 0.16.0): unchanged, except sigmoid's removed empty test. The other six are BLOCKED in Zig before and after.
  • Corpus ratchet: UNEXPECTED FAILURES: 2 (mha_block and disjoint_set, both [typecheck], A qualified call module::f is typechecked against the local f of the same name #5574 and A module-level var array is typechecked as const: W456 rejects every write into it #5573), UNEXPECTED PASSES: 0. DISCARD WORSENED: 7 is unchanged; those seven come from formal statements added on 2026-09-23..30 and are left for their author.
  • Assertionless, duplicate bodies, types ratchet: passing.
  • The seven specs are resealed. Published figures: test blocks 14331 -> 14330, x.len field reads 2199 -> 2191, abs( 418 -> 417, each with its reason.

Refs #5497

Dmitrii Fedorov (@dmitrii-f-t27)

The last seven core specs the corpus ratchet reported as newly discarding
tokens after 2026-09-12, all under specs/ml/:

- gelu_approx, sgd, attention_mechanism, ppo_actor, sac_critic: given/when/then
  blocks in pseudo-syntax ([]f32{len = 3; ...}, new f32[2]{...}, [0.0] * 12,
  `then result == void`, statements and loops inside clauses) become braced
  tests that keep their checks: batch lengths and signs, the SGD step moving
  both parameters, attention output and gradients and causal masking, PPO
  probabilities summing to one and bounded log_std and actions, the SAC soft
  update moving targets toward their sources.
- contrastive_loss: the loop body was pasted twice; the second copy read
  anchor[anchor_len] and its `}` closed the function before the average. Removed.
- sigmoid: a std.meta.fields reflection test t27 cannot lower is removed; the
  @sizeof test beside it already pins the empty config.

All seven parse with nothing discarded and generate in every backend as
before; Zig test-report unchanged but for sigmoid's removed empty test. The
seven are resealed.

Refs #5497

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

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

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-02 11:02:28 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 46
PRs with All Checks Green 4
READY 3
FAILING 46
PENDING 0
NO CHECKS YET 0

These columns do not partition: 3 + 46 + 0 + 0 = 49, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=b7d5cc5c4cf1 != 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).

@dmitrii-f-t27
dmitrii-f-t27 merged commit c994c05 into master Oct 2, 2026
31 of 36 checks passed
gHashTag added a commit that referenced this pull request Oct 5, 2026
…5575/#5287 overlap)

Refs #5083

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
dmitrii-f-t27 added a commit that referenced this pull request Oct 10, 2026
check_seal_currency.py reported 544 stale generated-code hashes on master
db870cd, and the seal-coverage gate restored by #5454 604 seals that no
longer hold. Nothing in the merge path reseals; the first gate sat behind
Spec Guards' first red step and the second was empty until #5454.

Why they moved, measured. 90 specs never changed while their output did:
bisecting t27c across the history puts it on the 2026-09-17 compiler changes
(#3962 "and the seal moves for it", #3973, #4114) and the 2026-09-08
gen-c/gen-rust wave, plus S07-S10 seals made with a pinned binary on
2026-10-01. 245 specs changed after sealing: 154 last edited by bee commits
that implement bodies and never reseal, 91 by repairs on master.

336 specs are resealed with the t27c built from master (compiler sources
unchanged since 756bcff): the 307 currency-stale ones and 29 more the
coverage gate flags, 34 of them hollow seals whose specs now generate.
specs/ar/ternary_logic.t27 still generates nowhere and is resealed with
--force, on the record as hollow. tri seals sync-twins: all consistent.

Currency stale 544 -> 14 and coverage 604 -> 14; the 14 are the seven
specs/ml/ seals #5575 reseals. Hollow 65 -> 31. A reseal records what the
compiler produces, not that it is correct, as in #3440 and #2909.

Refs #5497
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