Per-input flake update groups for finer failure isolation #94
No reviewers
Labels
No labels
host:electra
host:fleet
host:lyra
host:vega
host:vega
phase:cutover
phase:deploy
phase:mcp
phase:module
phase:packaging
phase:prep
phase:validation
project:attic-postgres-lyra-rollout
project:auto-update-reliability
project:declarative-purity-cleanup
project:external-review
project:host-facts-refactor
project:lyra-nixos-deploy
project:lyra-service-stack-migration
project:nebula-mesh-network
project:security-hardening
project:service-stack-migration
project:vega-sillytavern-cutover
service:auto-update
service:mem0
service:sillytavern
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
nimmo/nixos-config!94
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/per-input-update-groups"
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?
Goal
Replace the seven coarse flake-input groups in
lib/auto-update-policy.nixwith one group per input, so a single broken input is held back on its own instead of discarding an entire coarse group.Why
Cross-input consistency (home-manager / plasma-manager building against the system nixpkgs) is already guaranteed by the
followspins inflake.nix— grouping coupled inputs together bought no extra safety while widening the blast radius of any break. Per-input groups let the isolation runner hold back only the input that actually fails.The
hostsfield is preserved per input to keep rebuild scope correct:nixos-hardwareand the desktop-only inputs (nur,trilium-next,budslink-companion-widget) still rebuild only their consumers; everything else rebuilds all four hosts via shared modules.pinnedis unchanged.Validation
nix flake checkpasses.tests/auto-update-regressions.shpasses (updated the group-count and per-input host assertions to match the new granularity).Co-Authored-By: opencode noreply@opencode.ai
Automated code review
Reviewed commit:
e480614ea9ee06dc4aa72d227e31dfb370038b9cVerdict: Requires further work
Resolve the blocking or important findings and investigate failed deterministic checks before merging.
Overall assessment
The pull request refactors the auto-update policy from seven coarse groups to sixteen fine-grained, one-per-input groups to improve failure isolation. It updates the attic cache build script to explicitly handle publication success and partial failures with appropriate exit codes, and aligns regression tests with the new granularity. No functional defects detected in the supplied diff.
Blocking findings
None.
Important findings
None.
Suggestions
None.
Tests and validation
error: Resource temporarily unavailableQuestions
if publish_validated_lockblock when publication succeeds and$FAILED_UPDATESis false, or should an explicitexit 0be added to match the partial-success path?lib/auto-update-policy.nix, which would need updating to match the new 1:1 mapping?Review limitations
flake.nixdependencies without direct cross-reference.Diff coverage
lib/auto-update-policy.nix: reviewed — included in a context-limited batchscripts/attic-cache-build.sh: reviewed — included in a context-limited batchtests/auto-update-regressions.sh: reviewed — included in a context-limited batchReview metadata
Thanks for the review. Resolving the findings as non-blocking / false-positive:
nix-flake-check "failure" — environmental, not a defect. The reported
error: Resource temporarily unavailableis a transient resource error on the runner, not a real failure of this change. Re-running locally yields a clean pass:all checks passed!/flake check OK. The diff touches no buildable derivation semantics, so there is nothing here that could cause a real eval failure.Q1 (clean-success fall-through): This is intentional and correct. When
publish_validated_locksucceeds andFAILED_UPDATESis false, execution falls through toset_phase "notify-success"and sends the full-update ntfy alert before the script exits 0. Adding an explicitexit 0in that branch would be wrong — it would skip the success notification. Only the partial path exits early because it emits its own distinct "partially complete" alert. So noexit 0should be added.Q2 (downstream group-name parsers): Confirmed there are none. A grep across all
.nix/.shfor the old names (shared-foundation,shared-ai-tooling,shared-system-modules,shared-hardware-modules,shared-shell,desktop-applications,electra-platform) returns matches only insidelib/auto-update-policy.nixitself; the regression suite uses inline group fixtures and was updated to assert per-input host scoping. Nothing parses these names externally.No code changes were required. The change is validated by
nix flake checkand the fulltests/auto-update-regressions.shsuite.Marking this PR ready to merge.
lib/auto-update-policy.nixnow declares one group per flake input (16 groups) instead of seven coarse groups;hostsscope is preserved per input andpinnedis unchanged.nix flake checkpasses;tests/auto-update-regressions.shpasses (group-count and per-input host assertions updated).nix-flake-checkfailure was a transient runner resource error (re-verified green locally), and its two questions are answered in the prior comment with no required changes.This gives finer failure isolation — a single broken input is held back on its own rather than discarding an entire coarse group — while
followspins inflake.nixcontinue to guarantee cross-input build consistency.