lyra: unblock flake updates with reversible media compatibility fixes #387
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!387
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/handbrake-ffmpeg-pgs"
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?
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:
Refs #381. Refs #386.
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.Automated code review
Reviewed commit:
1e4d4f75fa879854dbc9dc2e9cd6c4be85fccd0cVerdict: 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 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
Questions
lib.functionArgs prev.handbrake.overridereturns the package function's formal argument names, so that(lib.functionArgs prev.handbrake.override) ? ffmpeg_8-fullcan ever be true? nixpkgs is not in the checkout, so I could not inspect the definition ofpkg.override; if it is the generic{args, ...}: callPackage newPkg argswrapper, functionArgs yields only{args = null;}, the guard is permanently false, and the HandBrake workaround would be inert rather than applied.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
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).ffmpeg_8-fullargument of handbrake's override, handbrake's own overrideAttrs patch append, pythonPackagesExtensions, or pyopenjtalk-plus's overridePythonAttrs against their current definitions.Diff coverage
README.md: reviewed — included in a context-limited batchhosts/lyra/default.nix: reviewed — included in a context-limited batchhosts/lyra/handbrake-ffmpeg-compat.nix: reviewed — included in a context-limited batchhosts/lyra/patches/handbrake-pgs-ffmpeg-8.1.3.patch: reviewed — included in a context-limited batchhosts/lyra/patches/pyopenjtalk-cython-typeerror.patch: reviewed — included in a context-limited batchhosts/lyra/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