# Golden fixtures Known-good decoder outputs captured at SHA `3b354122` (a commit with zero decoder changes relative to its parent). These fixtures are the regression baseline: any change that alters `jt9`'s or `wsprd`'s stdout byte-for-byte fails the harness in CI. The harness protects decoder behavior through the streaming I/O, NDJSON output, control frames, and wsprd streaming paths. ## Current fixtures | Fixture | Input | Mode | Decodes | Captured from | |---|---|---|---|---| | `ft8_210703_133430.expected.txt` | `samples/FT8/210703_133430.wav` | FT8 (`-8`) | 14 signals | `3b354122` | | `jt9_130418_1742.expected.txt` | `samples/JT9/130418_1742.wav` | JT9 (`-9`) | 6 signals | `3b354122` | | `q65_30a_201203_024000.expected.txt` | `samples/Q65/30A_Ionoscatter_6m/201203_024000.wav` | Q65-30A (`--q65 -p 30 -f 1000 -d 3`) | 1 signal | K1JT, 2026-08-01 | | `q65_300a_201210_0505.expected.txt` | `samples/Q65/300A_Optical_Scatter/201210_0505.wav` | Q65-300A (`--q65 -p 300 -f 1000 -d 3`) | 1 signal | K1JT, 2026-08-02 | | `q65_60d_201212_1838.expected.txt` | `samples/Q65/60D_EME_10GHz/201212_1838.wav` | Q65-60D (`--q65 -b D -p 60 -f 1000 -d 3`) | 1 signal | K1JT, 2026-08-02 | | `msk144_181211_120800.expected.txt` | `samples/MSK144/181211_120800.wav` | MSK144 (`--msk144 -p 15 -f 1500 -F 50 -d 3`) | 2 signals | K1JT, 2026-08-02 | | `fst4_210115_0058.expected.txt` | `samples/FST4+FST4W/210115_0058.wav` | FST4 (`--fst4 -p 60 -f 1331 -L 1000 -H 1400 -d 3`) | 3 signals | K1JT, 2026-08-02 | | `fst4w_201230_0300.expected.txt` | `samples/FST4+FST4W/201230_0300.wav` | FST4W (`--fst4w -p 1800 -f 1433 -F 100 -d 3`) | 1 signal | K1JT, 2026-08-02 | | `ft4_000000_000002.expected.txt` | `samples/FT4/000000_000002.wav` | FT4 (`--ft4 -d 3`) | 19 signals | K1JT, 2026-08-02 | | `jt65_000000_0004.expected.txt` | `samples/JT65/JT65B/000000_0004.wav` | JT65 (`--jt65 -b B -f 1700 -d 3`) | 1 signal | K1JT, 2026-08-02 | | `jt4_OK1KIR_141105_175700.expected.txt` | `samples/JT4/JT4F/OK1KIR_141105_175700.WAV` | JT4-F (`--jt4 -b F -f 1200 -d 3`) | 1 signal | K1JT, 2026-08-02 | | `wspr_150426_0918.expected.txt` | `samples/WSPR/150426_0918.wav` | WSPR (`wsprd`, no flags) | 9 signals | K1JT, 2026-08-02 | ## Running Two independent ways to run these: - **Standalone script** (manual/local use, not itself CI-invoked): ``` cmake --build build --target jt9 wsprd test/run-golden-fixtures.sh ``` Exits 0 on pass, 1 on regression. - **ctest** (this is what CI actually runs): each fixture above is also registered as a `test_jt9_golden_*`/`test_wsprd_golden_*` test via `wsjt_add_jt9_golden_test`/`wsjt_add_wsprd_golden_test` in the top-level `CMakeLists.txt`, using `tests/integration/{jt9,wsprd}/compare_*_output.cmake` for an isolated, byte-exact comparison. These are gated to Linux x86-64 only (`ctest -R test_jt9_golden` / `test_wsprd_golden` to run just these) -- decoder output can drift in small ways across compilers/architectures, so the byte-exact check is pinned to one canonical platform; the other four CI legs still run everything else in `ctest`. ## Adding a fixture 1. Put the input `.wav` under `samples//` (already there for standard modes). 2. Run `./build/jt9 samples//.wav > test/fixtures/.expected.txt 2>&1` (or `./build/wsprd .wav > ...` for WSPR). 3. Add a `run_fixture` call in `test/run-golden-fixtures.sh`, **and** a `wsjt_add_jt9_golden_test`/`wsjt_add_wsprd_golden_test` call in the top-level `CMakeLists.txt` -- the shell script alone does not run in CI. 4. Commit the expected file + both script/CMake changes together. ## Coverage - FT8 + JT9 + Q65-30A + Q65-300A + Q65-60D + MSK144 + FST4 + FST4W + FT4 + JT65 + JT4 + WSPR fixtures above cover basic decoder regression. - The streaming harnesses extend coverage to FST4 (`-7`), Q65 (`-3`), MSK144 (`-5`), and wsprd streaming. - Streaming I/O parity: `test/run-stream-wav-parity.sh` validates that `jt9 --stream` decodes **contain** these expected decodes. The check is **containment, not identity**: streaming legitimately finds *more* signals (the early `nzhsym` passes pick up low-SNR signals) and the `snr`/`dt`/`freq` fields drift between the WAV and stream decode paths for the same signal (≈ ±2 dB / ±0.05 s / ±3 Hz — different fine estimates), so the decoded **message text** is the parity identity. FT8/JT9 only (FST4W has no good fixture; EME/JT65 I/Q paths are pass-on-absence).