Repository navigation
Pin librosa <0.11 to protect voicing-gate calibration; fix fork HQ lane test stub - #2
KhryptorGraphics wants to merge 12 commits into
Conversation
librosa 0.11 changed pyin's voiced decision: white noise scores ~0.43 voiced fraction vs 0.0 on 0.10.x (probed on both versions). Every multi-speaker routing gate (multi_speaker_merge_voiced_min and friends, calibrated leads 0.76-0.87 vs keep-cases 0.14-0.51) was calibrated on 0.10 semantics, so an environment resolving librosa>=0.10 to 0.11 gets a silently mis-calibrated router (and a failing test_multi_speaker_routing noise test). Bound the requirement to the calibrated major, note the coupling in _voiced_fraction, and refresh the requirements-runtime hash in the dependency contract lock (line_count follows the checker's runtime_requirement_count, now 32). Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01Vqqhm9yzsrG7rgmiMrBjC1
The quality-tiers change made _convert_song_fork_hq pass method=q['f0_method'] to _extract_pitch, but the test's monkeypatched lambda still had the old (audio, sr) signature, so test_fork_hq_lane_is_stereo_and_mirrors_contract failed at HEAD with a TypeError. Mirror the real signature's optional kwarg in the stub. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01Vqqhm9yzsrG7rgmiMrBjC1
|
Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR protects multi-speaker routing behavior by pinning librosa to the pyin semantics used during calibration, documenting and locking that dependency contract, and fixes the fork HQ lane test stub to accept the new pitch-extraction keyword argument. Sequence diagram for the fork HQ lane pitch extraction testsequenceDiagram
participant T as test_fork_hq_lane_is_stereo_and_mirrors_contract
participant C as _convert_song_fork_hq
participant E as _extract_pitch
T->>C: invoke fork HQ conversion
C->>E: _extract_pitch(audio, sr, method=q['f0_method'])
E-->>C: pitch result
C-->>T: stereo conversion result
Flow diagram for librosa calibration protectionflowchart LR
R["requirements-runtime.txt: librosa>=0.10,<0.11"] --> P["librosa 0.10 pyin semantics"]
P --> V["_voiced_fraction"]
V --> G["Multi-speaker routing gates"]
U["librosa 0.11"] --> W["Changed voiced decision"]
W --> M["Mis-calibrated routing"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Greptile SummaryThe PR protects calibrated multi-speaker voicing gates by constraining librosa to its 0.10 behavior and updates the HQ-lane test stub for the current pitch-extraction signature.
Confidence Score: 4/5The PR appears safe to merge, with one non-blocking test-strengthening opportunity around HQ pitch-method forwarding. The dependency constraint is consistently integrated and the production behavior is unchanged; the only accepted concern is that the revised stub can conceal a future loss of the Files Needing Attention: tests/test_fork_hq_lane.py Important Files Changed
Reviews (1): Last reviewed commit: "fix: accept method kwarg in fork HQ lane..." | Re-trigger Greptile |
| monkeypatch.setattr(p, "_extract_pitch", | ||
| lambda a, sr, method=None: np.zeros(8, np.float32)) |
There was a problem hiding this comment.
Pitch forwarding remains untested
The updated stub accepts but ignores method, and this test does not configure an f0_method. It will therefore still pass if the HQ lane stops forwarding a selected pitch-extraction method. Exercise a non-None override and assert the received argument so this routing contract is protected.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
add_sample_from_path gated torch.cuda.empty_cache()/synchronize() on torch being importable, not on CUDA being present, so the endpoint 500'd on any CPU-only host (hosted CI runners included). Mirror the guard api_youtube already uses. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01Vqqhm9yzsrG7rgmiMrBjC1
Hosted CI has failed on every main push back to run 61; all five failing jobs traced to GPU/Jetson assumptions leaking into lanes that run on ubuntu-latest: - backend lane: deselect @pytest.mark.cuda tests (-m 'not cuda') — the marker exists for exactly this split - coverage gate: deselect cuda-marked tests only when torch.cuda is unavailable, so Jetson coverage numbers stay canonical - test_training_job_manager: stub torch.cuda.is_available in the fixture and init tests (queue/persistence logic under test; the GPU gate itself is covered by test_gpu_enforcement) - phase5 orchestration tests: fake auto_voice.models.diffusion_decoder — the default architecture constructed the real decoder on cuda - test_cuda_device_auto_selection: mark cuda (Trainer moves internal modules to the selected device, so stubbing is_available is not enough) - test_common_env_prefers_canonical_python: fake HOME with a stub canonical env python, deterministic on machines without autovoice-thor - preflight test: pass --no-require-gitnexus (gitnexus presence is orthogonal to the benchmark-report behavior under test) - live_backend_server harness: present a CPU-safe fake GPU so the production /ready probe (CUDA-gated by design) reports ready — fixes deployment-smoke's validate_release_candidate step - playwright.live.config.ts: fall back to python3 when the Jetson interpreter path does not exist — fixes browser-live's backend webServer startup Verified on a CPU-only container: backend lane 102 passed, previously failing suites 169 passed, /ready 200 + validate_release_candidate rc=0. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01Vqqhm9yzsrG7rgmiMrBjC1
npm audit fix within existing ranges; production audit now reports no high/critical findings (2 moderates remain in react-router, which needs a breaking major). Refresh the frontend lock hash in the dependency contract; checker passes. Frontend typecheck and build verified. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01Vqqhm9yzsrG7rgmiMrBjC1
|
Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information |
f74d4c7 replaced workflow auto-submit with the Start Generation button, but both live specs still waited for the workflow card right after the uploads, so they timed out before Convert Workflow Song ever rendered (the browser-live lane has been red since). Click the explicit start-generation-button first. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01Vqqhm9yzsrG7rgmiMrBjC1
|
Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information |
…harness pip install -e .[dev] on ubuntu-latest now resolves PyPI torch with the multi-GB nvidia-*-cu13 wheel stack and dies with ENOSPC before tests run (seen on run 41670270628). Pre-install the CPU wheel so the resolver keeps it — the runners have no GPU to feed anyway. The deterministic harness also now serves /reports/benchmarks/latest (and release evidence) from a seeded fixture dir: the System page fetch 404'd otherwise, and the browser's automatic console error failed the zero-console-error live acceptance check. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01Vqqhm9yzsrG7rgmiMrBjC1
|
Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information |
The speaker endpoints 500'd in the harness (and would on CI): the DB layer defaults to the production MySQL server, which only exists on the Jetson. Default AUTOVOICE_DB_TYPE=sqlite before auto_voice imports (db.schema reads it at import time) and keep the sqlite file inside the harness's throwaway data dir instead of a cwd-relative path. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01Vqqhm9yzsrG7rgmiMrBjC1
|
Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information |
upload_song passed dir=/tmp/autovoice_karaoke to NamedTemporaryFile and only ran os.makedirs afterwards, so the first upload on a host where the directory does not yet exist (fresh CI runner, fresh boot) failed with FileNotFoundError -> 503. Seen as the karaoke/full-ui live-spec failures on run 41671275025. Create the directory first. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01Vqqhm9yzsrG7rgmiMrBjC1
|
Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information |
The speaker endpoints still 500'd under the harness sqlite DB: a fresh
file has no tables (no such table: speaker_clusters). Run
init_database('sqlite') after pointing DATABASE_PATH at the throwaway
data dir.
Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01Vqqhm9yzsrG7rgmiMrBjC1
|
Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information |
The remaining-module gate holds src/auto_voice/web/persistence.py to 80% but no suite in its list exercised the store directly — the API suites only graze it, leaving it at 67.7% on hosted CI (the gate's first-ever run there; the threshold stage never ran before because the pytest phase always died earlier). Add round-trip unit tests for the CRUD surfaces (training/background jobs, presets, history, workflows, diarization, checkpoints, webhooks, loaded models, youtube history + purge, asset registry, karaoke sessions) and the normalizer edge branches; the suite alone measures persistence.py at 91%. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01Vqqhm9yzsrG7rgmiMrBjC1
|
Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information |
run_remaining_module_coverage.py writes it into the repo root (CI uploads it as an artifact); it is generated output, not source. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01Vqqhm9yzsrG7rgmiMrBjC1
|
Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information |
Two fixes found while auditing the multi-speaker conversion path.
1. Pin
librosa>=0.10,<0.11(762f0b7)librosa 0.11 changed pyin's voiced decision: white noise scores ~0.43 voiced fraction on 0.11 vs 0.0 on 0.10.2 (probed on both versions). Every multi-speaker routing gate —
multi_speaker_merge_voiced_minand friends, calibrated on leads 0.76–0.87 vs keep-cases 0.14–0.51 — was measured on 0.10 semantics. With the previous open bound (librosa>=0.10), any fresh install, CI run, or redeploy resolving to 0.11 gets a silently mis-calibrated router and a failingtest_multi_speaker_routingnoise test.requirements-runtime.txt: bound to>=0.10,<0.11with a comment saying re-calibrate before raising it_voiced_fractiondocstring: notes the calibration couplingrequirements.lock: refreshed sha256 +line_count(follows the checker'sruntime_requirement_count, now 32);scripts/check_dependency_contract.pypasses with no errors2. Fix
test_fork_hq_lanestub signature (a4b67eb)The quality-tiers change (
8ad0500) made_convert_song_fork_hqcall_extract_pitch(..., method=q['f0_method']), but the test's monkeypatched lambda kept the old(audio, sr)signature, sotest_fork_hq_lane_is_stereo_and_mirrors_contractfailed at HEAD with a TypeError. The stub now mirrors the real signature's optional kwarg.Verification
test_separation_bridge+test_multi_speaker_routing+test_svc_fork_bridge: 71/71 pass under librosa 0.10.2test_fork_hq_lane+test_web_conversion_metadata+test_conversion_workflow_api: 16/16 passscripts/check_dependency_contract.py: no errorscd frontend && npm run build: cleanautovoice-thorconda env🤖 Generated with claude-flow
https://claude.ai/code/session_01Vqqhm9yzsrG7rgmiMrBjC1
Generated by Claude Code
Summary by Sourcery
Stabilize multi-speaker voicing calibration and fork HQ coverage while making CI and live test workflows portable to CPU-only environments.
Bug Fixes:
Enhancements:
CI:
Documentation:
Tests:
Chores: