Remove stale OpenCode service-failure monitor entry on Vega #225
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
nimmo/nixos-config#225
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?
Problem
The composed
services.serviceFailureMonitor.serviceslist for Vega still containsopencode, but the OpenCode web-server systemd service was removed in commitc7e0a683. Current source has nosystemd.services.opencodeimplementation; the remaining OpenCode references are CLI/package configuration.Because the failure-monitor module applies
unitConfig.OnFailurewithlib.genAttrs, a stale name can create or modify a unit definition that no longer corresponds to an owned service and makes monitoring coverage misleading.AGENTS.mdalso still says Vega posts failures foropencode.Scope
Acceptance criteria
opencodeis absent from Vega's composed failure-monitor list.Discovered while verifying the Monitoring and Service Investigation runbook for wiki issue #222 at source commit
556df88494.Confirmed the stale entry is still live in source, so this was not already done:
hosts/vega/default.nixlisted"opencode"and nosystemd.services.opencodeexists anywhere in the tree.Addressed in commit
078dacconmain:opencodefrom Vega's composedservices.serviceFailureMonitor.services.opencode.scripts/check-service-failure-monitor.nix, wired aschecks.x86_64-linux.service-failure-monitor-coverage, which asserts every watched unit name on any monitoring host is owned by a real service definition (a description, anExecStart, or an Exec script). The monitor's own generated stub carries onlyunitConfig.OnFailure, so unit existence in the evaluated config alone does not prove ownership.Correction on the observable effect: the stale name produced a stub only in the evaluated configuration. NixOS's generator emits no unit file for a service with no ExecStart, so
/etc/systemd/system/opencode.servicenever existed on Vega andsystemctl status opencode.servicereports "could not be found" on the old generation too. Absence of that unit file is therefore not a valid canary for this change.Validation so far:
nix flake checkpasses on all hosts and the new check builds; reverting the removal locally makes the new check fail on theopencodeassertion, so the guard is sensitive to this drift rather than vacuously true.Remaining before closure: a genuine deployment of the new configuration to Vega (test activation at minimum, plus a persistent generation and a no-op auto-update follow-up) confirming the closure builds and activates with monitored coverage unchanged for the intended units:
paseo,atticd,trilium-server,docker-paseo-relay,docker-paseo-webui.Live evidence on Vega (2026-10-07)
just test-remote vega(actiontest) completed at 16:33: captured snapshot built on Nova, closure signed on Electra, copied to Vega, activated withtest. Activation reported no errors.Post-activation state on Vega:
systemctl list-units --type=service --state=failed→ 0 loaded units.loaded active running:atticd,docker-paseo-relay,docker-paseo-webui,paseo,trilium-server./run/current-systemand the numbered profile links are unchanged (newest issystem-552-link, 16:01). The copied closure matched the running system, so the corrected configuration is byte-identical at the closure level.That last point is the finding, not a failure: the stale
opencodename had no runtime footprint at all, so removing it produces no new generation and no observable delta. A persistent generation plus a no-op auto-update follow-up is therefore unachievable by design for this change; the no-op was observed directly instead.Acceptance criteria
opencodeabsent from Vega's composed failure-monitor list — confirmed by evaluating the flake.description,serviceConfig, orscript) for every watched name on electra, lena, lyra and vega.opencode.nix flake checkpasses, includingchecks.x86_64-linux.service-failure-monitor-coverage; reverting the removal locally makes that check fail, so the guard is not vacuous.Closing. The durable value of this change is the evaluation-time guard, since this class of drift is invisible on the ground.
Persistent deployment evidence (2026-10-07, after the earlier test activation)
Pushed from Electra, pulled on Vega, then
just deployon Vega completed at 16:44:/home/nimmo/nixos-configis at078daccf563eb957ae2af85078c388bd9148db73— the pull landed, so the deployed generation carries this change.system-553-link -> /nix/store/mbdvws6gb4s5qmzfhj4fqll8i1chgc3f-nixos-system-vega-…, and/run/current-systemnow points to it.systemctl list-units --type=service --state=failed→ 0 units.atticd,docker-paseo-relay,docker-paseo-webui,paseo,trilium-serverallloaded active running./etc/systemd/system/opencode.service, as expected.Correction to the previous comment: the earlier
test-remoteactivation produced no new generation, but that was specific to that build path. A directjust deployon Vega does create a new generation, so "byte-identical closure" was not a general property of this change. What is stable and confirmed is narrower: the stale name produces no unit file and no runtime state change either way, so unit-file absence andsystemctl statusare not valid canary signals; the evaluation-time guard is the gate that catches this drift.