Repository navigation
Description
Standing auto-update system — design + tracking
Drew's order (2026-11-24 00:22 CST): "ensure all daemons in laptop and muse agent and cloudflare are always automatically kept updated. ideally nixos should update laptop but allow override. perhaps home manager override temporarily and rectified in nixos build. all binaries and services nix pkgs."
Design of record: dated record doc/2026-11-24T06-25-30Z_design_auto-update-system/ (PR linked in the comments when landed).
The model in brief
"Always updated" = for every daemon/binary/service: a pin names the intended version, an automatic gated path converges the running thing to the pin, a drift census verifies running == pin, and a failed update never replaces the running version.
- Laptop — the NixOS build is the rectifier. Pin = the flake on main (
github:developing-today/code/main#amd, already the build source per mcpx e2e: TestFileScriptPrefixRunsBeforeTopLevelCode fails on main — amd system build blocked #12428). A scheduled gated rebuild (build → checks → switch → health probes) converges the whole machine; Nix generations are the retained rollback. Todaysystem.autoUpgradeis set nowhere and rebuilds are run by hand. - Overrides — home-manager first, the build rectifies. An override (a fast user-level fix applied ahead of the system build) is recorded in a ledger in the repo at apply time, with a probe proving the fix is live. The rebuild cycle rectifies: if the flake on main now expresses the change, the build absorbs it and the probe verifies it survived; if not, the fix is landed on main first or re-applied on top. Hard rule: a switch that would silently revert a recorded live fix is held and surfaced loudly — never applied.
- Muse sandbox — converge to the pin at safe windows. Seat binaries (fleet, tailscale, bws, op, restic) are hand-placed drops today; init/heal gains an update leg that fetches + hash-verifies the pinned build and swaps at safe restart windows (never mid-refresh; liveness is automated today, versions are not).
- Cloudflare — every Worker on the pipeline. Pin = main. The console-edge pattern (CI build → health gate on deployed commit → promote) generalises to every production Worker; PM Workers join via PM stack: migrate fully to Cloudflare hosting (fallbacks: CF Tunnel, then Tailscale DNS) #14107's M-slices. By-hand
wrangler deployretires Worker by Worker. (pm-aggregator deployment is 4,687 commits behind main (2026-11-15 build) — PM apps must follow main #14059 — a deploy 4,687 commits stale, unalarmed — is what this prevents.)
Slice map (ordered, independently landable; queued by Archer — not yet)
- U1 — Drift census v1. Read-only pinned-vs-running census across the three planes, scheduled, one report. Foundation for verifying everything after.
- U2 — Laptop auto-rebuild. Gated scheduled rebuild+switch from GitHub main; health probes; generation retention; hold-and-surface on failure.
- U3 — Fleet as the flake package.
pkgs/fleet/default.nixexists but the laptop runs a hand-copied binary (+ a pile of.bakfiles); U3 makes laptop fleet + brokers the flake package and rebases the sandbox pin on the same output. - U4 — Override protocol. Ledger, home-manager apply recording, pre-switch divergence gate (no silent revert), post-switch probes, escalation window.
- U5 — Sandbox pin convergence. init-ensure update leg + heal-safe swap windows.
- U6 — Cloudflare pipeline generalisation (non-PM). Publish → health-gate → promote for every remaining production Worker; standard commit-reporting snippet.
- U7 — Exception burn-down. Package or formally exception-list each remaining offender (see below).
What contradicts the model today (from the 2026-11-24 inventory)
- fleet: package exists, deployment doesn't use it — hand-copied binary on the laptop, hand-placed drops in the sandbox.
- Vendor self-updaters (claude, codex): update outside Nix entirely; cannot be packages without abandoning vendor channels. Design exception-lists them (version-probed, lag reported). Package-or-not is an open decision for Drew (needed at U7, not before).
- clef-proxy runs from a checkout; fff-mcp and a stale atlas-search-6788 sit as side binaries beside managed ones; codebase-memory-mcp is an npm-global install.
- Docker products (pm-grist, pm-pad): images outside the flake build — bridge is digest-pinning in flake-defined config; their store programmes own the rest.
- pm-console redeploys from a live checkout by timer — the checkout is the pin, not the flake (PM stack: migrate fully to Cloudflare hosting (fallbacks: CF Tunnel, then Tailscale DNS) #14107 addresses the PM tier specifically).
Existing work this composes with (not duplicates)
#14107 / PR #14124 (PM Cloudflare pipeline + commit-age drift), #12428 (laptop rebuild record), #14099 (gh-cache ensure leg), daily flake sync + flake-inputs-update workflow (input freshness — this design adds convergence of running systems to those pins), #8546 (id world update channels — a different plane, name collision only).
Activity
developing-today commentedon Nov 24, 2026
CODE-5192
Merge pull request #14144 from developing-today/archer/auto-update-de…
developing-today-fleet commentedon Nov 24, 2026
Design landed: PR #14144 — #14144 (merged
9af025f471f7). Record:doc/2026-11-24T06-25-30Z_design_auto-update-system/, indexed indoc/README.md.Summary of what the design settles:
system.autoUpgradeis set nowhere today — this is the gap U2 closes.pkgs/fleet/default.nixexists, but the laptop runs a hand-copiedfleetbinary with hand-kept.bakpredecessors, and the sandbox runs hand-placed drops — U3 fixes the deployment, not the packaging.Slices U1–U7 stand as listed in the issue body — named and ordered, not queued (Archer queues U1 from here).
Open decisions recorded in the design (§8): vendor self-updaters package-or-exception (Drew, needed at U7); U2 cadence/window and the override escalation N (Archer at slice time).
developing-today-fleet commentedon Nov 24, 2026
Slice U1 packetised — task 21690
Per the slice map in the design of record (PR #14144; summary in comment 7123988057 above), slice U1 — drift census v1 is now queued:
repo-health-code-pilot, priority 40, kindfeature_slice, dedupe keyrepo-health:v1:slice:developing-today/code:issue:14134:slice-1. Packet validated (fleet queue validate: valid), dry-run clean, enqueued via the laptop client, and verified by read-back (fleet queue show 21690). It has already been claimed by a build lane.Slices U2–U7 are not queued — U1 only, as directed.
— Lane AUTO-UPDATE-U1-PACKET, 2026-11-24.
dezren39 commentedon Nov 24, 2026
U1 is checkpointed without code changes. The prerequisite review found that #14107/#14124 are design-only: no deployed-commit/commit-age input exists in this checkout for the Cloudflare plane. The scheduled three-plane acceptance also cannot be verified from this seat:
fleet shell targetsreports laptop and Codespace unreachable, and no reachable Muse sandbox read-only version probe is available. I am parking rather than adding a mock-only core that cannot produce the specified report. Resume when #14107 M1 exposes the deployed-commit input and laptop + Muse sandbox read-only probes are reachable; then implement the scheduled report and updatedoc/fleet-schedule-registry.mdin the same change.developing-today-fleet commentedon Nov 24, 2026
U1 — Drift census v1, run 2026-11-24T09:45Z
First run of the §4 census (design of record:
doc/2026-11-24T06-25-30Z_design_auto-update-system/). Read-only throughout — nothing was restarted, swapped, deployed, or written on any plane. Per service: pinned version, running version, lag age, state (converged / pending / held / drifted), open overrides, held updates.Reference points at census time. Main HEAD:
a838068cbf89(2026-11-24 03:41 CST). Sandbox pin source:scripts/muse/bootstrap.shon main. Laptop pin: the flake on main (#amd). Cloudflare pin: main, per Worker.Blocker re-check against the 06:43Z park note: the laptop was reachable this run (
fleet shell targetsreports it reachable via the laptop-agent, and direct probes answered promptly — its state changed since the park). The sandbox plane is probed from the seat itself. The Cloudflare deployed-commit input does exist in one place — wrangler deployment annotations (below) — but only one Worker writes them.Plane 1 — Muse sandbox (this seat,
muse, 100.107.76.35)~/tools/fleet)fleet-static-74eee89, rev74eee892e(2026-11-23 21:21 CST), sha25627eedcf9…7b54ce5d6a2e(2026-11-24 00:18 CST), sha256abcd1116…~/tools/bin/op)~/tools/fleet(7b54ce5)fleet ghfalls back to in-process resolutionOpen overrides: none (no ledger exists until U4). Held updates: none.
Plane 2 — Laptop (amd-6) — reachable this run
system.autoUpgradeis set nowhere in the flake on main (grep: no matches) — there is no converger yet, so drift here is the expected pre-U2 condition.amd)a838068c(2026-11-24 03:41 CST)26.11.20261102.f9887a8.configurationRevisionis unset, so the exact source rev of the running generation is not recorded by the system itself — build time is the evidence~/.local/bin/fleet, hand copy)pkgs/fleetfrom the flake @ main74eee892e(0.1.0-dev+g74eee89), file dated 2026-11-23 21:36 CSTOpen overrides: none recorded (ledger arrives with U4). Held updates: none.
Plane 3 — Cloudflare (pin = main
a838068cfor every Worker)Read access:
wrangler deployments listper Worker via~/tools/cloudflare/wrangler-authed.pywith the broker-cached token namedcloudflare.api-token-account-wide(piped on stdin; value never printed or stored).Converged (1).
pm-console-edge— the only Worker whose deployments annotate the source commit: deployed commitb740ff9883a4at 2026-11-24T09:40:27Z, an ancestor of main, 6 commits behind HEAD (~3 min of commit time). The publish → health-gate → promote pipeline is live and current.Deployed, but deployed commit unmeasurable (14). These Workers have deployments but write no commit annotation, so pinned-vs-running cannot be computed until they gain the standard commit-reporting snippet (U6) or #14107's commit-age machinery lands. Last deployment before the census, as the only available signal:
Not deployed (5). Repo wrangler configs exist, but the Cloudflare API answers 10007 "This Worker does not exist on your account" (verified individually for each):
pm-notify(pm-stack/notify-relay),fleet-hosted,id-hosted-worker,id-d1-journal-poc(PoC),id-worker-poc(PoC). State: config-only, nothing running to drift.Summary
configurationRevisionunset).ophas no bootstrap pin.Not yet stood up by this run: the daily scheduling of the census itself (this is the v1 report the schedule will produce; the schedule-registry entry belongs with the scheduling change). The census never fixes — every drift item above routes to its slice (U2/U3/U5/U6), not to this report.
— Lane for task 21690 (worker felix), 2026-11-24.