Commits
Commits on
1f91edd86ff5fbef5cdf0587e29ece28126eac62Filtered to crates/ec-flac/tests/encode_matrix.rsClear filter2026-09-29
fixture-preflight: kill the fixture-absent silent-skip class, generate the fixture library manifestAhmet Kaan Gümüş · 60e2653
fixture-preflight: kill the fixture-absent silent-skip class, generate the fixture library manifest
A test that could not find its fixture printed SKIP and returned, so the suite
reported PASS having tested nothing. That cost a 3-hour suite red from a missing
repo-root fixtures/ dir and three hosts whose fixture libraries differed
silently. Two halves:
1. The sweep. One convention in every non-av1 test crate: probe first, assert
LAST with an EC_REQUIRE_FIXTURES escape, return LAST -- never an early
return, and never the probe folded into the same `if` as the escape (the
`have_ffmpeg` short-circuit in crates/ec-av1/src/stream.rs). Converted
ec-h264 (conformance + encode), ec-flac (xiph_vectors + encode_matrix),
ec-opus conformance, ec-aac (oracle + sbr_real_library), ec-mp3
encode_matrix, ec-vp9 (hbd_exact, inter_pixels_exact, subsampling_exact,
scratch_interdump), plus non-empty floors on fixture loops that ended in a
bare assert!(failed.is_empty()) over a possibly ZERO-iteration loop
(jvt_full_sequence_bit_exact, corrupt_streams_never_panic,
ns_per_macroblock_measurement, ec-aac synthetic_heaac_matrix, ec-mp3's 8-WAV
corpus, ec-vorbis' three user-library sweeps).
Host media directories are deliberately NOT gated: a personal corpus is not
the committed library, and EC_REQUIRE_FIXTURES must not turn one operator's
home into a red fleet. They route through a separate require_host_media
helper. Tool-absence SKIPs (ffmpeg/x264/aomenc on PATH) stay a tool gate,
out of scope.
2. The preflight. scripts/gen-fixture-library.sh GENERATES
scripts/fixture-library.tsv (path, required-by file:line, provenance,
status, sha256) and scripts/verify-fixture-library.sh checks SHAPE, RESOLVE
(every path exists, every directory non-empty) and DRIFT (regenerating
reproduces the committed file). It distinguishes the two failure modes: a
missing fixture ROOT (mode i -- a linked worktree never has the gitignored
fixtures/; fix the tree) from a missing path inside a present root (mode ii
-- run the generator). It honours the same EC_REQUIRE_FIXTURES env: red when
set, SKIP-shaped and exit 0 when not.
The manifest states findings rather than hiding them: 52 committed pins
whose only provenance is a gate comment, 3 known-absent pins kept as rows
(ll444-lossless-key.obu, golden3-pin.obu, sbpart-pin.obu), and 4 committed
pins no source literal references. Enumeration is grep-derived and therefore
blind to runtime-assembled names (191 media literals resolve under no
enumerated directory); those are covered as far as their parent directory,
which must exist and be non-empty.
Proof (EC_NOMEMGUARD=1 only because the repo's memguard runner hit a stale
systemd scope):
EC_REQUIRE_FIXTURES=1 ec-h264 conformance 23 passed / encode 12 passed
EC_REQUIRE_FIXTURES=1 ec-flac xiph_vectors 4, encode_matrix 2 passed
EC_REQUIRE_FIXTURES=1 ec-opus conformance 28 passed / 16 ignored
EC_REQUIRE_FIXTURES=1 ec-aac oracle 14, ec-mp3 encode_matrix 5, ec-vorbis 8
mv fixtures/video/h264-open-gop.mp4 -> RED: "EC_REQUIRE_FIXTURES=1 but
fixture ... is absent -- regenerate with: scripts/gen-fixtures.sh"
mv flac subset/ and opus testvector01.bit -> RED on both
scripts/verify-fixture-library.sh: GREEN; with a fixture renamed and
EC_REQUIRE_FIXTURES=1 -> RED mode ii listing the path; same rename with
the env unset -> SKIP-shaped, exit 0; EC_FIXTURES=/nonexistent -> RED
mode i.2026-08-14
feat(flac): ec-flac decoder + encoder and the flacenc shimAhmet Kaan Gümüş · 339321d
feat(flac): ec-flac decoder + encoder and the flacenc shim Decoder: metadata blocks, frame headers (fixed and variable blocking), constant/verbatim/fixed/LPC subframes to order 32, escaped and Rice-coded partitions, all three stereo decorrelations, 8..32-bit, CRC-8 + CRC-16 verified per frame, STREAMINFO MD5 check, seek-table positioning, and frame-sync resynchronisation for streams that start mid-file. Malformed input errors, never panics. Encoder: fixed block size, wasted-bit detection, fixed predictors, LPC (Tukey window, Levinson-Durbin, error-feedback quantisation), exact-cost Rice partition search, per-block stereo decision, 1..8 channels and 4..32 bits, with the input MD5 in STREAMINFO. shims/flacenc carries package flacenc 0.5.1 over ec-flac for the exact surface the replica calls (component::BitRepr, error::Verify, config::Encoder, source::MemSource, encode_with_fixed_block_size, bitsink::ByteSink). Verified: 64/64 Xiph subset vectors decode bit-exact vs ffmpeg, 6/6 decodable uncommon vectors bit-exact, faulty vectors error out; 14/14 fixture encodes decode back bit-exact through ffmpeg at 0.961x the size of ffmpeg's default FLAC.