The deployer (Omni/Deploy/Deployer.hs) compares the manifest's store path for each service against the running unit file. If they match, it says "already at" and skips.
Bug: If someone manually edits the unit file (e.g., sed -i to point to
a newer store path for quick testing), the deployer's "already at" check
passes for the OLD manifest path, and the next ship.sh deploy with a
NEW path does update the unit file — but the intermediate manual edit is
lost context.
More precisely: the deployer only regenerates the unit file when the manifest store path differs from what it last deployed. It should also check that the actual ExecStart in the unit file matches the manifest store path, and regenerate + restart if they diverge.
1. ship.sh Omni/Web.hs → deployer sets unit file to path A
2. Manually sed unit file to path B, systemctl restart web
3. ship.sh Omni/Web.hs again (same code, no change) → deployer says "already at A"
4. Service is still running path B, not path A
In reconcileService, after the "already at" check, also read the current unit file and verify ExecStart contains the expected store path. If not, regenerate and restart.
Found additional post-reboot bug: /run/systemd/system/ symlinks are wiped on reboot (tmpfs). Added symlinkExists check to deployService — if the symlink is missing, it recreates it and restarts the service even when the store path matches. Verified: ran new deployer once, all 9 services detected as 'symlink missing (post-reboot?)' and restarted. Also filed t-702 for separate /run/secrets/ issue.
Ava verified: last comment from human author documents shipping/deployment with concrete evidence. Moving to Verified.
Fix implemented: getRunningStorePath now cross-checks deployer's unit file against systemctl show output. If they disagree (e.g. symlink was broken by manual edit), returns Nothing to force redeploy. Added extractNixStorePath and getSystemdExecStorePath exports + 5 unit tests. The deployer binary is managed by NixOS config, not the manifest, so it needs a NixOS rebuild to deploy.