Critical: repair detached auto-update activation and recover Vega/Lyra #52
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#52
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Context
The 2026-07-13 review found that every detached switch attempt on both server consumers failed before activation:
systemd-runstarted the helper without the parent service's Nix-builtPATH. The parent updater returned after handoff, so the helper needed its own durable state, journal, and failure reporting. Live testing also showed that inline activation on Electra can terminate the updater that is performing the switch.A later review found a remaining handoff race: the parent released
run.lockafter launching the detached helper, allowing the hold controller to create a maintenance hold while activation was still active. Commit07ba22fmakes hold creation retain the shared run lock while it observes the detached-switch marker, waits for verified active helpers, recovers inactive stale state, handles collected-unit completion, and fails closed when helper state cannot be verified.Scope
Completion criteria
Final live-validation plan
After deploying commit
07ba22f:nixos-auto-update-controlcontains the wait message for an active detached helper./run/nixos-auto-update/holdwhileswitch-in-progressexists.configurationRevision, active specialisation, notifications, updater/helper results, and zero unexpected failed units.Implemented the first critical repair locally (not yet committed or deployed):
writeShellApplicationwith explicit runtime inputs.systemd-runhelpers now invoke that wrapper, reconstructing the same deterministic tool PATH instead of running the raw script in an empty manager environment.nixos-auto-update-switch-*transient units.Verification completed:
git diff --checkpass.ExecStartresolves to the new wrapper.--finish-detached-switchunderenv -iwith an isolated runtime directory. It reached the expected missing-metadata error (rather thanmkdir: command not found) and removed the stale marker.nix flake checkpassed for Electra, Lena, Vega, and Lyra.The issue remains open because the fix still needs commit/deploy and a real detached switch on both Vega and Lyra. Aggregate parent/helper status and lock lifetime also need review before all completion criteria can be checked.
Committed the first repair as
ec42e29(fix: restore detached auto-update helper runtime). It has not been pushed or deployed.Follow-up confirmation after deployment:
nixos-auto-update.serviceon each host.nixos-auto-update-switch-<host>.servicereaches the switch rather than failing before startup./run/nixos-auto-update/{switch-in-progress,detached-switch.env}is removed after completion.Revision equality remains tracked separately in #54 because the current
path:flake build behaviour is a distinct defect.Added and pushed manual Forgejo freshness override in
ce7b67e(feat: allow forced Forgejo flake updates). Manual Build and Push Attic Cache dispatches can now set bothupdate_inputs=trueandforce_update=trueto bypass only the six-hourflake.lockfreshness check. Scheduled runs retain the cooldown, and input-group build acceptance/safety checks remain active. This provides an immediate path to create a candidate revision for the outstanding repaired detached-helper activation test.Committed
f5e5144(fix: detach auto-update activation on all hosts). Fleet default is now detached;inlineremains only as an explicit diagnostic override. This addresses the live Electra failure where inline activation terminatednixos-auto-update.servicebefore revision verification. Electra, Lena, and Vega evaluate toswitchExecution=detached; fullnix flake checkpassed for all hosts. Commit is local and awaiting push/manual Electra bootstrap deployment.✅ Lyra genuine detached activation passed at 18:00 BST for candidate
f3d3bd547c094ab947ebf3867c66cf7538482228.Evidence:
nimmo, handed off successfully, and exited 0;nixos-auto-update-switch-lyraran from the generated wrapper and exited 0;switch-in-progressand detached metadata were removed (onlyrun.lockremains);This completes Lyra's real-switch evidence. Vega and desktop/Electra evidence remain pending.
Vega and Lyra both completed another genuine detached deployment to
b1efea8on 2026-07-16. Verified checkout HEAD equals activeconfigurationRevisionon both, with no failure stamps and onlyrun.lockremaining. This reinforces that detached activation remains stable across subsequent unrelated configuration changes.Local commit
07ba22ffixes the remaining hold/detached-helper race.Validated before commit:
nix flake checkpasses for Electra, Lena, Vega, and Lyra.The commit is intentionally not pushed automatically. Final closure requires deployment and the live hold-during-activation check in the updated issue body.
Live hold/activation serialization passed on Electra at revision
07ba22fb75588ef3714123242e0b2cb52b477abd.Evidence:
nixos-auto-update-switch-electraswitch-in-progressanddetached-switch.envigpuResult=success,ExecMainStatus=0The critical final criterion is now checked. Release the deliberate validation hold and run one immediate no-op check before closing.
Final follow-up passed on Electra at 14:06.
07ba22fb75588ef3714123242e0b2cb52b477abdAlready up to dateNothing changed in pull, system is currentrun.lockremains in runtime stateAll implementation, hermetic regression, fleet activation, hold serialization, cleanup, health, notification, revision, specialisation, and no-op criteria are complete. Closing.