Files
jellytau/docs/specs
dtourolle f3fa45f742
🏗️ Build and Test JellyTau / Run Tests (pull_request) Successful in 22m12s
🏗️ Build and Test JellyTau / Supply Chain (pull_request) Successful in 37s
Traceability Validation / Check Requirement Traces (pull_request) Successful in 11s
🏗️ Build and Test JellyTau / Android Compile Check (pull_request) Successful in 4m10s
feat(diagnostics): persistent redacted logging and an exportable bundle
The app forgot everything it did the moment it exited. The Rust half
logged through env_logger to stdout only -- invisible to anyone who
launched from a desktop icon, and on Android worse than that: stdout is
not logcat, so the backend produced no visible output at all on the
platform carrying this project's hardest bugs. The autoplay deadlock,
the truncated-stream restart and the background-audio stall were all
diagnosed by talking a user through `adb logcat`, because there was no
other way to see anything. A panic left nothing behind at all.

Logs now go to a size-capped rotating file, to logcat on Android, and to
the webview console in dev. A panic is recorded with its backtrace before
the process dies. The frontend's messages are forwarded into the same
file, so one timeline holds both halves of the app in order -- which is
what makes a race between them legible after the fact, and races between
them are the expensive bug class here.

Redaction runs in the log FORMATTER, not at export time. A credential
sitting in a file on the device is already a disclosure; stripping it on
the way out would be too late. The exporter redacts a second time to
cover files written by builds that predate this. api_key, X-Emby-Token,
Authorization, "AccessToken" and Token="..." all reduce to [REDACTED],
while host, item ids and filenames are deliberately kept -- a log scrubbed
of those is one nobody can debug anything from. Server URLs keep scheme
and host and drop any embedded user:pass@.

Two things the tests caught that review would not have:

  - redact_headers recursed on its own output. The replacement keeps the
    header NAME, so the next call matched the same header forever; the
    test died with a stack overflow. It is a forward scan now.
  - The frontend forwarder used `void plugin.error(...)`. `void` discards
    a promise's value but not its rejection, so in any webview without
    IPC -- a unit test, SSR, a browser preview -- every log line became an
    unhandled rejection. 20 of them showed up the first time coverage
    ran. Each call now attaches a catch.

Only info and above cross the IPC boundary: debug is per-tick player
state and forwarding it would be thousands of calls a minute for output
nobody reads. A failing forwarder never propagates and never prevents the
console write.

Nothing is transmitted anywhere. The export writes a zip and reports its
path; the user attaches it themselves, which is also what keeps this from
becoming telemetry. An Android share intent is explicitly out of scope --
it is Kotlin work that belongs with the other native code.

The panic hook chains to the previous hook rather than replacing it,
because utils/lock.rs installs a silencing hook around tests that provoke
poisoned locks on purpose.

Spec in docs/specs/diagnostics-and-logging.md; UR-078 / DR-218 / UT-209.

Verified: 1079 frontend tests and the coverage gate, 759 Rust tests,
clippy -D warnings, svelte-check 0 errors, and cargo check for
aarch64-linux-android.
2026-08-21 18:58:57 +02:00
..

Specs index

Feature specs for JellyTau. Start a new one from SPEC-TEMPLATE.md and run it past SPEC-REVIEW-CHECKLIST.md before accepting it.

What lives here

Only work that has not shipped. Once a spec is fully implemented its design is folded into the architecture docs — which are the maintained description of the build — and the spec file is deleted. Git history keeps the original, including its rejected alternatives and acceptance criteria; the architecture docs keep the reasoning that a future change still needs.

So: a file in this directory is a promise, not a description. If you want to know how something works, read docs/architecture/. If you want to know what is planned, read here.

Status vocabulary

Status Meaning
Proposed Written, not accepted. Nothing built.
Accepted Agreed as the design; implementation not started or not finished.
Partially implemented Some parts shipped; the spec names what is left.
Design authority No code of its own — it records a decision later specs act on.

Next free requirement ids (always re-check requirements.md before allocating): UR-077, IR-033, DR-215. Three specs below suggested ids that have since been taken by other work; each carries a ⚠️ note at the top.

Partially implemented

Spec What landed What is left
frontend-domain-model.md Catalog surface: MediaKind, from_jellyfin isolated, ticks → ms primaryImageTagimageId (~30 sites); player/session/reporting tick math; stream.type
libmpv2-migration.md LICENSE The libmpvlibmpv2 crate swap
read-through-media-cache.md DR-126…128, DR-133…138 — cache entries are download rows; local playback of downloads DR-121/122/124/125 — the player quality selector and the read-through capture
scoped-search-boundary-implementation.md Stage 1: SearchScope owned by Rust (DR-063…067) Stage 2: result-side grouping (GROUP_ITEM_TYPES still in searchScope.ts)

Not started

Spec Blocked on / note
build-provenance.md build.rs is still bare. ⚠️ suggested id DR-093 is taken.
player-facade-enforcement.md ~60 commands.player* sites still outside the facade; no lint rule. ⚠️ suggested id DR-095 is taken.
windows-native-audio-backend.md Blocked on the libmpv2 swap. ⚠️ suggested id IR-030 is taken.

Design authority

Spec Role
playback-backend-unification.md Why video cannot unify onto one native engine and audio can. The audio half has since shipped on Android; Windows has not.
scoped-search-boundary.md The boundary design the check:boundary rule came from. Stage 1 built.
scoped-search.md Superseded in part — its "frontend only, no Rust changes" decision is the leak the boundary spec reversed. UX still current.

Where the shipped specs went

Sixteen specs were folded into the architecture docs and deleted (2026-08-21). Where to look for each:

Shipped work Now documented in
Account menu & global chrome 02-svelte-frontend.md — App Shell and Chrome
Library mosaic 02-svelte-frontend.md — Library Mosaic
Series current-episode navigation 02-svelte-frontend.md — Series and Episode Navigation
Downloads as an offline library 02-svelte-frontend.md — Downloaded Browse
Favourites browsing 01-rust-backend.md — Favorites System
Streaming bitrate cap 01-rust-backend.md — Streaming quality ladder
Locally-indexed search 03-data-flow.md — Search Flow; 01-rust-backend.md — Background workers
Offline downloaded-only filter 06-downloads-and-offline.md — Offline Catalog Visibility
Audio equalizer · Android audio settings parity 05-platform-backends.md — Audio settings on ExoPlayer
Android native video spike 05-platform-backends.md — Native Video Compositing
Video background audio 05-platform-backends.md — Background Audio Handoff
Traceability gate repair traceability-ci.md
Boundary tripwire hardening scripts/check-frontend-boundary.sh (its header is the spec)
Playback docs corrections · req-coverage script removal Nothing to document — both were corrections that have been applied