Lamp the subtitle upstreams in the signal chain #200

Closed
opened 2026-08-24 21:28:40 +01:00 by naps62-yolo · 1 comment
Owner

Add the subtitle upstreams to the health check in crates/arr-api/src/health.rs,
next to the existing prowlarr, transmission and tmdb lamps, and to the signal
chain section of /settings described in §9.7.

  • Each enabled provider: reachable and credentials accepted.
  • The selected translation engine: reachable, or for the remote-command backend
    that the command runs and exits cleanly.
  • alass and ffmpeg: present at the configured paths.

A failing lamp folds into the existing "Broken" notification to the operator
alone (§9.5). No new notification classes.

Keep the probes cheap and parallel like the existing three; the health endpoint
is polled.

Depends on: #198

Add the subtitle upstreams to the health check in `crates/arr-api/src/health.rs`, next to the existing prowlarr, transmission and tmdb lamps, and to the signal chain section of `/settings` described in §9.7. - Each enabled provider: reachable and credentials accepted. - The selected translation engine: reachable, or for the remote-command backend that the command runs and exits cleanly. - `alass` and `ffmpeg`: present at the configured paths. A failing lamp folds into the existing "Broken" notification to the operator alone (§9.5). No new notification classes. Keep the probes cheap and parallel like the existing three; the health endpoint is polled. Depends on: #198
naps62-yolo added this to the Subtitles milestone 2026-08-24 21:28:40 +01:00
naps62-yolo added the difficulty/easyarea/apiphase/9-subtitlestype/feature labels 2026-08-24 21:28:40 +01:00
naps62-yolo added a new dependency 2026-08-24 21:29:28 +01:00
Author
Owner

Implemented the subtitle upstreams as health lamps (#200), on branch subtitles/200-subs-lamps.

GET /api/health now carries a subtitles object: one check per provider enabled in settings (reachable, credentials accepted; an enabled provider without bootstrap credentials reports unconfigured), a check for the selected translation engine (null when none is chosen; the remote-command backend is probed by running its template over an empty batch and requiring a clean exit), and presence checks for alass and ffmpeg at their configured paths. Probes run in parallel with the existing three and cost no quota — OpenSubtitles is probed with a request the API refuses after authentication, Podnapisi via its anonymous root, DeepL via /v2/usage, Google via languages, OpenAI-compatible via models. A failing lamp degrades the overall status and folds into the existing edge-triggered "Broken" ntfy to the operator alone; no new notification classes. The settings view's signal chain section renders the lane as a row of lamps under the main chain, rebuilt per health poll since the enabled set is a settings row. Verified visually against a local daemon via agent-browser; just ci passed (700 tests, fmt, clippy, biome, token check).

Commits: 8c5613b probe traits + impls (arr-subs), be7fa87 health report + API tests, 8c6d4ca BrokenAction folding, a836967 web lane.

Findings

  • The health endpoint is polled every 15s by the UI. For the remote-command engine, the issue's own wording ("the command runs and exits cleanly") means every poll spawns the configured command — an ssh/agent-CLI template gets executed ~5,700 times a day just for the lamp. I implemented it as scoped, but it is worth an issue deciding whether the command lamp should be probed on a slower cadence or cached.
  • binary_present resolves bare names through PATH and checks explicit paths on disk. A configured path that exists but fails at exec time (wrong arch, missing interpreter) still shows a lit lamp. Cheap and good enough for the common case; noted so nobody expects more.
Implemented the subtitle upstreams as health lamps (#200), on branch `subtitles/200-subs-lamps`. `GET /api/health` now carries a `subtitles` object: one check per provider enabled in settings (reachable, credentials accepted; an enabled provider without bootstrap credentials reports `unconfigured`), a check for the selected translation engine (`null` when none is chosen; the remote-command backend is probed by running its template over an empty batch and requiring a clean exit), and presence checks for `alass` and `ffmpeg` at their configured paths. Probes run in parallel with the existing three and cost no quota — OpenSubtitles is probed with a request the API refuses after authentication, Podnapisi via its anonymous root, DeepL via `/v2/usage`, Google via `languages`, OpenAI-compatible via `models`. A failing lamp degrades the overall status and folds into the existing edge-triggered "Broken" ntfy to the operator alone; no new notification classes. The settings view's signal chain section renders the lane as a row of lamps under the main chain, rebuilt per health poll since the enabled set is a settings row. Verified visually against a local daemon via agent-browser; `just ci` passed (700 tests, fmt, clippy, biome, token check). Commits: `8c5613b` probe traits + impls (arr-subs), `be7fa87` health report + API tests, `8c6d4ca` BrokenAction folding, `a836967` web lane. ## Findings - The health endpoint is polled every 15s by the UI. For the remote-command engine, the issue's own wording ("the command runs and exits cleanly") means every poll spawns the configured command — an ssh/agent-CLI template gets executed ~5,700 times a day just for the lamp. I implemented it as scoped, but it is worth an issue deciding whether the command lamp should be probed on a slower cadence or cached. - `binary_present` resolves bare names through `PATH` and checks explicit paths on disk. A configured path that exists but fails at exec time (wrong arch, missing interpreter) still shows a lit lamp. Cheap and good enough for the common case; noted so nobody expects more.
naps62-yolo added a new dependency 2026-08-25 06:31:40 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: yolo/arr#200