diff --git a/docs/codebase-audit.md b/docs/codebase-audit.md deleted file mode 100644 index 1485591e..00000000 --- a/docs/codebase-audit.md +++ /dev/null @@ -1,532 +0,0 @@ -# JellyTau Codebase Audit - -**Date:** 2026-08-16 · **Version:** v0.6.0 · **Commit:** `be907b49` (master) - -A review of the Rust/Svelte/Android codebase against its own requirements matrix -and against current Android and Tauri v2 platform practice. Every finding was -verified by running the project's own tooling or reading the code it points at — -nothing here is inferred from documentation alone. - -**Scale:** 55,835 LOC Rust · 50,490 LOC TS/Svelte · 530 requirements · 824 traces - -| Severity | Count | -|----------|-------| -| High | 5 | -| Medium | 9 | -| Low | 6 | -| Tests passing | 1,719 | -| Untraced requirements | 86 | -| Traceability coverage | 86% (285/330) | - -> **Revisions, 2026-08-16.** Three rankings changed after device testing and -> platform research, all documented in place: -> - **B1 High → Low.** The predicted impact was refuted on a physical Android 16 -> device. The residual risk turned out to be a different, narrower one. -> - **B7 Low → Medium, re-framed.** The original reading of predictive back was -> backwards: at targetSdk 36 it is already enabled, not merely un-opted-into. -> - **B8 added (Medium).** Android 16 Local Network Protections versus a -> LAN-hosted Jellyfin server. -> - **D3 Medium → Low.** The "820 unwraps" figure was a measurement error; the -> real number is 19, and none are in command handlers. -> - **B1's stated mechanism was wrong** even though its conclusion held. FGS -> notifications are *not* exempt from `POST_NOTIFICATIONS`; media-session -> notifications are. See B1 — the distinction changes what the fix should be. -> -> Original ranking was 6 High / 8 Medium / 5 Low. - -**Verified by running:** `bun run check` · `bun run test` · `cargo test` · -`cargo clippy --all-targets` · `bun run check:boundary` · `bun run traces:json` - -**Device-verified (2026-08-16):** B1 and B2 were checked against a physical HONOR -ROD2-W09 running Android 16 (SDK 36) with the shipped app installed. B2 was -confirmed; B1 was refuted and downgraded. - -**Not covered:** the e2e suite (`test:e2e` is not wired into CI and was not run), -Windows and Arch packaging paths, and the docs-site build. B3, C1 and C2 still -need a device/desktop playback pass. - ---- - -## A. Requirements versus code - -The traceability matrix is the project's own claim about what is built. Of 530 -defined requirement IDs, 86 carry no `TRACES:` tag anywhere in the tree. Most of -those gaps are documentation debt rather than missing features — which is -precisely the problem, because it makes the matrix unreliable as evidence. - -### A1 · High · Twelve requirements are marked "Done" but have zero traces - -`UR-006` (lockscreen/BLE control), `UR-037` (video library presentation), -`IR-006` (Android MediaSession), `IR-008` (audio focus), `IR-022` (person/cast -API), `IR-024` (home-screen API) and six Jellyfin API requirements (`JA-006`, -`JA-009`, `JA-013`, `JA-014`, `JA-015`, `JA-018`) all claim completion with -nothing pointing at an implementation. - -These features demonstrably work — lockscreen control, Next Up, favourites are -all shipped. The code is there; the tags are not. That means the matrix currently -over-reports on exactly the requirements a reviewer would most want to verify, -and a regression in any of them would leave no trace to follow. - -**Fix:** Tag the existing implementations. Highest value per keystroke in the -whole audit: six of the twelve are single Jellyfin API call sites. - -### A2 · Medium · Requirement statuses contradict each other across layers - -`UR-020` (subtitle selection) and `UR-021` (audio track selection) are marked -*Done*, while the integration requirements they decompose into — `IR-018` and -`IR-019`, both libmpv-specific — are still *Planned*. Similarly `IR-005` (MPRIS) -sits at *Planned* under a *Done* `UR-006`. - -The likely truth is that these user requirements were satisfied through a -different path than the one originally specified (HTML5 `