Environment: Windows 11, bash shell. Project root: J:\CLAUDE\PROJECTS\Wakeword (master).

PROBLEM
We just discovered three runtime bugs in the training pipeline that ONLY surface when actually invoking the pipeline (not caught by 147 unit tests):

1. `OWWModel()` defaulting to TFLite when bundled tflite_runtime can't read current openwakeword .tflite schema → fixed by pinning `inference_framework="onnx"` in `src/violawake_sdk/tools/train.py` (3 sites, lines ~732, ~872, ~1764).

2. openwakeword resource files not pre-downloaded in container → fixed by `download_models()` call in `entrypoint.sh`.

3. fast_mp3_augment dependency missing → added to `console/backend/requirements.txt`.

Those were the obvious ones the live test surfaced. Find the OTHER ones we haven't tripped over yet — the classes of latent bugs in the training + SDK paths that would bite users on a fresh deploy.

CRITICAL CONSTRAINTS
- Do NOT use PowerShell with complex quoting.
- Use Read tool / `head` / `tail` / `sed -n` / `grep`.
- READ-ONLY investigation primarily; only fix things that are clearly bugs and have minimum-touch fixes (one-line / one-import additions). Document larger bugs with proposed-fix notes — DO NOT do big refactors.

INVESTIGATE
Audit these classes of issues across both `src/violawake_sdk/` and `console/backend/`:

A. **Hardcoded backend / framework / format choices that fail when the assumed default isn't there.**
   - Search for: `OWWModel(`, `Interpreter(`, `tflite`, `ort.InferenceSession(`, `torch.load(`, `transformers.AutoModel`, `whisper.load_model(`.
   - For each, check: does the constructor pick the right backend by default in our container? Are there fallbacks? If the assumed file/format isn't present, does the error message give a clear hint?

B. **Imports inside functions (lazy) that fail at runtime, not import time.**
   - Search for: `def [^_].*:.*\n.*import ` (function-local imports) — if a dependency is missing, the function fails to call but the module loads fine, masking the issue from CI.
   - List all such imports in `src/violawake_sdk/tools/train.py`, `src/violawake_sdk/oww_backbone.py`, and any backend services.

C. **External-network dependencies in the synchronous training path.**
   - Search for: `urllib.request`, `requests.`, `httpx.`, `urlopen(`, `Communicate(`, `download_models`, `download_url`.
   - Each one is a potential failure point on a customer machine without internet, behind a corporate proxy, or with rate-limited APIs.

D. **Filesystem expectations.**
   - Search for: `Path(__file__).resolve().parent`, `Path("corpus")`, `Path.home()`, `os.environ.get(.*[Dd]ir`.
   - Each is a path the code expects to exist; document which ones are required vs. optional, and whether failure is loud or silent.

E. **Race conditions / startup order.**
   - Look at `console/backend/app/main.py` startup hooks. Do any depend on Postgres being ready? On models being downloaded? If so, do they retry?

F. **Quota + rate limit gotchas.**
   - Look at `console/backend/app/services/training_service.py`. What happens if a user is at quota and tries to train? Does it 4xx cleanly or 500?

DECIDE & IMPLEMENT
Produce a single audit doc at `docs/TRAINING_PIPELINE_AUDIT_2026-05-07.md` containing:

For EACH finding:
- Severity: CRITICAL (would block deploy) / HIGH (would block a customer) / MEDIUM (degrades quality) / LOW (cosmetic)
- File + line(s)
- Concrete evidence (a code snippet or a `grep` result)
- Proposed fix (one paragraph; do NOT implement except for trivially-mechanical one-liners)
- Estimated effort

If you find a CRITICAL or HIGH issue with an OBVIOUS one-line fix (e.g., another forgotten `inference_framework="onnx"` somewhere, missing requirement), apply it and commit separately.

Do NOT refactor. Do NOT rewrite functions. The point is the audit.

PROVE IT
1. Show the audit doc head -100.
2. List any one-line fixes you applied with their commit SHAs.
3. Confirm no test regressions: `cd console && python -m pytest tests/ --no-cov --timeout=30 --ignore=tests/e2e -q 2>&1 | tail -3`.

REPORT
- Number of findings by severity.
- Any commits made.
- One-liner takeaway: what's the next biggest landmine after the four we already fixed?

Time budget: ~25 min.
