lyra: unblock flake updates with reversible media compatibility fixes #387

Merged
nimmo merged 2 commits from fix/handbrake-ffmpeg-pgs into main 2026-10-21 16:06:22 +01:00
Owner

The candidate nixpkgs update fails Lyra first on HandBrake's PGS subtitle patch against FFmpeg 8.1.3, then on pyopenjtalk-plus's Cython-generated TypeError wording. Add two Lyra-scoped workarounds: refresh HandBrake's private FFmpeg patch while preserving palette safety, and accept both known TypeError messages in the existing invalid-input/recovery test.

Each workaround has an independent SHA-bound lifecycle record and reverse patch. Scheduled retests remove it in a disposable checkout, update nixpkgs, build Lyra and run flake checks, then propose a review-only removal MR on recovery. Tracking issues remain open through eventual removal.

Validation against rejected nixpkgs 5adc50831c259f87faeb09ddf930d43597197473:

  • HandBrake/private FFmpeg builds, basic conversion, and five PGS normal/cropping/error-path checks passed.
  • pyopenjtalk-plus: 1679 passed, 16 skipped; Piper: 45 passed, 1 skipped, 1 deselected; Wyoming Piper: 47 passed. Existing test selections unchanged.
  • Flake checks passed on accepted and candidate inputs; lifecycle regressions and both possible independent removal orders passed.
  • Full Lyra closure, Piper and Wyoming Piper builds passed on Nova, followed by a successful candidate flake check (exit 0). No activation occurred. flake.lock is unchanged.

Refs #381. Refs #386.

The candidate nixpkgs update fails Lyra first on HandBrake's PGS subtitle patch against FFmpeg 8.1.3, then on pyopenjtalk-plus's Cython-generated TypeError wording. Add two Lyra-scoped workarounds: refresh HandBrake's private FFmpeg patch while preserving palette safety, and accept both known TypeError messages in the existing invalid-input/recovery test. Each workaround has an independent SHA-bound lifecycle record and reverse patch. Scheduled retests remove it in a disposable checkout, update nixpkgs, build Lyra and run flake checks, then propose a review-only removal MR on recovery. Tracking issues remain open through eventual removal. Validation against rejected nixpkgs 5adc50831c259f87faeb09ddf930d43597197473: - HandBrake/private FFmpeg builds, basic conversion, and five PGS normal/cropping/error-path checks passed. - pyopenjtalk-plus: 1679 passed, 16 skipped; Piper: 45 passed, 1 skipped, 1 deselected; Wyoming Piper: 47 passed. Existing test selections unchanged. - Flake checks passed on accepted and candidate inputs; lifecycle regressions and both possible independent removal orders passed. - Full Lyra closure, Piper and Wyoming Piper builds passed on Nova, followed by a successful candidate flake check (exit 0). No activation occurred. flake.lock is unchanged. Refs #381. Refs #386.
Keep HandBrake private FFmpeg on 8.1.3 while rebasing its subtitle graphic-plane patch and preserving early palette allocation. Bind the complete workaround to a verified reverse patch so pin-lifecycle can propose removal after upstream recovery. Refs #381.
lyra: tolerate Cython TypeError wording in pyopenjtalk tests
All checks were successful
Build and Push Attic Cache / test (pull_request) Successful in 2m18s
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 30m1s
1e4d4f75fa
Keep the invalid-input and recovery regression enabled, accepting both known TypeError messages. Add a separate SHA-bound lifecycle reversal linked to #386 so upstream recovery can remove this workaround independently of #381. Validated package tests, Piper/Wyoming builds, flake checks and lifecycle regressions.
Author
Owner

The operator explicitly requested merging now while the automated review is still pending. CI test, accepted/candidate flake checks, full Lyra candidate closure, package/runtime tests, and independent lifecycle reversals have passed as recorded above. Proceeding with the exact validated head 1e4d4f75fa. Issues #381 and #386 remain open for future reviewed removal of their temporary workarounds.

The operator explicitly requested merging now while the automated review is still pending. CI test, accepted/candidate flake checks, full Lyra candidate closure, package/runtime tests, and independent lifecycle reversals have passed as recorded above. Proceeding with the exact validated head 1e4d4f75fa879854dbc9dc2e9cd6c4be85fccd0c. Issues #381 and #386 remain open for future reviewed removal of their temporary workarounds.
nimmo merged commit 77766f1129 into main 2026-10-21 16:06:22 +01:00
nimmo deleted branch fix/handbrake-ffmpeg-pgs 2026-10-21 16:06:22 +01:00
clankbot left a comment

Automated code review

Reviewed commit: 1e4d4f75fa879854dbc9dc2e9cd6c4be85fccd0c

Verdict: Ready to merge

No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory.

Overall assessment

The supplied change adds two Lyra-scoped, version-guarded overlays (hosts/lyra/handbrake-ffmpeg-compat.nix, hosts/lyra/pyopenjtalk-test-compat.nix), imports them only from hosts/lyra/default.nix, embeds the two patch files, and adds two SHA-bound lifecycle records plus their reverse removal patches. I verified the structural contract against scripts/nixos-pin-lifecycle.py: both records carry exactly the METADATA_FIELDS set, canonical fingerprint-bound paths, sorted modelPatch paths, applyDirection "reverse", and their .remove.patch hunk headers (@@ -0,0 +1,40 @@, @@ -0,0 +1,19 @@, @@ -0,0 +1,823 @@, @@ -0,0 +1,18 @@) match the on-disk file lengths, and the README/default.nix reverse contexts exist in the checked-out files. The embedded pyopenjtalk test patch is internally consistent (@@ -772,7 +772,8 @@ counts 7 old/8 new lines) and preserves the pytest.raises exception plus the follow-up valid-call assertions. The HandBrake patch's hunk offsets are monotonically consistent on both sides. One concrete inconsistency remains: both records set reviewAfter to createdAt + 7 days while remediation/nova-policy.json declares pinLifecycle.reviewAfterDays = 14, which is the value scripts/nixos_update_remediation/publication.py uses to derive reviewAfter and the value used by the fixture in tests/nixos-pin-lifecycle-integration.py (2026-08-01 -> 2026-08-15). I found no evidence of an evaluation or build defect in the supplied Nix.

Blocking findings

None.

Important findings

None.

Suggestions

  • Both new pin records set reviewAfter to createdAt + 7 days, not the policy's 14 (remediation/pins/2a8e67ef290a3131e1e271f5f6d8b30ba07a2db8054b4a43df9f7299be10f100.json:38; high confidence)
    Both records pair createdAt "2026-10-21T13:55:03Z" / "2026-10-21T14:31:07Z" with "reviewAfter": "2026-10-28" (+7 days). remediation/nova-policy.json sets "pinLifecycle": {"reviewAfterDays": 14}; scripts/nixos_update_remediation/publication.py:596 computes review_after = created_at.date() + timedelta(days=policy["pinLifecycle"]["reviewAfterDays"]), and tests/nixos-pin-lifecycle-integration.py uses createdAt 2026-08-01 with reviewAfter 2026-08-15. scripts/nixos-pin-lifecycle.py:535 then reports stale = now > reviewAfter. docs/auto-update-remediation.md states manually approved pins use the same bounded record contract as controller-generated ones.
    Impact: No evaluation or build effect: validate_metadata only checks the date format, so the records load. But the scheduled pin-lifecycle summary will flag both pins stale=true one week earlier than the policy-derived date (2026-11-04), producing stale-review noise for both tracking issues #381 and #386.
    Suggested fix: Set reviewAfter to "2026-11-04" in both records to match policy reviewAfterDays, or record in the tracking issues why a shortened 7-day window was chosen for these manually approved pins; note that changing reviewAfter does not change the bound removalPatch sha256, so the existing .remove.patch files stay valid.

Tests and validation

  • No configured deterministic checks.

Questions

  • Can you confirm that lib.functionArgs prev.handbrake.override returns the package function's formal argument names, so that (lib.functionArgs prev.handbrake.override) ? ffmpeg_8-full can ever be true? nixpkgs is not in the checkout, so I could not inspect the definition of pkg.override; if it is the generic {args, ...}: callPackage newPkg args wrapper, functionArgs yields only {args = null;}, the guard is permanently false, and the HandBrake workaround would be inert rather than applied.
  • Is the exact-version guard pythonPrev.pyopenjtalk-plus.version == "0.4.1-post9" intentional, versus the HandBrake overlay's version range (>= 8.1.3 && < 9)? A pyopenjtalk-plus version bump makes the test patch inert while the pin record still requires the reverse patch to apply, so the two workarounds degrade differently.

Review limitations

  • Read-only navigation only: I did not run nix flake check, nix build, git apply --reverse, or the lifecycle scripts, and I could not compute the SHA-256 of the committed .remove.patch files to compare against the recorded removalPatch/modelPatch hashes (the equal modelPatch.sha256 == removalPatch.sha256 values match the convention used in tests/nixos-pin-lifecycle-integration.py, but equality with the committed bytes is unverified).
  • The nixpkgs package set is not in the checkout, so I could not verify prev.ffmpeg_8-full, the ffmpeg_8-full argument of handbrake's override, handbrake's own overrideAttrs patch append, pythonPackagesExtensions, or pyopenjtalk-plus's overridePythonAttrs against their current definitions.
  • The C source in hosts/lyra/patches/handbrake-pgs-ffmpeg-8.1.3.patch was checked only for internal consistency (hunk line counts and offsets are consistent on both sides; the palette-before-bitmap ordering matches the stated FFmpeg dad96bcc55576772846fa1f4acb57ec4322d589d intent). I could not compile it or confirm it matches upstream HandBrake A15 rebased onto FFmpeg 8.1.3.
  • MR and issue metadata are not supplied: I could not confirm the milestone/labels required by docs/auto-update-remediation.md for temporary-pin PRs, nor the claimed validation results (PGS checks, 1679 passed/16 skipped, flake checks, both removal orders).
  • I confirmed no file outside hosts/lyra references handbrake in the checked-out tree, but I could not determine how handbrake enters Lyra's closure (presumably through the upstream Tdarr service), so the pin's affectedHosts scope is unverified.

Diff coverage

  • README.md: reviewed — included in a context-limited batch
  • hosts/lyra/default.nix: reviewed — included in a context-limited batch
  • hosts/lyra/handbrake-ffmpeg-compat.nix: reviewed — included in a context-limited batch
  • hosts/lyra/patches/handbrake-pgs-ffmpeg-8.1.3.patch: reviewed — included in a context-limited batch
  • hosts/lyra/patches/pyopenjtalk-cython-typeerror.patch: reviewed — included in a context-limited batch
  • hosts/lyra/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: `1e4d4f75fa879854dbc9dc2e9cd6c4be85fccd0c` ## Verdict: Ready to merge No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory. ### Overall assessment The supplied change adds two Lyra-scoped, version-guarded overlays (hosts/lyra/handbrake-ffmpeg-compat.nix, hosts/lyra/pyopenjtalk-test-compat.nix), imports them only from hosts/lyra/default.nix, embeds the two patch files, and adds two SHA-bound lifecycle records plus their reverse removal patches. I verified the structural contract against scripts/nixos-pin-lifecycle.py: both records carry exactly the METADATA_FIELDS set, canonical fingerprint-bound paths, sorted modelPatch paths, applyDirection "reverse", and their .remove.patch hunk headers (@@ -0,0 +1,40 @@, @@ -0,0 +1,19 @@, @@ -0,0 +1,823 @@, @@ -0,0 +1,18 @@) match the on-disk file lengths, and the README/default.nix reverse contexts exist in the checked-out files. The embedded pyopenjtalk test patch is internally consistent (@@ -772,7 +772,8 @@ counts 7 old/8 new lines) and preserves the pytest.raises exception plus the follow-up valid-call assertions. The HandBrake patch's hunk offsets are monotonically consistent on both sides. One concrete inconsistency remains: both records set reviewAfter to createdAt + 7 days while remediation/nova-policy.json declares pinLifecycle.reviewAfterDays = 14, which is the value scripts/nixos_update_remediation/publication.py uses to derive reviewAfter and the value used by the fixture in tests/nixos-pin-lifecycle-integration.py (2026-08-01 -> 2026-08-15). I found no evidence of an evaluation or build defect in the supplied Nix. ### Blocking findings None. ### Important findings None. ### Suggestions - **Both new pin records set reviewAfter to createdAt + 7 days, not the policy's 14** (remediation/pins/2a8e67ef290a3131e1e271f5f6d8b30ba07a2db8054b4a43df9f7299be10f100.json:38; high confidence) Both records pair createdAt "2026-10-21T13:55:03Z" / "2026-10-21T14:31:07Z" with "reviewAfter": "2026-10-28" (+7 days). remediation/nova-policy.json sets "pinLifecycle": {"reviewAfterDays": 14}; scripts/nixos_update_remediation/publication.py:596 computes review_after = created_at.date() + timedelta(days=policy["pinLifecycle"]["reviewAfterDays"]), and tests/nixos-pin-lifecycle-integration.py uses createdAt 2026-08-01 with reviewAfter 2026-08-15. scripts/nixos-pin-lifecycle.py:535 then reports stale = now > reviewAfter. docs/auto-update-remediation.md states manually approved pins use the same bounded record contract as controller-generated ones. Impact: No evaluation or build effect: validate_metadata only checks the date format, so the records load. But the scheduled pin-lifecycle summary will flag both pins stale=true one week earlier than the policy-derived date (2026-11-04), producing stale-review noise for both tracking issues #381 and #386. Suggested fix: Set reviewAfter to "2026-11-04" in both records to match policy reviewAfterDays, or record in the tracking issues why a shortened 7-day window was chosen for these manually approved pins; note that changing reviewAfter does not change the bound removalPatch sha256, so the existing .remove.patch files stay valid. ### Tests and validation - No configured deterministic checks. ### Questions - Can you confirm that `lib.functionArgs prev.handbrake.override` returns the package function's formal argument names, so that `(lib.functionArgs prev.handbrake.override) ? ffmpeg_8-full` can ever be true? nixpkgs is not in the checkout, so I could not inspect the definition of `pkg.override`; if it is the generic `{args, ...}: callPackage newPkg args` wrapper, functionArgs yields only `{args = null;}`, the guard is permanently false, and the HandBrake workaround would be inert rather than applied. - Is the exact-version guard `pythonPrev.pyopenjtalk-plus.version == "0.4.1-post9"` intentional, versus the HandBrake overlay's version range (`>= 8.1.3 && < 9`)? A pyopenjtalk-plus version bump makes the test patch inert while the pin record still requires the reverse patch to apply, so the two workarounds degrade differently. ### Review limitations - Read-only navigation only: I did not run `nix flake check`, `nix build`, `git apply --reverse`, or the lifecycle scripts, and I could not compute the SHA-256 of the committed .remove.patch files to compare against the recorded removalPatch/modelPatch hashes (the equal modelPatch.sha256 == removalPatch.sha256 values match the convention used in tests/nixos-pin-lifecycle-integration.py, but equality with the committed bytes is unverified). - The nixpkgs package set is not in the checkout, so I could not verify prev.ffmpeg_8-full, the `ffmpeg_8-full` argument of handbrake's override, handbrake's own overrideAttrs patch append, pythonPackagesExtensions, or pyopenjtalk-plus's overridePythonAttrs against their current definitions. - The C source in hosts/lyra/patches/handbrake-pgs-ffmpeg-8.1.3.patch was checked only for internal consistency (hunk line counts and offsets are consistent on both sides; the palette-before-bitmap ordering matches the stated FFmpeg dad96bcc55576772846fa1f4acb57ec4322d589d intent). I could not compile it or confirm it matches upstream HandBrake A15 rebased onto FFmpeg 8.1.3. - MR and issue metadata are not supplied: I could not confirm the milestone/labels required by docs/auto-update-remediation.md for temporary-pin PRs, nor the claimed validation results (PGS checks, 1679 passed/16 skipped, flake checks, both removal orders). - I confirmed no file outside hosts/lyra references handbrake in the checked-out tree, but I could not determine how handbrake enters Lyra's closure (presumably through the upstream Tdarr service), so the pin's affectedHosts scope is unverified. ### Diff coverage - `README.md`: **reviewed** — included in a context-limited batch - `hosts/lyra/default.nix`: **reviewed** — included in a context-limited batch - `hosts/lyra/handbrake-ffmpeg-compat.nix`: **reviewed** — included in a context-limited batch - `hosts/lyra/patches/handbrake-pgs-ffmpeg-8.1.3.patch`: **reviewed** — included in a context-limited batch - `hosts/lyra/patches/pyopenjtalk-cython-typeerror.patch`: **reviewed** — included in a context-limited batch - `hosts/lyra/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>
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!387
No description provided.