Skip to content

spike(rust/cli): wire CLI binary and fixture round-trip test (#99) - #106

Merged
natashaannn merged 3 commits into
mainfrom
spike/issue-99-cli
Jul 14, 2026
Merged

spike(rust/cli): wire CLI binary and fixture round-trip test (#99)#106
natashaannn merged 3 commits into
mainfrom
spike/issue-99-cli

Conversation

@missabawse

Copy link
Copy Markdown
Contributor

Summary

  • Adds load_wav_samples to lib.rs — reads 16-bit PCM or float WAV via hound, normalises to [-1.0, 1.0]
  • Implements src/main.rs CLI: audio-sync <ref.wav> <target.wav>lag: -6.800000s snr: 9.815; prints [LOW CONFIDENCE] when SNR < 3.0; all errors propagated gracefully (no unwrap/expect in main)
  • Adds fixture_roundtrip test: loads committed fixture WAVs + baseline.json, runs the full Rust pipeline, asserts lag matches JS baseline to ±1 sample at 8 kHz
  • Adds serde + serde_json to Cargo.toml for baseline JSON parsing
  • Fixes pre-push secret scanner false positive: adds --exclude-dir=.venv so PIL font binary data in .venv doesn't trip the sk-* pattern

Test plan

  • cargo test — 19/19 pass (18 prior + fixture_roundtrip)
  • fixture_roundtrip — Rust lag -6.8s matches JS baseline lagSeconds: -6.8 exactly (well within ±1 sample)
  • CLI binary output: lag: -6.800000s snr: 9.815 — reliable, no [LOW CONFIDENCE]
  • npm test — 266/268 pass (2 pre-existing skips, unrelated to spike)
  • All pre-push gates green

Closes #99

🤖 Generated with Claude Code

missabawse and others added 3 commits July 14, 2026 09:33
Implements load_wav_samples, main.rs CLI, and fixture_roundtrip test.
Rust lag matches JS baseline exactly: -6.8s, snr 9.815, 19/19 tests pass.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
PIL font data in .venv contains base64 that matches the sk-* pattern.
.venv is a Python virtualenv — not source, not scannable for secrets.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@missabawse
missabawse requested a review from natashaannn July 14, 2026 02:06
@natashaannn

Copy link
Copy Markdown
Member

All test passed! Technically npm test returns 363/365 tests passed instead of the PR's 266/268 pass but of course that's no issue at all. Merging!

@natashaannn
natashaannn merged commit 79b2262 into main Jul 14, 2026
1 check passed
@natashaannn
natashaannn deleted the spike/issue-99-cli branch July 14, 2026 11:21
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.

spike(rust/cli): wire CLI binary and fixture round-trip test

2 participants