You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
quota-recorder: units still vanish mid-boot — #6148 restore block only heals at init, switch activations wipe the /etc copies with no mid-boot restore #11020
The quota-recorder systemd units (quota-recorder.service / quota-recorder.timer, installed as imperative copies in /etc/systemd/system) still vanish mid-boot and stay gone until a person or a sweep notices and hand-reinstalls them. Recording silently stops in the gap.
But the restore only runs at init/boot. On 2026-11-16 the units were lost at least 3 times in ~14 hours (fleet run reports, ~/memory/2026-11-16.md), including one sweep recording verbatim: "quota-recorder units had vanished from /etc again — reinstalled via ~/tools/quota-recorder/install.sh; timer active, tick landed". Each loss was healed by a manual reinstall, not by the init: quota-recorder units have no restore block — lost on every sandbox recycle #6148 mechanism.
Working pattern: imperative /etc unit copies are wiped by NixOS switch activations mid-boot; nothing re-runs the installer until the next boot or a human notice.
Scope
Give the quota-recorder units a restore path that fires mid-boot — e.g. declare the units in the Nix configuration so switch activations carry them, or add a switch/post-activation hook (or a watchdog timer in a durable unit family) that re-runs ~/tools/quota-recorder/install.sh when the timer is missing. Sandbox side (the recorder runs on the sandbox); do not change the recorder itself.
Acceptance check
After a NixOS switch activation on the sandbox, systemctl is-active quota-recorder.timer is active with no manual reinstall, and a recorder tick lands (file-first + Turso ack) within one timer interval of the activation.
Sweep run 2026-11-17: investigated, not closed. Blocked on the sandbox NixOS config, which is not in any repo this session can reach. No fix PR is open.
Re-check first:#11020 is OPEN. Only the Kaneo sync comment exists. No merged PR covers a mid-boot or switch-activation restore. The only merged PR found for this search is code#5764 (a doc PR, not a fix). #6148 is CLOSED but covers the boot-only restore.
Why switch activations wipe the /etc copies (root cause):
The restore (~/tools/quota-recorder/install.sh, called from ~/tools/init.sh) does cp into /etc/systemd/system/ and then systemctl enable --now. Writes there are not owned by any NixOS config.
On NixOS, /etc/systemd/system is a symlink into /etc/static, which is a symlink into an immutable /nix/store/...-etc tree. The units under it are generated by the active system generation (verified on this host: /etc/systemd/system -> /etc/static/systemd/system -> /nix/store/dasm2s…-system-units, dr-xr-xr-x). A switch builds a new generation and replaces that tree, so any imperative unit file in it is dropped. Boot-only restore cannot cover this, because a switch does not re-run init.sh.
This host (NixOS 26.11) shows the store-backed layout: test -w /etc/systemd/system/ fails. The sandbox's layout may differ, since its restore copies succeed. The switch-wipe itself was observed on the sandbox (2026-11-16), not reproduced here.
Why I cannot land the fix here: the durable fix is to declare quota-recorder.service and quota-recorder.timer in the sandbox NixOS configuration (systemd.services / systemd.timers, ExecStart pointing at /home/hatch/tools/quota-recorder.py), so every switch carries them. No nixosConfigurations, /etc/nixos, or sandbox flake exists in the local repos (~/git/nix and ~/git/darwin-nix are darwin configs), and /home/hatch is not on this host. I cannot write or test that config, and I cannot run a switch on the sandbox to produce the required proof.
Question (default chosen, recorded for the owner): where is the sandbox NixOS config that owns /etc/systemd/system for hatch? Default until answered: I will not change the boot-only restore, and the fix will go in that config as above, verified by a sandbox switch that leaves quota-recorder.timer active with a tick landing and no manual reinstall. Once the config location is known, this is the PR and the proof.
Also flagged:hatchtools/quota-recorder/quota-recorder.timer has OnCalendar=*:0/5 (5-minute), while the hatch-personal notes describe a 1-minute cadence. One of them is stale, and the fix should pick the correct value.
Leaving this OPEN. It needs the sandbox config location, or a sandbox switch for proof, before it can close.
Claimed and revalidated #11020. It is OPEN, assigned to dezren39, and has no fix PR; the prior comment from dezren39 on 2026-11-17 states the durable fix must go in the sandbox NixOS configuration that owns hatch /etc, which this laptop session cannot access, and that a sandbox switch is required to prove the units survive. The named prior fix session is not present in the OpenChamber session listing. No code or PR work was started.
Escalating because the missing config location/access and permission to run a sandbox switch are Drew-owned decisions/access. Resume when Drew identifies the owning config/repo and provides the required switch-activation verification path (or supplies equivalent proof). Until then, keep this issue OPEN and do not change the boot-only restore or claim acceptance. Labels synced to user/escalated, status/blocked, queue/blocked, work/assigned.
Decided: Do not change the boot-only restore from this host; the durable fix belongs in the sandbox-owned NixOS configuration, and this task cannot be implemented or acceptance-tested without access to that target. Why:#11020 requires a switch-activation test on the sandbox. /home/hatch and its NixOS configuration are absent here; fleet init reports no host manifest, HTTPS_PROXY is unset and laptop-agent cannot reach its transport, and the reachable repository documents no trusted sandbox route. The prior SSH attempt rejected an unknown host key, which will not be bypassed. Undo: Resume by editing the sandbox-owned configuration once it is reachable through a trusted route, then perform the required switch/tick acceptance check. By: oc-code-04
This is a technical access/configuration blocker, not a request for an owner decision. No code, PR, or acceptance claim was made. #11020 remains open.
Activity
developing-today commentedon Nov 17, 2026
CODE-3953
dezren39 commentedon Nov 17, 2026
Sweep run 2026-11-17: investigated, not closed. Blocked on the sandbox NixOS config, which is not in any repo this session can reach. No fix PR is open.
Re-check first: #11020 is OPEN. Only the Kaneo sync comment exists. No merged PR covers a mid-boot or switch-activation restore. The only merged PR found for this search is code#5764 (a doc PR, not a fix). #6148 is CLOSED but covers the boot-only restore.
Why switch activations wipe the /etc copies (root cause):
~/tools/quota-recorder/install.sh, called from~/tools/init.sh) doescpinto/etc/systemd/system/and thensystemctl enable --now. Writes there are not owned by any NixOS config./etc/systemd/systemis a symlink into/etc/static, which is a symlink into an immutable/nix/store/...-etctree. The units under it are generated by the active system generation (verified on this host:/etc/systemd/system -> /etc/static/systemd/system -> /nix/store/dasm2s…-system-units,dr-xr-xr-x). A switch builds a new generation and replaces that tree, so any imperative unit file in it is dropped. Boot-only restore cannot cover this, because a switch does not re-runinit.sh.test -w /etc/systemd/system/fails. The sandbox's layout may differ, since its restore copies succeed. The switch-wipe itself was observed on the sandbox (2026-11-16), not reproduced here.Why I cannot land the fix here: the durable fix is to declare
quota-recorder.serviceandquota-recorder.timerin the sandbox NixOS configuration (systemd.services/systemd.timers,ExecStartpointing at/home/hatch/tools/quota-recorder.py), so every switch carries them. NonixosConfigurations,/etc/nixos, or sandbox flake exists in the local repos (~/git/nixand~/git/darwin-nixare darwin configs), and/home/hatchis not on this host. I cannot write or test that config, and I cannot run a switch on the sandbox to produce the required proof.Question (default chosen, recorded for the owner): where is the sandbox NixOS config that owns
/etc/systemd/systemforhatch? Default until answered: I will not change the boot-only restore, and the fix will go in that config as above, verified by a sandbox switch that leavesquota-recorder.timeractive with a tick landing and no manual reinstall. Once the config location is known, this is the PR and the proof.Also flagged:
hatchtools/quota-recorder/quota-recorder.timerhasOnCalendar=*:0/5(5-minute), while the hatch-personal notes describe a 1-minute cadence. One of them is stale, and the fix should pick the correct value.Leaving this OPEN. It needs the sandbox config location, or a sandbox switch for proof, before it can close.
dezren39 commentedon Nov 18, 2026
agent-note:v1
state: escalated
task: 20736
lane: oc-code-04 (OpenChamber scheduled lane, worker repo-worker-code)
stage: claimed -> verified -> escalated-to-user
Claimed and revalidated #11020. It is OPEN, assigned to dezren39, and has no fix PR; the prior comment from dezren39 on 2026-11-17 states the durable fix must go in the sandbox NixOS configuration that owns hatch /etc, which this laptop session cannot access, and that a sandbox switch is required to prove the units survive. The named prior fix session is not present in the OpenChamber session listing. No code or PR work was started.
Escalating because the missing config location/access and permission to run a sandbox switch are Drew-owned decisions/access. Resume when Drew identifies the owning config/repo and provides the required switch-activation verification path (or supplies equivalent proof). Until then, keep this issue OPEN and do not change the boot-only restore or claim acceptance. Labels synced to user/escalated, status/blocked, queue/blocked, work/assigned.
dezren39 commentedon Nov 22, 2026
Decided: Do not change the boot-only restore from this host; the durable fix belongs in the sandbox-owned NixOS configuration, and this task cannot be implemented or acceptance-tested without access to that target.
Why: #11020 requires a switch-activation test on the sandbox.
/home/hatchand its NixOS configuration are absent here;fleet initreports no host manifest,HTTPS_PROXYis unset andlaptop-agentcannot reach its transport, and the reachable repository documents no trusted sandbox route. The prior SSH attempt rejected an unknown host key, which will not be bypassed.Undo: Resume by editing the sandbox-owned configuration once it is reachable through a trusted route, then perform the required switch/tick acceptance check.
By: oc-code-04
This is a technical access/configuration blocker, not a request for an owner decision. No code, PR, or acceptance claim was made. #11020 remains open.