Add a read-only LAN probe for validating the design

Tautulli stays local-network-only, so nothing off the LAN can check this
design against real data. tools/probe.py closes that gap from the inside:
GET requests only, standard library only, credentials redacted from all
output including error messages.

It answers open questions 1-4 in one run — Tautulli's coverage horizon,
the finished/partial/abandoned split across real plays, whether successive
plays are being grouped, library shapes and sizes, multi-version items,
and path roots by size. It also runs the pms_identifier cross-check from
section 4.11.

tools/mockserver.py mocks both APIs so the probe is testable without a live
server. Verified against it: the happy path, Tautulli absent, Tautulli
unreachable, Tautulli erroring, Plex unreachable, and an identifier
mismatch. Credential redaction confirmed in every error path.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GVbG48GAXfCZatcmX123Ra
This commit is contained in:
Jess Hallsworth 2026-09-07 04:57:38 +00:00
parent 74dfc4dab8
commit 2c1033e4a7
No known key found for this signature in database
4 changed files with 626 additions and 5 deletions

View file

@ -46,6 +46,29 @@ Portainer stack behind Nginx Proxy Manager.
allowlist, and an audit log
- **v3** — Emby and Jellyfin support behind the existing `MediaProvider` abstraction
## Validating the design first
Plex and Tautulli are both LAN-only, so `tools/probe.py` exists to check this design
against real data from inside the network. It is **read-only** — GET requests only,
nothing is modified — and has no dependencies beyond the standard library.
```bash
export PLEX_BASE_URL=http://192.168.1.10:32400
export PLEX_TOKEN=...
export TAUTULLI_BASE_URL=http://192.168.1.100:8181
export TAUTULLI_API_KEY=...
python3 tools/probe.py # summary to stdout
python3 tools/probe.py --dump inventory.json # plus a full item inventory
```
It reports Tautulli's coverage horizon, the finished/abandoned/never-opened split across
real plays, library shapes and sizes, path roots, multi-version items, and whether
Tautulli is actually watching the Plex server you think it is. Credentials are redacted
from all output including error messages, so the result is safe to paste anywhere.
## Documentation
- [`docs/design.md`](docs/design.md) — the full software design
- [`tools/probe.py`](tools/probe.py) — read-only reconnaissance script
- [`tools/mockserver.py`](tools/mockserver.py) — mock Plex/Tautulli for testing the probe