Skip to content

feat(nodes): run transcode nodes without database, Redis or shared secrets - #4337

Merged
Quick104 merged 19 commits into
mainfrom
feat/self-hosted-remote-transcode-nodes
Nov 15, 2026
Merged

Quick104 merged 19 commits into
mainfrom
feat/self-hosted-remote-transcode-nodes

Conversation

@Quick104

@Quick104 Quick104 commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: #1176
Validation tasks: changes #1177 C1, C2, C3; changes #1178 C1, C2

Other clients: Apple N/A; Android N/A; Roku N/A (node administration is web-only; the one answer clients can see is under Risks, and no parity issue is filed for it)

A remote transcode node today is the full silo binary with the main server's Postgres connection, Redis, SECRET_KEY and the shared auth.jwt_secret, which also signs login and stream tokens. A self-hoster who adds a GPU box to their server puts credentials for the whole deployment on that box.

This change removes them from the node. A transcode node starts with two settings, SILO_CORE_URL and SILO_NODE_KEY, and holds no database, Redis or shared secret. An admin issues the key on the web Nodes page. There is still one transcode node type and no legacy mode; proxies are unchanged. The node still reads media from its own library mount at the catalog's paths. Reading through the API servers instead is #4338, stacked on this one.

This replaces the draft #2525. It is rebuilt on current main and split in two.

The validation cases above passed on build 1804 and need another run after this merges. Registering a transcode node now includes issuing its key and starting it with the two settings (#1177 C1, #1178 C1). Session counts and telemetry reach the server in the node's reports instead of the node writing Redis (#1177 C2, #1178 C2). A dead node's session still moves to another node; the rebuild there now asks the API server for the recipe (#1177 C3).

Approach

  • Node keys. Each transcode node has its own key, issued by POST /api/v2/admin/nodes/{id}/key and stored encrypted on its stream_nodes row. The answer shows the key once, and every call rotates it immediately. The node list reports key_issued, and a node_keys capability marks the feature. Every API server and proxy keeps a registry of the keys and reloads it on node changes, every 60 seconds, and when a node rejects a signature.
  • Signing. API servers and proxies sign requests to a transcode node with that node's key. The node signs its calls to the API servers with the same key under a different derivation label, so a request captured in one direction does not verify in the other. A request to a transcode node never falls back to the shared secret, which now authenticates proxies only.
  • Node routes on the API server. Under /api/internal/nodes/self, outside user auth, the node pulls its configuration, posts a session and telemetry report every second, ships its logs (FFmpeg output included) to the operational log, and reports its drain state. Each node has a request budget on each API server.
  • Playback authority stays on the API server. A node no longer verifies stream tokens or reads stop markers and recipes from Redis. To rebuild a lost HLS session or serve a progressive remux it calls resolve, which runs the stop and token checks and returns the recipe only to the node the session belongs to. Stopping a session deletes its stored recipe unless the session has moved to another node, and every move writes the stored recipe immediately so the new node can rebuild.
  • Source grants. Every job carries a one-hour grant the API server signs for one file revision and one node. The node exchanges it for the catalog path and compares the size and modification time of the file at that path. On a mismatch it answers 409 and the API server runs the job itself.
  • Unavailable nodes. A node that rejects a signature, or that an API server or proxy cannot sign for, counts as unavailable and never triggers a move. A server with a stale key registry cannot sign for any node, so moving on that error would move healthy streams. A node still running the old binary is recognized from its health answer and gets no work.
  • Web. The Nodes page shows the key status of each transcode node, offers a key after a node is added, shows it once with the two settings, and confirms a rotation with a hint to drain the node first.

docs/architecture/transcode-nodes.md holds the protocol, the security properties, the failure table and the known limits. docs/update-to-1.0.md has the upgrade steps.

Three choices a reviewer may ask about:

  • The node listener has no built-in TLS. The node warns at startup when SILO_CORE_URL is plain HTTP to another host.
  • There are no enrollment tokens and no encoding limits the server owner sets against the node owner. The design assumes the person who runs the node also administers the server.
  • miniredis is a new test dependency. The report fence is a Lua script, and unit tests need something to run it against.

Validation

  • The full gate in CONTRIBUTING passes on this branch merged with main at c11b0a968f, with these exceptions: two tests that run real FFmpeg (in internal/mediasample and internal/playback) fail the same way on main with the FFmpeg 6.1 used here; the backup tests skip without pg_dump; ShellCheck and the Prometheus rules check were not run because the tools are not installed. The only commits since are the locale syncs, now pinned to silo-translations release 2026.11.15-0d604d4; the web typecheck passes on them.
  • The Postgres-backed tests ran against a local Postgres.
  • New tests cover signing and verification in both directions, the key registry, the node routes with their report fence and budgets, the resolve decisions, recipe deletion on stop, source grants, and the node's configuration loader. One in-process test starts an API server and a node together and plays through them. They do not cover real FFmpeg on a remote node or a GPU.
  • A run on a real local stack (one API server, two transcode nodes started with only the two settings, a proxy, Valkey, Postgres, FFmpeg 6.1) passed everything except deleting a node, which is fixed. It covered playback through the API server and the proxy, rebuild after the node was killed, a move to the other node 0.46 s after the first failed relay, an API server restart, key rotation, drain, and unsigned, wrongly signed and cross-node requests. The evidence page has the table.
  • Two runs on shared dev of the stacked branch, at 0bb7f9a314 and again at 5f9ffeb1c0, on two existing transcode nodes with Intel GPUs (FFmpeg 8.1.3-Jellyfin). The first upgraded them in place: after the API server was upgraded and before their keys were issued, the old-binary nodes showed as unhealthy and took no work. With keys and the two settings they ran VAAPI decode with h264_qsv encode, HDR10 and Dolby Vision tone mapping in hardware, PGS and text subtitle burn-in, copy remux, progressive remux through a proxy, a Jellyfin-surface transcode, and one session in the web player. The node processes held no Postgres or Redis connection. A killed node rebuilt its session on the next segment request, a dead node's session moved to the other node with no failed request, and drain behaved as documented. A key rotation showed as key_rejected in the node's health answer within 3 seconds, and the node came back healthy with the new key. Node log lines kept arriving with no log batch refused. VobSub burn-in failed in the hardware overlay; main builds the same FFmpeg command. Shared dev is back on main.
  • The first CI run failed one test that came from main: it set no node keys, so it passed only where a local FFmpeg was installed. Fixed in 717abc7afc; CI passes on the commit before the last push.
  • Bot reviews raised 15 findings. Three are fixed: a transient stat error on the API server ended a job (717abc7afc), a full log throttle rescanned on every refused request (717abc7afc), and a node key could write about 20 MiB of logs a second (6ad9f778c6). Two describe a race that main has too, a late node stop ending a newer job with the same transport id; [bug] A late transcode node stop can end a newer job with the same transport id #4359 tracks it. One is open for a maintainer decision: a holder of a node key can make the server read and hash request bodies before the request budget refuses them. The rest were not defects.
  • The second shared-dev run found that a log line carrying a remote address with its port failed the insert of its whole log batch, and a refused node request logs one. Fixed in 155319ab64, after that run.
  • Not run: the Docker build, and an omnibus image built from this branch. The shared-dev nodes ran this binary inside the existing image.

Evidence

Evidence: https://evidence.siloserver.org/r/silo-server/thin-transcode-nodes/

Surface and build: web admin Nodes page on desktop, and the end-to-end run, both at 76e212b2ee of this branch on a local stack. The fixes that came out of the run are in 948ec3e2ff. The shared-dev run is linked from that page.

Risks

  • Upgrade. After the upgrade a transcode node takes no work until an admin issues its key and the node restarts on the new binary with the two settings. The steps and their order are in docs/update-to-1.0.md.
  • Migration. Adds the nullable stream_nodes.node_key_ciphertext column. A proxy started before the main server has migrated warns and retries.
  • Rotation and delete. Rotating a key cuts that node's running streams until it restarts with the new key, so the page says to drain first. Deleting a node ends its sessions.
  • Trust in the server address. The node takes its FFmpeg path, directories and input paths from the API server's answers, so the link to SILO_CORE_URL must be a trusted network or HTTPS.
  • Client-visible answer. A /api/v2 delivery request relayed to an unavailable transcode node now answers 503 dependency_unavailable instead of 500 internal_error. A progressive remux request for a transport that is already running now gets its 409 before the 401 or 410 it could also have got.
  • Known limits, listed in the design doc. After a lost change event, a stale registry can keep signing for up to 60 seconds. A stream token can rebuild a stopped transport after a node restart when no stop marker exists, as on main. Killing a node with SIGKILL leaves its FFmpeg child running, also as on main.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • Each test this pull request adds meets "Decide what to test" in CONTRIBUTING.md.
  • The Evidence section shows every change a user can see, or how I checked a change nobody sees.

AI Disclosure

  • Harness: Claude Code in T3 Code
  • Tool(s): Claude Code subagents for implementation, review and the local end-to-end run; the silo-translations translation pass
  • Model(s): claude-fable-5-2 (design decisions, integration, this description); claude-opus-5-5 (subagents, translation pass)
  • Involvement: Fully AI-generated at the maintainer's direction; the maintainer has not yet reviewed the diff
  • Adversarial review: Three independent agents reviewed the design of feat(nodes): run transcode nodes without database, Redis or shared secrets #2525 against current main before any code was written. That review changed recipe deletion on stop, recipe writes on a move, the precision of the file revision check, and what the node-to-server signature covers. The playback-authority stage had its own independent review, and the finished branch had two more, one of the node side and one of the API server and its security. Their findings are fixed: request budgets missing on three node routes, node log entries not normalized, a key issue that did not publish the change, a moved session's recipe written late, a signing failure that triggered a move, and a force reload that revoked recipes before the node had reloaded. None found a way past authentication or into another node's sessions. What remains is under Risks.

🤖 Generated with Claude Code

Note

Run transcode nodes without database, Redis, or shared secrets

Transcode nodes now get configuration, playback authority, and source access entirely from the core server via new node-control endpoints, so they need no local database, Redis, or shared JWT secret.

  • Adds per-node key authentication. The core issues and stores encrypted node keys (new stream_nodes.node_key_ciphertext column), signs all core-to-node requests per target, and verifies node-to-core requests via nodeauth.VerifyFromNode. Keyless transcode nodes are excluded from work planning.
  • Adds source grants: node jobs open media through /api/internal/nodes/self/sources/open, which validates the grant against the catalog and renews it; input_path is replaced by source_grant in the transcode-start, chapter, trickplay, media-sample, and download-preparation protocols.
  • Adds a MODE=transcode standalone entrypoint (runTranscodeNode in transcode_node.go) configured by SILO_CORE_URL and SILO_NODE_KEY; lost HLS sessions and remux are resolved through the core instead of local recipe stores and deny markers.
  • Adds node reporting: health responses carry a control-protocol version and key-rejection flag, and nodes ship opslog entries, session records, and telemetry snapshots to the core.
  • Admin UI can issue/rotate transcode-node keys and shows key status; canonical-URL collisions between transcode nodes are rejected with ErrTranscodeNodeURLTaken.
  • Risk: node-to-core and core-to-transcode request signing replaces the shared JWT secret across all handlers (NodeHandler, PlaybackHandler, proxy relays, download/trickplay/chapter/subsync remotes) — any consumer still using the old secret path breaks. Transcode nodes without an issued key are excluded from all work placement (TranscodePool.HasKey).

Macroscope summarized 472809a.

Quick104 and others added 12 commits November 14, 2026 19:16
Adds the per-node credential that thin transcode nodes will sign with.
Nothing signs with it yet, so existing nodes behave as before.

- stream_nodes.node_key_ciphertext holds the key encrypted under the row
  AAD. It is a credential, not configuration: issuing one moves neither
  the admin revision nor the pool generation.
- POST /api/v2/admin/nodes/{id}/key issues or rotates a key and returns it
  once. Node rows gain key_issued, and the node capabilities gain
  node_keys. Proxies take no key (409).
- nodepool.KeyRegistry holds every node's credential, disabled nodes
  included, on API servers and proxies. It reloads on node_pool_changed,
  every minute, and on a lookup miss at most once a second. A proxy that
  starts before the column is migrated keeps running and loads it later.
- Two transcode nodes can no longer be saved at one canonical URL, since
  the registry finds a node by that address.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
The core now signs every request to a transcode node with that node's key,
and the node verifies with the same key from SILO_NODE_KEY. The shared
secret signs only requests to proxies.

- nodeauth splits signing by direction: core to node and node to core use
  separate HKDF labels and canonical versions, so a request captured in
  one direction never verifies in the other. The node-to-core signature
  also covers the source grant header.
- Senders name the kind of node they target. The registry's keyring gives
  a transcode target only that node's key and gives a proxy target the
  shared secret only for a URL registered as a proxy. An unknown URL and a
  keyless node are errors; neither falls back to the shared secret.
- A transcode node without a usable key stays listed and health-checked
  but takes no new work.
- The node's signed routes accept no legacy bearer.
- HTTP clients that call a node refuse redirects explicitly.

The node still holds its database and Redis; later commits remove them.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Adds the routes a thin transcode node will call instead of reading the
database and Redis itself. Nodes do not call them yet.

- nodecontrol.RequireNode verifies a node-signed request against the key
  registry and puts the node id in the request context. Handlers take the
  node's identity only from there. A disabled node is accepted; a deleted,
  keyless or proxy row gets 401.
- GET /api/internal/nodes/self/config returns the calling node's settings
  with its row overrides applied, with the revision as a strong ETag. A
  test fails when the node reads a config field the document lacks.
- POST .../self/report replaces the node's session records and telemetry
  snapshot, fenced on (boot_id, seq) so a replayed or older report changes
  nothing. Keys are scoped by the authenticated node id.
- POST .../self/logs stores a log batch under the authenticated node and
  clamps entry timestamps to the core's clock.
- POST .../self/health-changed publishes node_drain_changed.
- Report, logs and health-changed share a per-node request budget.
- The routes stay out of the request log, the activity log and response
  compression, and the worker protocol contract lists them as node_signed.

miniredis is added for tests: CI has no Redis, and the report fence and
session replacement are Lua scripts.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Each transcode node shows whether it has a key, with a warning that a node
without one takes no work. On a server that can issue keys, an admin can
issue or rotate the key. Rotation asks for confirmation and says the
node's running streams fail until it restarts with the new key.

The new key is shown once, with the SILO_CORE_URL and SILO_NODE_KEY
settings the node starts with. It is kept in the dialog's state only, and
the dialog cannot be closed while the request is in flight. A refusal
shows the server's reason; a lost answer says the key may have rotated.

Creating a transcode node offers to issue its key.

The translation pin names a local catalog commit. Re-sync to a published
release before this merges.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
The core now makes the decisions a transcode node made from Redis and the
shared secret. Nodes do not call the new routes yet.

- POST /api/internal/nodes/self/resolve answers the recipe and playback
  identity for a node rebuilding a lost HLS session or serving a
  progressive remux: deny checks, token verification, and a recipe bound
  to the calling node. A complete stored card wins over a complete token,
  because a move rewrites the card while the client keeps its old token.
  A recipe store read error is 503.
- POST /api/internal/nodes/self/revoke-recipes revokes the calling node's
  recipes, for the node to call inside its own force-reload teardown.
- A remote stop deletes the transport's stored recipe before it tells the
  node, unless the recipe names another node URL. A release deletes
  nothing. jellycompat reuses a transport id across start candidates, so a
  late stop on one must not remove the next one's recipe.
- Every dead-node move writes the stored recipe naming the new executor,
  for sessions whose URLs carry a token too. jellycompat recipes bind the
  node they started on.
- Every relay that signs a request to a transcode node checks the deny
  marker first, and a move rechecks it before it commits and before it
  serves.
- A node's 401 and a failure to sign for a node reach clients as the node
  being unavailable, not as a client auth failure. Neither moves the
  transcode: a replica with a stale key registry cannot sign for any node.
  /api/v2 delivery maps a relay 502 to dependency_unavailable.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
The core now signs a source grant for every job it sends a transcode node:
a stateless capability to use one revision of one catalog file, or theme
file, through one node. Nodes do not use grants yet and still approve
paths against the catalog themselves.

- A grant names the node, the file or theme id, the fspath-encoded catalog
  path, the size and the modification time, and lasts an hour. Its key is
  derived from auth.jwt_secret under its own label. Revisions compare the
  modification time at microseconds, the catalog's precision.
- Native and Jellyfin-compatible starts, dead-node moves, download
  preparation, trickplay, chapter thumbnails and subtitle-sync samples
  carry source_grant. A move sends the replacement node a fresh grant.
  When no grant can be minted the work fails over or runs locally as a
  failed dispatch does.
- POST /api/internal/nodes/self/sources/open exchanges a grant for the
  approved path and a renewed grant. It refuses another node's grant
  (403), a source that left the catalog or the disk (410) and a changed
  size or modification time (412).
- Resolve checks that the catalog still has the recipe's file or theme and
  adds a grant for the calling node.
- nodesource.Opener is the node side: it opens a grant against the node's
  own mount, refuses a mount whose revision differs, and renews the grant
  while the source is open.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
…crets

A transcode node now starts with two settings, SILO_CORE_URL and
SILO_NODE_KEY, and holds no database, Redis, data cipher, event bus or
shared secret. There is one transcode node type and no legacy mode: nodes
from before this change cannot work with an updated core, or the reverse.
Proxies are unchanged.

- MODE=transcode branches before the bootstrap. DATABASE_URL, REDIS_URL,
  SECRET_KEY, NODE_URL and NODE_NAME are ignored with one warning. A
  plain-HTTP core URL off the host logs a warning, because the node takes
  its FFmpeg path, directories and input paths from the core's answers.
- The node reads its configuration from the core, polls it every 30
  seconds, and rereads it when the core pushes a reload. The core pushes
  after a drain request or resume and after a change to a node's
  overrides. An unchanged poll keeps the configuration pointer.
- Sessions and stream telemetry stay in memory and go to the core in a
  report every second. Logs, FFmpeg output included, ship to the core.
  Drain changes are reported to the core instead of the event bus.
- The node verifies no stream token and reads no deny marker or recipe.
  A lost HLS session and every progressive remux request ask the core's
  resolve route, after the node's own stop fences. A force reload asks the
  core to revoke the node's recipes first.
- Every job opens its input with the source grant it carries, at the
  approved path on the node's own mount. A mount whose file differs from
  the core's answers 409. The catalog path authorizers are gone.
- Health carries the node control version and key_rejected. The core
  treats a transcode node without the version, or with a rejected key, as
  unhealthy, so a node on an older build is not placed.
- The omnibus init and the shipped Compose file no longer ask a transcode
  node for database or Redis settings.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
- config now shares the per-node background budget, and resolve and
  sources/open get a budget of their own (200 a second, burst 600), so a
  node key cannot loop catalog reads without bound. A node treats 429 as
  transient on every route.
- Log entries a node ships are normalized before they are stored: an
  address that does not parse is cleared and node-supplied text is capped.
  A bad row no longer makes the core retry the batch row by row, and the
  dropped-entries warning is logged at most once a minute per node.
- Issuing a key publishes node_pool_changed even when the pool reload
  fails, and a node's 401 asks the credential registry to reload, so a
  replica holding a replaced key heals in seconds.
- A dead-node move writes the new node's stored recipe as soon as the move
  commits, then retires the old node. Nodes no longer delete recipes, so
  the wait left a window where the new node could not rebuild.
- A chapter thumbnail job a node cannot serve reports the reason the core
  falls back to local extraction for.
- A rejected key is described with both causes: a replaced key or a clock
  more than 30 seconds off.
- A progressive remux request checks the node's own state before it asks
  the core.
- make dev-transcode starts a node with SILO_CORE_URL and SILO_NODE_KEY.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
docs/architecture/transcode-nodes.md is the authority for the design: node
keys, signing in both directions, the node control routes, playback
authority on the core, source grants, failure behavior and security
properties. docs/update-to-1.0.md gains the operator steps for the
coordinated node upgrade. Other documents link to the new one and no
longer say that a transcode node reads the database, Redis or the shared
secret.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
…e rejects

- Creating, updating or deleting a node now reloads this server's
  credential registry before the response and publishes
  node_pool_changed, and reconciliation invalidates the registry when the
  node list changes. A deleted node kept signing and being signed for
  until the registry's 60-second reload.
- A transcode node shutting down on SIGTERM no longer waits for its
  sessions while the main server rejects its key: no relay can reach
  them and nothing will stop them. After a key rotation without a drain,
  the restart waited out the 10-minute drain timeout.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
…te-transcode-nodes

- .silo-translations, web/src/locales/*, .silo-translations-files: took
  main's, then regenerated with sync-translations --local from the
  rebased silo-translations branch (pin local-de1af480da75).
- go.mod/go.sum: kept miniredis/gopher-lua beside main's bumped
  go-keyring and xxh3; go mod tidy.
- scripts/ci/db-contracts.txt: kept both sides' entries.
- contracts/api/v2/openapi.json: regenerated; the node protocol's
  playback_RecipeCard schema gains main's adaptation_reasons.
- internal/transcodenode: main's new spawnReconstruct test passes a
  nodecontrol.Resolution, as this branch's spawnReconstruct takes.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 11 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d791ece7-4ce4-426e-94be-72b8495d9207
Commits

Reviewing files that changed from the base of the PR and between 39ad6d9 and 472809a.

Files ignored due to path filters: 1

  • go.sum is excluded by !**/*.sum
Files selected for processing: 292

  • .env.example
  • DEVELOPMENT.md
  • Makefile
  • README.md
  • cmd/silo/main.go
  • cmd/silo/network_access_multinode_test.go
  • cmd/silo/node_drain.go
  • cmd/silo/node_drain_test.go
  • cmd/silo/node_keys.go
  • cmd/silo/node_keys_db_test.go
  • cmd/silo/transcode_node.go
  • cmd/silo/transcode_node_test.go
  • contracts/api/v2/openapi.json
  • contracts/api/v2/route-inventory.json
  • docker-compose.yml
  • docs/admin-api.md
  • docs/architecture/media-sampling.md
  • docs/architecture/node-drain.md
  • docs/architecture/node-failure-detection.md
  • docs/architecture/omnibus-image.md
  • docs/architecture/playback-protocol-v3.md
  • docs/architecture/restart-resilient-playback.md
  • docs/architecture/secret-encryption.md
  • docs/architecture/subtitle-sync.md
  • docs/architecture/transcode-nodes.md
  • docs/architecture/trickplay.md
  • docs/architecture/worker-http-protocol.md
  • docs/playback-api.md
  • docs/transcode-node-api.md
  • docs/update-to-1.0.md
  • go.mod
  • internal/activitylog/middleware.go
  • internal/activitylog/middleware_path_test.go
  • internal/api/handlers/admin_node_commands_test.go
  • internal/api/handlers/admin_node_configuration.go
  • internal/api/handlers/admin_node_configuration_test.go
  • internal/api/handlers/admin_node_drain.go
  • internal/api/handlers/admin_node_drain_test.go
  • internal/api/handlers/admin_node_key.go
  • internal/api/handlers/admin_node_network_access.go
  • internal/api/handlers/admin_node_network_access_test.go
  • internal/api/handlers/admin_node_reload.go
  • internal/api/handlers/admin_node_reload_test.go
  • internal/api/handlers/admin_playback_control_test.go
  • internal/api/handlers/device_sightings_test.go
  • internal/api/handlers/downloads_network_access_test.go
  • internal/api/handlers/downloads_test.go
  • internal/api/handlers/nodes.go
  • internal/api/handlers/nodes_reprobe_test.go
  • internal/api/handlers/nodes_test.go
  • internal/api/handlers/playback.go
  • internal/api/handlers/playback_connection_test.go
  • internal/api/handlers/playback_control_socket_v2_test.go
  • internal/api/handlers/playback_copy_safety_test.go
  • internal/api/handlers/playback_finish_history_test.go
  • internal/api/handlers/playback_lazy_markers_test.go
  • internal/api/handlers/playback_lifecycle_db_test.go
  • internal/api/handlers/playback_lifecycle_test.go
  • internal/api/handlers/playback_probe_test.go
  • internal/api/handlers/playback_profile_refresh_test.go
  • internal/api/handlers/playback_proxy_test.go
  • internal/api/handlers/playback_relay_authority_test.go
  • internal/api/handlers/playback_service_test.go
  • internal/api/handlers/playback_session_missing_test.go
  • internal/api/handlers/playback_session_recipe_test.go
  • internal/api/handlers/playback_test.go
  • internal/api/handlers/playback_transcode_rehome.go
  • internal/api/handlers/playback_transcode_rehome_test.go
  • internal/api/handlers/playback_transcode_serve_reconstruct_test.go
  • internal/api/handlers/playback_transport.go
  • internal/api/handlers/playback_transport_security_test.go
  • internal/api/handlers/playback_v3.go
  • internal/api/handlers/playback_v3_bitrate_policy_test.go
  • internal/api/handlers/playback_v3_capability_retry_test.go
  • internal/api/handlers/playback_v3_commit_order_test.go
  • internal/api/handlers/playback_v3_dead_node_test.go
  • internal/api/handlers/playback_v3_downloaded_subtitle_outage_test.go
  • internal/api/handlers/playback_v3_drain_test.go
  • internal/api/handlers/playback_v3_native_recovery_test.go
  • internal/api/handlers/playback_v3_network_access_test.go
  • internal/api/handlers/playback_v3_node_hwaccel_test.go
  • internal/api/handlers/playback_v3_node_recipe_test.go
  • internal/api/handlers/playback_v3_origins_test.go
  • internal/api/handlers/playback_v3_preflight_verdict_test.go
  • internal/api/handlers/playback_v3_route_nodes_test.go
  • internal/api/handlers/playback_v3_startup_cancel_test.go
  • internal/api/handlers/playback_v3_subtitle_facts_test.go
  • internal/api/handlers/playback_v3_subtitle_rendition_test.go
  • internal/api/handlers/playback_v3_subtitle_route_test.go
  • internal/api/handlers/playback_v3_subtitle_version_test.go
  • internal/api/handlers/playback_v3_test.go
  • internal/api/handlers/playback_v3_tokenless_test.go
  • internal/api/handlers/playback_v3_union_test.go
  • internal/api/handlers/session_ws_pause_state_test.go
  • internal/api/handlers/session_ws_plan_invalidated_test.go
  • internal/api/handlers/stream_copy_safety_test.go
  • internal/api/handlers/system.go
  • internal/api/handlers/system_test.go
  • internal/api/middleware/request_logger.go
  • internal/api/router.go
  • internal/api/subtitle_sync_wiring.go
  • internal/api/testdata/media_routes.txt
  • internal/apiv2/admin_node_commands_test.go
  • internal/apiv2/admin_node_configuration.go
  • internal/apiv2/admin_node_drain.go
  • internal/apiv2/admin_node_key.go
  • internal/apiv2/admin_nodes_read.go
  • internal/apiv2/document.go
  • internal/apiv2/playback_delivery.go
  • internal/apiv2/playback_delivery_test.go
  • internal/apiv2/router.go
  • internal/apiv2/worker_protocols.go
  • internal/apiv2/worker_protocols_test.go
  • internal/apiv2/worker_streaming_test.go
  • internal/cache/redis.go
  • internal/chapterthumbs/remote.go
  • internal/chapterthumbs/remote_signing_test.go
  • internal/chapterthumbs/service.go
  • internal/chapterthumbs/service_test.go
  • internal/config/bootstrap.go
  • internal/config/bootstrap_test.go
  • internal/downloadprepare/transport.go
  • internal/downloadprepare/transport_test.go
  • internal/downloads/artifacts.go
  • internal/downloads/prepare_observer_test.go
  • internal/downloads/remote_preparer.go
  • internal/downloads/remote_preparer_security_test.go
  • internal/downloads/remote_preparer_test.go
  • internal/downloads/service.go
  • internal/downloads/service_remote_test.go
  • internal/downloads/storage_maintenance.go
  • internal/jellycompat/audio_selection_test.go
  • internal/jellycompat/auto_transcode_fallback_test.go
  • internal/jellycompat/handlers_playback.go
  • internal/jellycompat/manifest_tonemap_failover_test.go
  • internal/jellycompat/network_access_test.go
  • internal/jellycompat/playback_contract_test.go
  • internal/jellycompat/playback_finish_test.go
  • internal/jellycompat/playback_report_liveness_test.go
  • internal/jellycompat/relay_authority_test.go
  • internal/jellycompat/remote_relay_transport_test.go
  • internal/jellycompat/remote_tonemap_capability_transport_test.go
  • internal/jellycompat/remote_transcode_reconstruct_test.go
  • internal/jellycompat/router.go
  • internal/jellycompat/routing_policy_test.go
  • internal/jellycompat/server.go
  • internal/jellycompat/streams.go
  • internal/jellycompat/streams_segment_error_test.go
  • internal/jellycompat/streams_test.go
  • internal/jellycompat/tone_map_inventory_test.go
  • internal/jellycompat/transcode_failover.go
  • internal/jellycompat/transcode_failover_test.go
  • internal/logstream/drain.go
  • internal/logthrottle/throttle.go
  • internal/logthrottle/throttle_test.go
  • internal/mediasample/remote.go
  • internal/mediasample/remote_signing_test.go
  • internal/mediasample/request.go
  • internal/nodeauth/nodeauth.go
  • internal/nodeauth/nodeauth_test.go
  • internal/nodeauth/nodeauthtest/nodeauthtest.go
  • internal/nodeauth/nodetocore.go
  • internal/nodeauth/nodetocore_test.go
  • internal/nodeconfig/remote.go
  • internal/nodeconfig/remote_test.go
  • internal/nodeconfig/watcher.go
  • internal/nodecontrol/auth.go
  • internal/nodecontrol/client.go
  • internal/nodecontrol/client_test.go
  • internal/nodecontrol/config_coverage_test.go
  • internal/nodecontrol/fixture_test.go
  • internal/nodecontrol/limit.go
  • internal/nodecontrol/protocol.go
  • internal/nodecontrol/protocol_registry.go
  • internal/nodecontrol/registry_db_test.go
  • internal/nodecontrol/reporter.go
  • internal/nodecontrol/reporter_test.go
  • internal/nodecontrol/resolve.go
  • internal/nodecontrol/resolve_test.go
  • internal/nodecontrol/revoke.go
  • internal/nodecontrol/server.go
  • internal/nodecontrol/server_test.go
  • internal/nodecontrol/sources.go
  • internal/nodecontrol/sources_test.go
  • internal/nodepool/admin_configuration.go
  • internal/nodepool/dial.go
  • internal/nodepool/drain.go
  • internal/nodepool/drain_test.go
  • internal/nodepool/gpuidentity_test.go
  • internal/nodepool/health.go
  • internal/nodepool/health_drift_proxy_test.go
  • internal/nodepool/health_stats_test.go
  • internal/nodepool/health_test.go
  • internal/nodepool/keyregistry.go
  • internal/nodepool/keyregistry_test.go
  • internal/nodepool/network_access_test.go
  • internal/nodepool/nodekey.go
  • internal/nodepool/nodekey_db_test.go
  • internal/nodepool/nodekey_test.go
  • internal/nodepool/nodepooltest/nodepooltest.go
  • internal/nodepool/planner.go
  • internal/nodepool/planner_test.go
  • internal/nodepool/repository.go
  • internal/nodepool/transcode_pool.go
  • internal/nodepool/unreachable_test.go
  • internal/noderecipe/store.go
  • internal/noderouting/resolver_test.go
  • internal/nodesessions/ingest.go
  • internal/nodesessions/local.go
  • internal/nodesource/grant.go
  • internal/nodesource/grant_test.go
  • internal/nodesource/nodesourcetest/nodesourcetest.go
  • internal/nodesource/protocol.go
  • internal/nodesource/source.go
  • internal/nodesource/source_test.go
  • internal/opslog/consumer.go
  • internal/opslog/consumer_db_test.go
  • internal/opslog/consumer_test.go
  • internal/opslog/handler.go
  • internal/opslog/handler_test.go
  • internal/playback/recipecard.go
  • internal/playback/remote_delete_signing_test.go
  • internal/playback/remote_stop_after_failure_test.go
  • internal/playback/remote_stop_recipe_test.go
  • internal/playback/transcode_manager.go
  • internal/proxy/download_test.go
  • internal/proxy/mediagrant_test.go
  • internal/proxy/node_refusal_test.go
  • internal/proxy/router_socket_test.go
  • internal/proxy/segment_completion_test.go
  • internal/proxy/server.go
  • internal/proxy/streamdeny_test.go
  • internal/routeinventory/classify.go
  • internal/scanner/file_repo.go
  • internal/scanner/file_repo_active_file_db_test.go
  • internal/streamtelemetry/node_report.go
  • internal/streamtelemetry/node_report_test.go
  • internal/subtitles/subsync/sampler.go
  • internal/subtitles/subsync/service.go
  • internal/subtitles/subsync/service_test.go
  • internal/transcodenode/auto_transcode_fallback_test.go
  • internal/transcodenode/capability_client.go
  • internal/transcodenode/capability_snapshot_test.go
  • internal/transcodenode/chapter_protocol.go
  • internal/transcodenode/download_prepare_protocol.go
  • internal/transcodenode/drain_test.go
  • internal/transcodenode/encoder_reporting_test.go
  • internal/transcodenode/media_routes_test.go
  • internal/transcodenode/media_sample.go
  • internal/transcodenode/media_sample_test.go
  • internal/transcodenode/node_auth_test.go
  • internal/transcodenode/nodefakes_test.go
  • internal/transcodenode/path_authorizer.go
  • internal/transcodenode/path_authorizer_test.go
  • internal/transcodenode/protocol_registry.go
  • internal/transcodenode/reprobe_test.go
  • internal/transcodenode/required_audio_test.go
  • internal/transcodenode/resolve.go
  • internal/transcodenode/route_inventory_test.go
  • internal/transcodenode/runtime.go
  • internal/transcodenode/server.go
  • internal/transcodenode/server_test.go
  • internal/transcodenode/source_input.go
  • internal/transcodenode/start_protocol.go
  • internal/transcodenode/start_protocol_test.go
  • internal/transcodenode/stop_protocol.go
  • internal/transcodenode/streamdeny_test.go
  • internal/transcodenode/streaming_protocol.go
  • internal/transcodenode/streamtelemetry.go
  • internal/transcodenode/streamtelemetry_test.go
  • internal/transcodenode/theme_audio_test.go
  • internal/transcodenode/thin_node_test.go
  • internal/transcodenode/trickplay.go
  • internal/transcodenode/trickplay_test.go
  • internal/transcodeproxy/completion.go
  • internal/transcodeproxy/completion_test.go
  • internal/transcodeproxy/refusal.go
  • internal/trickplay/remote.go
  • internal/trickplay/remote_capacity_test.go
  • internal/trickplay/remote_fallback_test.go
  • internal/trickplay/remote_test.go
  • migrations/sql/20261114234057_add_stream_node_key.sql
  • omnibus/rootfs/etc/s6-overlay/scripts/init-config
  • omnibus/rootfs/etc/silo-omnibus/migrate-compose-stack
  • scripts/ci/db-contracts.txt
  • web/src/api/types.ts
  • web/src/api/v2/operations.ts
  • web/src/api/v2/schema.ts
  • web/src/hooks/queries/admin/nodes.ts
  • web/src/hooks/queries/keys.ts
  • web/src/pages/AdminNodes.test.tsx
  • web/src/pages/AdminNodes.tsx
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@silo-triage silo-triage Bot added the size/XXXL 3000+ added + deleted lines (all files); change volume, not priority. label Nov 15, 2026
@silo-kody

silo-kody Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@Quick104
Quick104 marked this pull request as ready for review November 15, 2026 16:23
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T22:28:07.204557Z 472809a New commits
🔒 Security Review ✅ Completed 2026-11-15T22:31:48.644054Z 472809a New commits

Security findings

Advisory findings (3)

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Comment thread docker-compose.yml Resolved
Comment thread internal/logthrottle/throttle.go Resolved
Comment thread internal/nodecontrol/resolve.go Resolved
Comment thread internal/nodecontrol/sources.go Resolved
Comment thread internal/trickplay/remote.go Resolved
Quick104 and others added 2 commits November 15, 2026 12:01
- A source grant check that fails for a reason other than a missing file
  (an I/O error, a stale network mount) now answers 503, which the node
  retries. It answered 410, which ends the job, so a transient stat error
  on the API server stopped a transcode of an unchanged file. Minting a
  grant classifies the error the same way.
- A full log throttle searches for expired keys at most once per interval.
  A flood of unknown node ids paid for a pass over all 4,096 keys on every
  refused request.
- The resume primer test from main set no node keys, so its proxy route
  was never taken and it passed only where a local FFmpeg was installed.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@silo-kody

silo-kody Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ Codex Security Review · Automatically triggered

Here are some automated security review suggestions for this pull request.

Reviewed commit: 34dfeb1436

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment thread internal/nodecontrol/server.go Resolved
Quick104 and others added 2 commits November 15, 2026 13:19
…te-transcode-nodes

# Conflicts:
#	.silo-translations
#	web/src/locales/keys.ts
A node's request budget admits twenty log batches a second, and one batch
may be 1 MiB, so a node key could write about 20 MiB a second into the
operational log. Log batches now also spend a per-node byte budget on each
API server: 128 KiB a second with bursts of 4 MiB. A node past it gets 429,
which it already retries.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@silo-kody

silo-kody Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

Comment thread internal/nodecontrol/server.go Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ Codex Security Review · Automatically triggered

Here are some automated security review suggestions for this pull request.

Reviewed commit: 6ad9f778c6

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment thread internal/api/router.go
deps.wireNodeSources(&nodeControlOptions)
nodeControl := nodecontrol.NewServer(nodeControlOptions)
r.Route("/api/internal/nodes/self", func(r chi.Router) {
r.Use(nodecontrol.RequireNode(deps.NodeKeyRegistry))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ Codex Security Review · Automatically triggered

P2 Badge Security: Rate-limit signed node bodies before buffering them

A compromised transcode node, or anyone holding its node key, can bypass the intended 20/200 req/s budgets at the expensive stage. RequireNode runs before both limiters, and VerifyFromNode reads, allocates, and hashes up to 1 MiB before invoking the next middleware. An attacker can replay one valid signed 1 MiB request concurrently; excess requests are rejected only after every body is consumed, allowing API memory, CPU, and network exhaustion. Apply per-node byte/concurrency limits before buffering the body.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The body is not read for an unauthenticated request. Verification checks the MAC over the method, path, query, timestamp and claimed body hash first, then the 30-second window, and only then reads the body to compare its hash. Reaching the read therefore takes a valid signature from the node's key, and each such request is held to the 1 MiB bound. A holder of the key replaying one signed request can make the server read and hash those bodies before the request budget refuses them. Moving the budget ahead of the read means putting each route's budget inside the authentication step; I'm leaving that decision to the maintainer and have not changed it.

🤖 Claude Code (claude-fable-5-2)

A log line with a remote_addr attribute put the address and its port into
client_ip, an inet column, and the insert of the whole batch failed. A
refused node request logs one, so an update with transcode nodes still on
the old version lost unrelated log lines.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@silo-kody

silo-kody Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ Codex Security Review · Automatically triggered

Here are some automated security review suggestions for this pull request.

Reviewed commit: 472809a4f7

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment on lines +93 to +96
if err != nil || (parsed.Scheme != "http" && parsed.Scheme != "https") || parsed.Host == "" {
return transcodeNodeEnv{}, fmt.Errorf("%s must be an absolute http or https URL", envCoreURL)
}
env.insecureCoreURL = parsed.Scheme == "http" && !loopbackHost(parsed.Hostname())

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ Codex Security Review · Automatically triggered

P2 Badge Security: Authenticate node-control responses

When a transcode node uses a non-loopback http:// SILO_CORE_URL and an attacker can modify that link, this branch only warns and still trusts unsigned response bodies. The request HMAC does not authenticate responses. An attacker can replace the initial config with playback.transcode_dir: "/"; NewServer snapshots it and the startup orphan sweep recursively removes writable child directories older than 24 hours. The shipped read-only media mount and service UID limit damage, but writable node data remains exposed. Require HTTPS off-loopback or MAC responses, and reject unsafe cleanup roots.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the trust boundary the design states: the node takes its FFmpeg path, directories and input paths from the server's answers, so the link to SILO_CORE_URL must be a trusted network or HTTPS, and the node warns at startup for plain HTTP to another host. The pull request's Risks section and the update guide say so. Refusing a few cleanup roots would not close it, since an attacker on that link controls every path the node uses. Signing the server's answers with the node key would, and it is a reasonable follow-up; it is not part of this change.

🤖 Claude Code (claude-fable-5-2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request impact: security Auth, privacy, or permission boundary priority: P2 Limited scope, workaround exists, or polish size/XXXL 3000+ added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant