media: cover Vega with both reversible compatibility fixes #388

Merged
nimmo merged 2 commits from fix/handbrake-vega-scope into main 2026-10-21 17:03:52 +01:00
Owner

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.

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.
Move the existing overlay and patch into a reusable module imported by Lyra and Vega. Bind the full shared workaround to an updated lifecycle reversal requiring both hosts to recover. Vega selects the same tested HandBrake derivation. Refs #381.
media: share pyopenjtalk test compatibility with Vega
All checks were successful
Build and Push Attic Cache / test (pull_request) Successful in 1m32s
Build and Push Attic Cache / build (pull_request) Has been skipped
Build and Push Attic Cache / pin-lifecycle (pull_request) Has been skipped
Build and Push Attic Cache / remediate (pull_request) Has been skipped
Build and Push Attic Cache / notify-remediation (pull_request) Has been skipped
Build and Push Attic Cache / record-remediation-notify-failure (pull_request) Has been skipped
AI pull-request review / review (pull_request) Successful in 25m38s
bd140309d8
Vega SillyTavern also depends on Piper, so import the existing test-only compatibility fix there as well. Move the module and patch into reusable services and bind lifecycle removal to successful Lyra and Vega retests. Refs #386.
clankbot left a comment

Automated code review

Reviewed commit: bd140309d84c7c6fdad99bef449e830da3cc1ac0

Verdict: 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 (lyra ab58b06, vega 276be90, README f9a5da8) 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

  • HandBrake pin reverse patch is bound to intermediate blobs and records a stale line offset for hosts/vega/default.nix (remediation/pins/2a8e67ef290a3131e1e271f5f6d8b30ba07a2db8054b4a43df9f7299be10f100.remove.patch:34; medium confidence)
    The stored reverse patch's a side (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: README index 8217b6e..80ed11f, lyra index a2fda4a..1918fee, vega index 994c1d7..ef6e2af, whereas the PR diff shows head blobs README f9a5da8, lyra ab58b06, vega 276be90. 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 --check normally 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, lyra ab58b06, vega 276be90) 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

  • No configured deterministic checks.

Questions

  • Was 2a8e67ef...remove.patch regenerated against the final head commit, or only against the intermediate commit that added the Vega handbrake-ffmpeg-compat import before the pyopenjtalk import?
  • Which Vega path pulls the nixpkgs handbrake derivation 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

  • No Nix or Git tooling was available in the review container, so nix flake check, host builds and git apply --reverse --check could not be run; the PR's validation claims (complete Lyra and Vega builds, targeted unit builds, both removal orders) were taken as stated.
  • The sha256 bindings in both pin JSON records (modelPatch.sha256 and removalPatch.sha256) could not be recomputed against the stored .remove.patch files, so the metadata-to-file binding enforced by scripts/nixos-pin-lifecycle.py:251 is unverified.
  • Closure membership of handbrake and pyopenjtalk-plus in Vega's evaluated package set could not be evaluated; both modules are overlays that are inert if the package is not in the closure.
  • Run #1394, the rejected nixpkgs revision 5adc50831c259f87faeb09ddf930d43597197473, and tracking issues #381/#386 were not supplied and could not be inspected.
  • The supplied diff truncates the 823-line HandBrake patch body, so its content beyond the shown hunks was not reviewed; the patch files were moved with similarity index 100% (content unchanged).

Diff coverage

  • README.md: reviewed — included in a context-limited batch
  • hosts/lyra/default.nix: reviewed — included in a context-limited batch
  • hosts/vega/default.nix: reviewed — included in a context-limited batch
  • modules/services/handbrake-ffmpeg-compat.nix: reviewed — included in a context-limited batch
  • modules/services/patches/handbrake-pgs-ffmpeg-8.1.3.patch: reviewed — included in a context-limited batch
  • modules/services/patches/pyopenjtalk-cython-typeerror.patch: reviewed — included in a context-limited batch
  • modules/services/pyopenjtalk-test-compat.nix: reviewed — included in a context-limited batch
  • remediation/pins/1aaa1d2d488c80d400d38c3c9b73632ebe03bd61a30484a4a0284f7307acae08.json: reviewed — included in a context-limited batch
  • remediation/pins/1aaa1d2d488c80d400d38c3c9b73632ebe03bd61a30484a4a0284f7307acae08.remove.patch: reviewed — included in a context-limited batch
  • remediation/pins/2a8e67ef290a3131e1e271f5f6d8b30ba07a2db8054b4a43df9f7299be10f100.json: reviewed — included in a context-limited batch
  • remediation/pins/2a8e67ef290a3131e1e271f5f6d8b30ba07a2db8054b4a43df9f7299be10f100.remove.patch: reviewed — included in a context-limited batch
Review metadata
  • Reviewer: forgejo-ai-review v1
  • Model: strata/strata
  • Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, docs/auto-update-remediation.md, docs/hermes-fleet-ssh.md, docs/nova-remote-builder.md, README.md
  • Commits considered: 2
  • Previous automated review: none found
  • Findings: 1
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `bd140309d84c7c6fdad99bef449e830da3cc1ac0` ## Verdict: 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 (lyra ab58b06, vega 276be90, README f9a5da8) 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 - **HandBrake pin reverse patch is bound to intermediate blobs and records a stale line offset for hosts/vega/default.nix** (remediation/pins/2a8e67ef290a3131e1e271f5f6d8b30ba07a2db8054b4a43df9f7299be10f100.remove.patch:34; medium confidence) The stored reverse patch's `a` side (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: README `index 8217b6e..80ed11f`, lyra `index a2fda4a..1918fee`, vega `index 994c1d7..ef6e2af`, whereas the PR diff shows head blobs README f9a5da8, lyra ab58b06, vega 276be90. 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 --check` normally 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, lyra ab58b06, vega 276be90) 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 - No configured deterministic checks. ### Questions - Was 2a8e67ef...remove.patch regenerated against the final head commit, or only against the intermediate commit that added the Vega handbrake-ffmpeg-compat import before the pyopenjtalk import? - Which Vega path pulls the nixpkgs `handbrake` derivation 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 - No Nix or Git tooling was available in the review container, so `nix flake check`, host builds and `git apply --reverse --check` could not be run; the PR's validation claims (complete Lyra and Vega builds, targeted unit builds, both removal orders) were taken as stated. - The sha256 bindings in both pin JSON records (modelPatch.sha256 and removalPatch.sha256) could not be recomputed against the stored .remove.patch files, so the metadata-to-file binding enforced by scripts/nixos-pin-lifecycle.py:251 is unverified. - Closure membership of `handbrake` and `pyopenjtalk-plus` in Vega's evaluated package set could not be evaluated; both modules are overlays that are inert if the package is not in the closure. - Run #1394, the rejected nixpkgs revision 5adc50831c259f87faeb09ddf930d43597197473, and tracking issues #381/#386 were not supplied and could not be inspected. - The supplied diff truncates the 823-line HandBrake patch body, so its content beyond the shown hunks was not reviewed; the patch files were moved with similarity index 100% (content unchanged). ### Diff coverage - `README.md`: **reviewed** — included in a context-limited batch - `hosts/lyra/default.nix`: **reviewed** — included in a context-limited batch - `hosts/vega/default.nix`: **reviewed** — included in a context-limited batch - `modules/services/handbrake-ffmpeg-compat.nix`: **reviewed** — included in a context-limited batch - `modules/services/patches/handbrake-pgs-ffmpeg-8.1.3.patch`: **reviewed** — included in a context-limited batch - `modules/services/patches/pyopenjtalk-cython-typeerror.patch`: **reviewed** — included in a context-limited batch - `modules/services/pyopenjtalk-test-compat.nix`: **reviewed** — included in a context-limited batch - `remediation/pins/1aaa1d2d488c80d400d38c3c9b73632ebe03bd61a30484a4a0284f7307acae08.json`: **reviewed** — included in a context-limited batch - `remediation/pins/1aaa1d2d488c80d400d38c3c9b73632ebe03bd61a30484a4a0284f7307acae08.remove.patch`: **reviewed** — included in a context-limited batch - `remediation/pins/2a8e67ef290a3131e1e271f5f6d8b30ba07a2db8054b4a43df9f7299be10f100.json`: **reviewed** — included in a context-limited batch - `remediation/pins/2a8e67ef290a3131e1e271f5f6d8b30ba07a2db8054b4a43df9f7299be10f100.remove.patch`: **reviewed** — included in a context-limited batch <details><summary>Review metadata</summary> - Reviewer: forgejo-ai-review v1 - Model: strata/strata - Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, docs/auto-update-remediation.md, docs/hermes-fleet-ssh.md, docs/nova-remote-builder.md, README.md - Commits considered: 2 - Previous automated review: none found - Findings: 1 </details>
Author
Owner

Current-head automated review bd140309d8 is 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.

Current-head automated review bd140309d84c7c6fdad99bef449e830da3cc1ac0 is 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.
nimmo merged commit b4f8f82ce0 into main 2026-10-21 17:03:52 +01:00
nimmo deleted branch fix/handbrake-vega-scope 2026-10-21 17:03:53 +01:00
Sign in to join this conversation.
No reviewers
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nimmo/nixos-config!388
No description provided.