Repository navigation
Conversation
A Mac transcode node started with SILO_NODE_HW_ACCEL=videotoolbox refused to start, and the node editor offered no VideoToolbox choice, although the cluster-wide playback.hw_accel accepts it. Allow videotoolbox in the per-node override (validator, registration enum, stream_nodes check constraint) and the editor, and hide the render-device field for a node that runs VideoToolbox. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 10 minutes. View limit details
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
| // VideoToolbox takes no device, so its control is hidden. The value stays in | ||
| // state and is saved as it was: hiding it clears nothing. | ||
| const showDeviceOverride = !nodeUsesVideoToolbox(node, hwAccelOverride, clusterHWAccel); |
There was a problem hiding this comment.
Selecting VideoToolbox silently clears an NVENC device override
Saving after switching from NVENC to VideoToolbox silently loses the hidden CUDA device override. Update selectHWAccelOverride to preserve the device when transitioning to or from VideoToolbox.
Prompt for LLM
File web/src/pages/AdminNodes.tsx, lines 1059-1061:
Selecting VideoToolbox silently clears an NVENC device override
Switching a node from NVENC to VideoToolbox clears its existing CUDA device override through `selectHWAccelOverride`, so saving the form silently loses the setting even though the hidden field is supposed to be preserved. Exclude transitions to and from VideoToolbox from device-syntax clearing so that the saved device remains available when switching back.
Talk to Kody by mentioning @kody
Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.
There was a problem hiding this comment.
Leaving this as it is. Moving from NVENC to VideoToolbox changes the device syntax, the same as moving from NVENC to QSV, which already clears the CUDA device. A VideoToolbox node takes no device, so saving null is right for that node. If the CUDA index were kept, it would carry into the next backend picked after VideoToolbox, such as VAAPI, where it means nothing. The comment on showDeviceOverride covers hiding the field without changing the selection, as for a Mac on Auto, and that clears nothing.
There was a problem hiding this comment.
Agreed. Clearing the CUDA device override when switching from NVENC to VideoToolbox is consistent with the existing behavior for backend changes and avoids carrying an incompatible value into a later selection.
The showDeviceOverride comment describes a separate case: hiding the field without changing the selection preserves its value. I withdraw the suggestion; no change is needed.
Quick104
left a comment
There was a problem hiding this comment.
Adversarial review (claude-opus-5-5, reviewed 58ae25f)
I checked the override end to end: the validator and hwAccelOverrideValues, the Registration enum and the OpenAPI schema it generates, the new Goose migration against the original inline CHECK (Postgres names it stream_nodes_hw_accel_override_check, so the DROP matches), the down step against env_managed, every EffectiveHWAccel caller (native playback, rehome, downloads, jellycompat, nodecontrol), node declaration from SILO_NODE_HW_ACCEL, and the editor's nodeBackend refactor. The backend side holds up. EffectiveHWAccel passes the override through verbatim, and the cluster setting already accepts videotoolbox, so every dispatch path already handled the value. The nodeUsesCUDADevices refactor keeps its earlier behaviour, and hwDeviceSyntaxChanges still only fires on the CUDA/render-path boundary. Rolling upgrade: until every API replica runs this build, a replica on the old build rejects a node that declares videotoolbox and rejects a full-form save that restates it. The new code has to deploy before anyone uses the value, which is the usual order and needs no fix.
F1 (should): stray SwiftPM build cache committed. Inline below.
F2 (nit, pre-existing, outside the diff): docs/admin-api.md still says resolved is never videotoolbox. The hardware report table gives resolved as nvenc, qsv, vaapi, or none, and detected_backends[].backend as nvenc, qsv, or vaapi. On macOS, DetectHWAccelWithFFmpegContextResult in internal/playback/gpudetect.go sets resolved to videotoolbox and adds a videotoolbox detected entry. The new nodeUsesVideoToolbox depends on exactly that value when a Mac node inherits an auto cluster. Since this PR already updates the override lists in the same doc, add videotoolbox to both tables there too.
Score: 8/10 as it stands. Once F1 is fixed it is a small, correct widening of an enum that the cluster setting already supports.
AI disclosure: written by Claude Code (model claude-opus-5-5) as an adversarial review of the pinned head 58ae25f. It read the diff and the surrounding source at that commit. It ran no builds or tests and did not read the PR description's evidence, comments, or other reviews. A person directed the review.
Drop two SwiftPM cache files committed by mistake. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s update Taken after the UPDATE, the ALTERs' table lock could deadlock with a node's health write waiting on an updated row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Problem
Related issue: #1175
Validation tasks: unblocks #1175 C2; changes #1178 C1
Other clients: N/A (web admin and server only; the native apps have no node editor)
A Mac transcode node can't be pinned to VideoToolbox. Starting one with
SILO_NODE_HW_ACCEL=videotoolboxstops it at startup withSILO_NODE_HW_ACCEL hw_accel_override must be one of auto, qsv, vaapi, nvenc, none, and the Hardware Acceleration list in the node editor has no VideoToolbox entry. The cluster-wideplayback.hw_accelsetting already acceptsvideotoolbox, so the per-node override was the only place that refused it. On a Mac node the editor also asks for Linux render-device paths (/dev/dri/...), which mean nothing there.autoalready resolves VideoToolbox on a Mac, so this mostly matters in a cluster whose cluster-wide setting names another backend, and for the forced mode #1175 C2 asks to test on a node.Approach
videotoolboxjoins the per-node override everywhere the value is checked:hwAccelOverrideValues, the node registration enum (regenerated intocontracts/api/v2/openapi.json), and thestream_nodes.hw_accel_overridecheck constraint, through a new migration. Its down step returns a VideoToolbox pin to inheriting and drops the field's environment lock. The node editor lists VideoToolbox and hides the GPU devices field when the node will run VideoToolbox: pinned, inherited from the cluster, or resolved by the node itself under Auto. The existing CUDA-device check and the new one share one helper that works out which backend the node runs.docs/admin-api.mdlists the new value, andvideotoolboxas a resolved and detected backend, which the macOS probe already reported.Validation
SILO_NODE_HW_ACCEL=videotoolboxregisters, and the server records the field as declared by the node.h264_videotoolboxandscale_vtwithin a minute, with no node restart. Re-probe hardware updates the node's reported backend.TestNodeDeclarationsLockFieldsDBfails on the unmigrated database (violates check constraint "stream_nodes_hw_accel_override_check") and passes after. Thenodedeclareenv test fails on the base with the startup error above and passes after.make lint-changed,make verify-apiv2-openapi,verify-apiv2-web-types,verify-apiv2-contract,migrate-validateandverify-migrationspass. Web lint, typecheck and thesrc/pagestests pass.make verify-route-inventorycan't type-check the Linux cgo packages on macOS; CI runs it.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/node-videotoolbox-override/
Surface and build: web admin, desktop and phone width; before on published build 2673 · 262ac3d, after on a local image of this branch.
Risks
videotoolboxuntil it updates, and a node that declaresSILO_NODE_HW_ACCEL=videotoolboxstops at startup if such a replica answers its registration. Upgrade every API server before setting it on a node, and remove it from nodes before rolling the servers back.Follow-ups
Checklist
Council review
Plan round: Sol (gpt-6.2-sol, xhigh) and Opus (claude-opus-5-5, high). Gemini (gemini-4-neon) was unavailable: this session doesn't run in full access.
Rounds: 1, last reviewed 58ae25f; fixes in 52dd39f
videotoolboxstops at startup against an old API replica (upgrade order now under Risks); the SwiftPM cache files (removed). Dismissed: switching from NVENC to VideoToolbox clears a CUDA device, as any change of device syntax already does; the editor reads a stale resolved backend under Auto only after a node was pinned to a backend its host can't run, as it already does for NVENC.docs/admin-api.mddidn't listvideotoolboxas a resolved or detected backend (fixed)Visual review: 1 round, captures from a local image at 79209d69
Answered: the Source access field looks different between the captures because the two nodes were set up differently (environment-declared before, Admin > Nodes after); the Save button showing under the open list is how the list component already draws.
AI Disclosure
🤖 Generated with Claude Code
Note
Allow transcode nodes to be pinned to
videotoolboxaccelerationvideotoolboxas an acceptedhw_accel_overridevalue across the stack: OpenAPI contract,nodepoolpermitted values, a DB check-constraint migration, and admin UI options.nodeBackendhelper in adminNodesPresentation.ts resolves the effective backend (explicit override, inherited cluster backend, or node-reported value), andnodeUsesVideoToolboxhides the device-override control in the node form when it resolves to VideoToolbox.videotoolboxoverrides (settinghw_accel_overrideto NULL and removing it fromenv_managed). Also, the admin form hides but does not clear the device-override value when VideoToolbox is selected.Macroscope summarized 52dd39f.