media: cover Vega with both reversible compatibility fixes #388
No reviewers
Labels
No labels
area:authentication
area:flake-utilities
area:performance
area:tbd
host:chaos
host:cosmos
host:electra
host:fleet
host:lena
host:lyra
host:mass-storage
host:media1
host:nimmog-de
host:nova
host:pangolin
host:pangolin-vps
host:phone
host:router
host:vega
investigation
phase:cutover
phase:deploy
phase:mcp
phase:module
phase:packaging
phase:prep
phase:validation
priority:high
priority:medium
project:attic-postgres-lyra-rollout
project:auto-update-reliability
project:auto-update-remediation
project:declarative-purity-cleanup
project:external-review
project:fleet-boundary-cleanup
project:host-facts-refactor
project:lyra-nixos-deploy
project:lyra-service-stack-migration
project:nebula-mesh-network
project:nix-idioms-hygiene
project:nixos-build-deployment-pipeline
project:security-hardening
project:service-stack-migration
project:vega-sillytavern-cutover
project:wiki-rebuild
repo:numtide/flake-utils
repo:numtide/nix-auth
repo:numtide/nixos-passthru-cache
repo:numtide/nix-relay
service:auto-update
service:gitlab
service:hermes
service:mem0
service:nix
service:sillytavern
service:slskd
service:synthseek
service:tdarr
No milestone
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
nimmo/nixos-config!388
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/handbrake-vega-scope"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Run #1394 reached the HandBrake/FFmpeg PGS patch failure on Vega's Tdarr node because the existing workaround was imported only by Lyra. Broader Vega validation also confirmed its SillyTavern service needs the existing pyopenjtalk/Piper test compatibility fix.
Move both unchanged modules and patches into reusable service modules imported by Lyra and Vega. Update each independent lifecycle record and exact SHA-bound reverse patch to cover both hosts. Removal requires both hosts and flake checks to pass without the respective workaround; the two reversals work in either order.
Validation passed against rejected nixpkgs 5adc50831c259f87faeb09ddf930d43597197473: complete Lyra and Vega toplevel builds, candidate flake checks, and targeted Vega HandBrake, pyopenjtalk, Piper, Wyoming Piper and Tdarr unit builds. Current-input flake checks, lifecycle regressions, metadata bindings and both removal orders also passed. Vega selects the same previously tested HandBrake and pyopenjtalk outputs. No activation or flake.lock change.
Refs #381. Refs #386. Keep tracking issues open until reviewed upstream recovery and workaround removal.
Automated code review
Reviewed commit:
bd140309d84c7c6fdad99bef449e830da3cc1ac0Verdict: Ready to merge
No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory.
Overall assessment
The change relocates the two compatibility modules and their patch files from hosts/lyra/ into modules/services/ (and modules/services/patches/) and imports both modules in hosts/lyra/default.nix and hosts/vega/default.nix. Verified in the checked-out tree: modules/services/handbrake-ffmpeg-compat.nix:19 and modules/services/pyopenjtalk-test-compat.nix:11 reference ./patches/..., which resolves to modules/services/patches/, and both patch files exist there; no stale hosts/lyra/... references to the moved files remain anywhere in the tree; hosts/lyra/ contains only default.nix, disko.nix and hardware-configuration.nix. Both pin JSONs were widened consistently: affectedHosts is ["lyra","vega"] (satisfies scripts/nixos-pin-lifecycle.py:199
hosts != sorted(set(hosts))), modelPatch.paths are sorted and re-pointed at the new locations (satisfies :225), and rationale/removalCondition state the shared two-host scope. The pyopenjtalk pin's reverse patch (1aaa1d2d...remove.patch) is bound to the head blobs (lyraab58b06, vega276be90, READMEf9a5da8) and its hunks match the checked-out files exactly (lyra default.nix:33 pyopenjtalk import, vega default.nix:39). One inconsistency exists in the HandBrake pin's reverse patch, reported below.Blocking findings
None.
Important findings
None.
Suggestions
The stored reverse patch's
aside (the state git apply --reverse starts from, per scripts/nixos-pin-lifecycle.py:379/380 and :486/487) is named by blob hashes that are not the head blobs: READMEindex 8217b6e..80ed11f, lyraindex a2fda4a..1918fee, vegaindex 994c1d7..ef6e2af, whereas the PR diff shows head blobs READMEf9a5da8, lyraab58b06, vega276be90. Concretely, the vega hunk at line 34 reads@@ -47,6 +47,7 @@and expects the context line# Shared NAS application data and Tdarr cache for the native Tdarr node.at line 47, but in the checked-out head file that comment is at hosts/vega/default.nix:48 (media-library.nix is at 47, appdata.nix at 49, tdarr.nix at 50, handbrake-ffmpeg-compat.nix at 51) because the pyopenjtalk import added at hosts/vega/default.nix:39 shifts everything below it. The pyopenjtalk pin's reverse patch (1aaa1d2d...remove.patch) is instead bound to the head blobs and its hunks match the head files exactly.Impact: The HandBrake removal patch was generated against an intermediate tree (Vega import added without the pyopenjtalk import), not the final head.
git apply --reverse --checknormally recovers via its context shift search, so this is not proven to break the lifecycle job, but the recorded patch is not byte-consistent with the head tree and its recorded blob indices no longer identify the tree it was validated against; a stricter apply mode or offset-sensitive tooling would reject it. The pin's modelPatch.sha256/removalPatch.sha256 bindings (enforced at scripts/nixos-pin-lifecycle.py:251) would also change if the patch is regenerated.Suggested fix: Regenerate 2a8e67ef...remove.patch against the final head so its index lines name the head blobs (README
f9a5da8, lyraab58b06, vega276be90) and the vega hunk reads@@ -48,6 +48,7 @@, then update removalPatch.sha256 and modelPatch.sha256 in the pin JSON to the regenerated file's sha256, since scripts/nixos-pin-lifecycle.py compares sha256_file(removal_path) against removal["sha256"].Tests and validation
Questions
handbrakederivation into the toplevel closure? No pkgs.handbrake reference appears in hosts/vega/default.nix or the supplied modules, so the effect of importing handbrake-ffmpeg-compat.nix on Vega is not visible in the supplied tree (the pin rationale cites run #1394, which was not supplied).Review limitations
nix flake check, host builds andgit apply --reverse --checkcould not be run; the PR's validation claims (complete Lyra and Vega builds, targeted unit builds, both removal orders) were taken as stated.handbrakeandpyopenjtalk-plusin Vega's evaluated package set could not be evaluated; both modules are overlays that are inert if the package is not in the closure.Diff coverage
README.md: reviewed — included in a context-limited batchhosts/lyra/default.nix: reviewed — included in a context-limited batchhosts/vega/default.nix: reviewed — included in a context-limited batchmodules/services/handbrake-ffmpeg-compat.nix: reviewed — included in a context-limited batchmodules/services/patches/handbrake-pgs-ffmpeg-8.1.3.patch: reviewed — included in a context-limited batchmodules/services/patches/pyopenjtalk-cython-typeerror.patch: reviewed — included in a context-limited batchmodules/services/pyopenjtalk-test-compat.nix: reviewed — included in a context-limited batchremediation/pins/1aaa1d2d488c80d400d38c3c9b73632ebe03bd61a30484a4a0284f7307acae08.json: reviewed — included in a context-limited batchremediation/pins/1aaa1d2d488c80d400d38c3c9b73632ebe03bd61a30484a4a0284f7307acae08.remove.patch: reviewed — included in a context-limited batchremediation/pins/2a8e67ef290a3131e1e271f5f6d8b30ba07a2db8054b4a43df9f7299be10f100.json: reviewed — included in a context-limited batchremediation/pins/2a8e67ef290a3131e1e271f5f6d8b30ba07a2db8054b4a43df9f7299be10f100.remove.patch: reviewed — included in a context-limited batchReview metadata
Current-head automated review
bd140309d8is Ready to merge; CI is successful. Assessed its advisory about intermediate blob IDs/line offsets: the lifecycle contract uses ordinary git apply --reverse --check/apply, without --index or --3way, and validates the stored patch's SHA-256 rather than requiring blob-index identity with the changing checkout. Context-based offsets are expected as independent workarounds are added or removed. Regenerating solely for final-head line numbers would not eliminate offsets when the other workaround is removed first.Freshly revalidated both records against the exact current head: both stored model/removal hashes match the patch bytes, and both reverse checks succeed. Both complete removal orders were also exercised in a disposable checkout, including removal of both host imports and shared files. No code change is warranted for a hypothetical stricter apply mode that the controller does not use.
Vega consumes HandBrake through its native Tdarr node, confirmed by run #1394's dependency chain and by the successful targeted tdarr-node-vega.service unit and full Vega candidate build after the shared import. Full Lyra/Vega builds, candidate/current flake checks, package tests and lifecycle regressions passed. Proceeding with the user-authorized merge and freshness-overridden full update; #381 and #386 remain open for eventual workaround removal.