## <!-- # SSoT-OK -->

milestone: v4.7.0
audited: 2026-03-28T12:00:00Z
status: tech_debt
scores:
requirements: 37/37
phases: 8/8
integration: 27/28
flows: 4/5
gaps:
requirements: []
integration: - from: "Phase 24 (CJK routing)"
to: "HTTPControlServer /tts/test"
issue: "HTTP test endpoint calls synthesizeStreaming directly, bypassing CJK auto-router"
severity: "low"
affected_req: "CJK-01 (partial), CJK-02 (partial)"
flows: - name: "HTTP test endpoint with CJK text"
breaks_at: "HTTPControlServer.swift:225"
severity: "low"
tech_debt:

- phase: "22-bionic-reading-mode"
  items:
  - "Human verification deferred: visual bold-prefix rendering, SwiftBar dot state, end-to-end toggle"
- phase: "23-caption-history-panel"
  items:
  - "Human verification deferred: visual panel appearance, auto-scroll behavior, click-to-copy, SwiftBar integration"
- phase: "22-bionic-reading-mode + 23-caption-history-panel"
  items:
  - "SwiftBar plugin files are local-only (~/Library/Application Support/SwiftBar/Plugins/) — not tracked in version control"
- phase: "24-chinese-tts-fallback"
  items:
  - "HTTPControlServer /tts/test endpoint does not use CJK auto-routing — CJK text via HTTP test goes to English MLX engine"
    nyquist:
    compliant_phases: []
    partial_phases: ["18"]
    missing_phases: ["19", "20", "20.1", "21", "22", "23", "24"]
    overall: "not_assessed"

---

# v4.7.0 Milestone Audit — Architecture Hardening + Feature Expansion

## Summary

**Status:** Tech Debt (no critical blockers)
**Requirements:** 37/37 satisfied
**Phases:** 8/8 complete (18, 19, 20, 20.1, 21, 22, 23, 24)
**Integration:** 27/28 connections wired (1 minor gap)
**E2E Flows:** 4/5 working (1 partial)

## Requirements Coverage

All v4.7.0 requirements are marked Complete in REQUIREMENTS.md traceability table.

| Category                             | Requirements | Status       |
| ------------------------------------ | ------------ | ------------ |
| Architecture (ARCH-01 to ARCH-06)    | 6/6          | Complete     |
| Concurrency (CONC-01 to CONC-04)     | 4/4          | Complete     |
| Testing (TEST-01 to TEST-05)         | 5/5          | Complete     |
| MLX Memory (LEAK-01 to LEAK-03)      | 3/3          | Complete     |
| Hardening (HARD-01 to HARD-04)       | 4/4          | Complete     |
| Bionic Reading (BION-01 to BION-04)  | 4/4          | Complete     |
| Caption History (CAPT-01 to CAPT-04) | 4/4          | Complete     |
| Chinese TTS (CJK-01 to CJK-04)       | 4/4          | Complete     |
| **Total**                            | **37/37**    | **Complete** |

## Phase Verification Results

| Phase                        | Score | Status             | Human Verification |
| ---------------------------- | ----- | ------------------ | ------------------ |
| 18. CompanionCore Library    | 6/6   | Passed             | —                  |
| 19. TTSEngine Decomposition  | 12/12 | Passed             | —                  |
| 20. Unit & Integration Tests | 9/9   | Passed             | —                  |
| 20.1. MLX Metal Memory       | —     | No VERIFICATION.md | —                  |
| 21. Pipeline Hardening       | 5/5   | Passed             | —                  |
| 22. Bionic Reading Mode      | 8/8   | Human needed       | 3 visual items     |
| 23. Caption History Panel    | 5/5   | Human needed       | 4 visual items     |
| 24. Chinese TTS Fallback     | 4/4   | Passed             | —                  |

## Integration Findings

### Connected (27/28)

All major cross-phase wiring verified:

- CompanionCore library consumed by all phases
- TTSEngine actor consumed by TTSPipelineCoordinator, CJK routing, and all callers
- Phase 20 tests cover Phase 19 decomposed components
- PlaybackManager, BionicRenderer, CaptionHistoryPanel all wired through CompanionApp

### Gap (1)

**HTTPControlServer `/tts/test` bypasses CJK router**

- `HTTPControlServer.swift:225` calls `synthesizeStreaming` directly instead of `synthesizeStreamingAutoRoute`
- Impact: Low — test endpoint only, primary TTS dispatch (TelegramBot) is correctly wired
- Fix: Change to `synthesizeStreamingAutoRoute` (1-line change)

## Tech Debt

### Deferred Human Verification (7 items across 2 phases)

- Phase 22: Visual bold-prefix rendering, SwiftBar dot state, end-to-end toggle
- Phase 23: Panel appearance, auto-scroll, click-to-copy, SwiftBar integration

### SwiftBar Local Files (not version controlled)

Phases 22 and 23 modify `~/Library/Application Support/SwiftBar/Plugins/` files. If these are lost, they must be recreated manually. Consider tracking in repo or documenting recovery steps.

### HTTP Test Endpoint CJK Gap

Phase 24 `/tts/test` does not route CJK text to sherpa-onnx. Minor — fix in a future quick task.

## Conclusion

Milestone v4.7.0 achieves its definition of done: TTSEngine is decomposed into testable actor-isolated components, the streaming pipeline handles edge cases gracefully, and three new features (bionic reading, caption history, Chinese TTS) are implemented. 37/37 requirements satisfied. Accumulated tech debt is non-blocking and can be addressed in the next milestone.
