mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-01 18:32:27 +00:00
First piece of the "My Videos" management tab: classifyVideoHealth decides the maintenance status for one of the user's own videos from note-side data plus an optional URL probe result. Pure/synchronous so it's deterministic and testable; the controller will do the actual HEAD probe and pass the result in. Statuses: no-source (no url AND no magnet) -> error; hosted-URL-unreachable -> warning; deleted (tombstoned) -> info; otherwise ok. Key guardrail: only URLs under the user's storage publicBaseUrl can be flagged dead — external/CORS-opaque links are never cried wolf on. Deleted is checked before no-source since soft-delete scrubs url/magnet. Tests + mutation-verified: dropping the hosted guard (external false-alarm) and removing deleted-precedence each fail a scenario. Build + full lint green. Co-Authored-By: Claude Opus 4.8 <[email protected]>