Skip to content

fix(lint): ez 1.16.0, bolt 1.65.0; clear bolt findings - #62

Merged
ngngardner merged 4 commits into
mainfrom
build/bolt-1.65
Nov 16, 2026
Merged

ngngardner merged 4 commits into
mainfrom
build/bolt-1.65

Conversation

@ngngardner

@ngngardner ngngardner commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

What moved

  • [tools.bolt] v1.27.0 → v1.65.0 (bolt check is now the lint command); flake input ez → v1.16.0 (c9f4855), whose mkLint runs bolt check for that pin. bend stays at 222de99 (2.0.40).
  • bolt.bend: the retired param setting is removed (C011), and the closed, coverage and wrap overrides that held findings at warn are removed too. Every group is at error and bolt check prints clean.

Rules fixed

Errors:

  • S009 x14: side.tail takes the packed table selects; the sr.* gain search carries its window and best fit as Sw/Bs; an.blk and cs.pack become list literals; d9.build is split into d9.even/d9.odd.
  • S011 x3: hf.go, c1.go, guid.is match their two scrutinees together.
  • C011 x1: param removed from bolt.bend.

Warnings:

  • S003 x48: one parameter per line; long proof hypotheses name their check.
  • L001 x9: the clip readers (f32, rate, channels, format, count, concat) are reached by quantified laws. The unused bit reader in src/mp3.bend (Bit, Br, Acc and its defs) is deleted.
  • L002 x99: 42 closed laws became 38 quantified ones: clip fields, count, concat, fill, binary32 clamping (NaN, ±big, kept), MP3 header fields, the 44100 Hz pad cycle for every stream length, encoder headers for both pad bits, RIFF/WAVE/fmt ids for every encoded file, WAV refusals (non-RIFF, zero rate, wide s16, sizes past a U32), and WAV reads for every tail after the file. The other 57 each checked a single fixture, so they are no longer laws. They now run as tests (see below).

count.of now branches on a Bool so its law can be proved. LAWS.bend, the law files and the README say which statements are laws and point at the fixture tests.

Fixtures as tests

Every closed law this PR removed is back as a test. That is the 57 deleted ones plus the 10 whose names changed when they were quantified (fill, RIFF tags, clamp words, wav_rate_wraps), so 67 in all. They live in tests/fixtures.bend, which prints one ok <name> line per fixture against its #| trailer and uses the exact expected values the laws stated. The fixture data is in fixtures/. ez test runs the file, and a new checks.<system>.fixtures runs it with bend and diffs the output against the trailer, so nix flake check fails if any fixture regresses. I checked this by changing one expected value and confirming that fixture printed FAIL.

Some of these the bench wave check already covered against ffmpeg or Python's wave, though often on similar inputs rather than the exact fixture:

  • WAV round trips: s16 mono, s16 stereo, f32 mono, f32 stereo. The s16 and f32 byte layouts are covered only through Python's reader.
  • MP3 silent frames: decode and encode at 44100 mono, 44100 stereo, 48000 and 32000 Hz.
  • MP3 decode (group H): fixture frames decode, count1 and linbits match ffmpeg's samples, ID3v2 tag, junk between frames, truncated last frame, CRC frames, first Info frame, and the bit-reservoir refusal.

That is about 24 of the 67. The rest had no CI check until now:

  • ID3v2.4 footer, Xing frame, a lone partial frame, an Info frame that is not first
  • Layer I and II, mid/side and plain joint stereo, scale-factor bits, short blocks, a header with no frame
  • big-values overrun and part2_3_length past the end, with their lines forms
  • binary32 and -0.0 silence encodes; encode refusals (empty, 22050 Hz, three channels); clamp words
  • Table B.8 rows; frame room at the budget
  • fill and trim fixtures; RIFF tag constants
  • WAV wav_s16_wide, wav_no_frames_round, streamed, truncated and wav_rate_wraps

Public API findings

None. Every finding was in internal helpers, and no public def changed.

Warnings remaining

None.

Gate

  • bolt check (1.65.0): clean
  • bend PROOF.bend on bend 2.0.40: ALL PROOFS CHECK; ez prove (1.16.0): PASS 1/1; bend main.bend --check-only: ALL PROOFS CHECK
  • nix flake check -L on x86_64-linux: passes (proofs, lint, fixtures 67/67, wave compare 0 hard failures of 49)
  • ez test: PASS 1/1
  • Output bytes: the bench driver was built natively (bend 2.0.40) from the old tree and from the new one. Both read 6 WAV files (s16/f32, mono/stereo, 32/44.1/48 kHz, two of them WAVE_FORMAT_EXTENSIBLE), encode 4 of them to MP3 and back to WAV, and decode those MP3s plus 6 shine MP3s. All 24 output files are byte-identical.

🤖 Generated with Claude Code

ngngardner and others added 3 commits November 16, 2026 11:07
Pin bolt v1.65.0 (bolt check is the lint command) and move the ez flake
input to v1.16.0, whose mkLint runs bolt check for that pin. bolt.bend
drops the retired param setting. bend stays at 222de99 (2.0.40).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bolt check is clean with every group at error; the closed, coverage and
wrap overrides that held findings at warn are gone. Encoder and decoder
output is byte-identical: a native bench build before and after encodes
and decodes the same WAV and shine MP3 files to the same bytes.

Errors:
- S009 x14: side.tail takes the packed table selects; sr.* carries the
  search window and the best fit so far as Sw and Bs; an.blk and cs.pack
  become list literals; d9.build splits into d9.even and d9.odd, and
  d9.from takes those two parts.
- S011 x3: hf.go, c1.go and guid.is match their two scrutinees together.

Warnings:
- S003 x48: one parameter per line (bolt format), and the long proof
  hypotheses name their check (whole.ok, wf.ok, code.of).
- L001 x9: the clip readers are reached by quantified laws; the unused
  bit reader in src/mp3.bend (Bit, Br, Acc and their defs) is deleted.
- L002 x99: 42 closed laws become 38 quantified ones (clip fields, count,
  concat, fill, binary32 clamping, header fields, the 44100 Hz pad
  cycle, encoder headers over the pad bit, the RIFF ids of every encoded
  file, WAV refusals, and WAV reads for every tail after the file). The
  other 57 checked single fixtures (MP3 decode of fixture frames, silent
  frames, WAV round trips and byte layouts, Table B.8 rows) and are
  deleted, with the fixture defs only they used; the bench's wave check
  still compares those behaviours with ffmpeg. count.of branches on a
  Bool so its law can be proved.

LAWS.bend, the law files and the README say which statements are laws.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 67 closed laws that the lint fix deleted or replaced were each a
single input with a known output. They run again as tests/fixtures.bend,
one `ok <name>` line per fixture against its `#|` trailer, with the exact
expected values the laws stated: MP3 decode of the hand-made frames
(count1, CRC, ID3v2 and its footer, Xing and Info, junk, partial frames,
Layer I/II, joint stereo, reservoir, scale-factor bits, short blocks,
overruns), silent frames both ways, encode refusals, binary32 clamping,
the Table B.8 rows, frame room at the bit budget, fill and trim, and WAV
byte layouts, round trips, streamed and truncated files and chunk ids.

`ez test` runs it, and a new `fixtures` flake check runs it with bend
and diffs the output against the trailer, so `nix flake check` fails if
any fixture regresses. The fixture data lives in fixtures/, outside
tests/, since `ez test` runs every .bend under tests/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ngngardner
ngngardner enabled auto-merge (squash) November 16, 2026 16:28
@ngngardner ngngardner changed the title build: ez 1.16.0, bolt 1.65.0; fix lint fix(lint): ez 1.16.0, bolt 1.65.0; clear bolt findings Nov 16, 2026
@ngngardner
ngngardner disabled auto-merge November 16, 2026 16:29
@ngngardner
ngngardner enabled auto-merge (squash) November 16, 2026 16:29
[tools.bolt] v1.66.0 (bolt#398: a list-literal data table isn't measured
by S010). ci.yml at actions 4ea982d: macOS runs outside the required
check (actions#16), and only when C/JS effect code, the flake or ez's
lock changes (actions#17).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ngngardner
ngngardner merged commit a115954 into main Nov 16, 2026
5 checks passed
@ngngardner
ngngardner deleted the build/bolt-1.65 branch November 16, 2026 17:09
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