unarr/internal/cmd
Deivid Soto f0c51c5d90 feat(daemon): telemetría de salud continua + heartbeat de sesiones copy
El watcher F3 posteaba UN snapshot de speed= al arrancar y moría: un encoder
sano en el minuto 1 que se ahoga en el minuto 20 (escena compleja, GPU robada
por otro proceso) era invisible para el triage de stalls del player, que
decidía con el dato de arranque.

- monitorSessionHealth: ticker 5s el resto de la sesión; re-postea al cambiar
  el bucket ok/marginal/struggling (con histéresis de 2 ticks — una EWMA
  bailando sobre 0.95 no puede webhookear cada 5s) o al derivar el ratio
  ≥0.15. Un POST fallido NO avanza el baseline: el tick siguiente reintenta
  (perder el único webhook de la transición a struggling cegaba al player
  justo en el caso que esto existe para cubrir).
- resetTranscodeStats() en restartFromSegment: el ffmpeg nuevo de un seek
  re-arma el warmup y resiembra la EWMA — sus frames fríos (speed=0.0x)
  hundían la media curada a <0.75 y el monitor habría posteado un
  "struggling" falso que pausaba el player en pleno seek. Verificado e2e:
  dos restarts (seek a 1200s) con health estable en ok.
- inputBound ventanado (30s) en vez de pegajoso: un blip de lectura
  transitorio ya no reclasifica como input_bound/struggling cada dip <0.95
  durante el resto de una sesión de horas.
- Heartbeat copy (F2): las sesiones -c:v copy postean una vez
  {ok, 1.0, "copy"} tras el ready — la web ya distingue "sesión copy" de
  "agente viejo sin telemetría" (ambos eran null). Segundo POST deliberado:
  un 400 de una web vieja (enum sin "copy") jamás debe bloquear el ready.
- Logs de fallo etiquetados por tipo de POST: un heartbeat fallido ya no se
  lee como "mark-ready failed" (el ready SÍ aterrizó).

Requiere web con session-ready/SSE actualizados (desplegar web primero;
contra web vieja todo degrada a best-effort con log).
2026-06-11 20:53:18 +02:00
..
agent_client.go feat(agent): add mirror failover, agent client refactor, status 401 detection 2026-05-15 16:26:43 +02:00
auth_browser.go feat(agent): per-machine key handoff + revocation handling 2026-06-06 12:30:21 +02:00
auth_browser_test.go feat(auth): browser-based CLI authentication (like Claude Code) 2026-03-29 17:53:18 +02:00
clean.go fix(lint): use default:none to disable errcheck, fix all gofmt and exhaustive 2026-03-31 00:29:16 +02:00
clean_test.go fix(lint): use default:none to disable errcheck, fix all gofmt and exhaustive 2026-03-31 00:29:16 +02:00
completion.go docs: improve CLI help, shell completion, and README 2026-03-28 21:36:27 +01:00
completion_helpers.go docs: improve CLI help, shell completion, and README 2026-03-28 21:36:27 +01:00
config_menu.go feat(stream): cache scan-time thumbnail frames to the .unarr sidecar 2026-06-02 09:20:00 +02:00
config_menu_test.go feat(cli): upgrade command, rich status, and version cache 2026-03-31 22:05:43 +02:00
daemon.go feat(daemon): telemetría de salud continua + heartbeat de sesiones copy 2026-06-11 20:53:18 +02:00
daemon_control.go refactor(sentry): decouple agent import via string-match, rename predicate 2026-05-27 17:03:26 +02:00
daemon_install.go feat(daemon): enhance service management with start, stop, restart, and status commands for Windows 2026-04-10 19:18:13 +02:00
daemon_test.go test: add comprehensive test suite for engine, agent and cmd packages 2026-04-08 23:36:00 +02:00
doctor.go chore: rename module from torrentclaw-cli to unarr 2026-03-30 13:06:07 +02:00
doctor_unix.go docs: improve CLI help, shell completion, and README 2026-03-28 21:36:27 +01:00
doctor_windows.go docs: improve CLI help, shell completion, and README 2026-03-28 21:36:27 +01:00
download.go feat(seeding): wire seed ratio/time lifecycle into the torrent daemon 2026-06-01 10:30:39 +02:00
download_test.go test: add comprehensive test suite for engine, agent and cmd packages 2026-04-08 23:36:00 +02:00
funnel.go feat(funnel): cloudflare quick tunnel embedded subprocess (0.9.5) 2026-05-26 20:39:57 +02:00
helpers.go fix(security): CORS allowlist, URL scheme guard, state perms, ZIP slip, mirror docs 2026-05-15 18:48:59 +02:00
helpers_test.go fix(security): CORS allowlist, URL scheme guard, state perms, ZIP slip, mirror docs 2026-05-15 18:48:59 +02:00
init.go feat(agent): per-machine key handoff + revocation handling 2026-06-06 12:30:21 +02:00
inspect.go chore: rename module from torrentclaw-cli to unarr 2026-03-30 13:06:07 +02:00
login.go fix(agent): only treat explicit 410/403 as revocation; honour --config 2026-06-06 12:51:51 +02:00
migrate.go chore: rename module from torrentclaw-cli to unarr 2026-03-30 13:06:07 +02:00
mirrors.go feat(agent): add mirror failover, agent client refactor, status 401 detection 2026-05-15 16:26:43 +02:00
player_session_registry.go feat(hls): full-GPU scale_cuda for NVENC SDR downscales 2026-06-10 21:44:58 +02:00
popular.go chore: rename module from torrentclaw-cli to unarr 2026-03-30 13:06:07 +02:00
probe_hwaccel.go feat(stream)!: retire WebRTC, HLS-only, bump 0.9.4 2026-05-26 18:04:35 +02:00
recent.go chore: rename module from torrentclaw-cli to unarr 2026-03-30 13:06:07 +02:00
reload_unix.go refactor(sentry): decouple agent import via string-match, rename predicate 2026-05-27 17:03:26 +02:00
reload_windows.go feat(daemon): enhance service management with start, stop, restart, and status commands for Windows 2026-04-10 19:18:13 +02:00
relocate_test.go feat(library): content fingerprint + path-resilient sync + stream self-heal 2026-06-03 12:08:58 +02:00
resolve_playable_test.go fix(daemon): reportar fallos de arranque de sesión a la web + scan en sesión única 2026-06-10 17:39:09 +02:00
root.go fix(agent): only treat explicit 410/403 as revocation; honour --config 2026-06-06 12:51:51 +02:00
scan.go fix(daemon): reportar fallos de arranque de sesión a la web + scan en sesión única 2026-06-10 17:39:09 +02:00
search.go chore: rename module from torrentclaw-cli to unarr 2026-03-30 13:06:07 +02:00
self_update.go fix(security): UPnP opt-in, bounded SSE reader, signed self-update 2026-05-15 17:29:22 +02:00
stats.go chore: rename module from torrentclaw-cli to unarr 2026-03-30 13:06:07 +02:00
status.go feat(agent): add mirror failover, agent client refactor, status 401 detection 2026-05-15 16:26:43 +02:00
stream.go test: add comprehensive test suite for engine, agent and cmd packages 2026-04-08 23:36:00 +02:00
stream_handler.go feat(stream): debrid passthrough for mode=stream tasks (external players) 2026-06-03 22:43:43 +02:00
stream_test.go test: add comprehensive test suite for engine, agent and cmd packages 2026-04-08 23:36:00 +02:00
upgrade.go fix(security): UPnP opt-in, bounded SSE reader, signed self-update 2026-05-15 17:29:22 +02:00
version.go chore(release): 1.1.2-beta 2026-06-11 09:38:32 +02:00
version_cmd.go docs: improve CLI help, shell completion, and README 2026-03-28 21:36:27 +01:00
vpn.go feat(vpn): unarr vpn command + report/arbitrate the WireGuard slot 2026-05-22 08:33:02 +02:00
watch.go chore: rename module from torrentclaw-cli to unarr 2026-03-30 13:06:07 +02:00