GeezerVison is showing github.com — program: finish Tier-2 execution migration to the laptop (unlock: delete sandbox fleet clones) · Issue #1723 · developing-today/code
program: finish Tier-2 execution migration to the laptop (unlock: delete sandbox fleet clones) #1723DescriptionProgram
Finish moving the sandbox's remaining execution jobs to the laptop, per
the 2026-10-28 control-vs-execution classification
(hatch-personal: workspace/job-classification-2026-10-28.md). Control jobs
(~52: creators, sweeps, pr-diff, readouts, pool stewardship) stay on the
sandbox by design. Tier-1 queue shifts already execute on the laptop (only
their thin dispatchers sit on the sandbox — leaving them is deliberate).
Items
- agent-queue-worker (cron, 2h, pilot) — fold into the laptop shift
pattern. Trigger: the repo-queue pilot interim check (2026-10-28
17:25 CDT) verdict. Do not migrate mid-pilot.
- cold-store-nightly-backup (daily) + cold-store-restore-drill
(monthly/quarterly) — Cloudflare D1/R2 data duties. Vehicle: laptop
systemd timers defined in the NixOS flake (the "all laptop services in
the flake" pass), following the pattern proven by supabase-backup
(script in ~/tools, timer, one verified run, then remove the sandbox
cron). Laptop prerequisites verified 2026-10-28: wrangler + node are
system packages there.
- supabase-turso-coord-mirror (daily) — Supabase→Turso sync;
cloud-to-cloud. Same flake pass. Verified 2026-10-28: its tooling
(~/tools/turso-exec.py, supabase-exec.py, goal-workspace state) does
NOT depend on the retired ~/workspace/supabase tree.
- OpenChamber session long tail — sessions that still land in sandbox
worktrees. Drains as the queue pilot concludes; no separate action.
Unlock condition (the point of the program)
When 1–4 are done and the snapshot-first control jobs (creators,
pr-diff-review, issue-sweep-rotating) are re-pointed from ~/git/fleet
snapshots to gh-API discovery or laptop-side snapshots, the sandbox fleet
clones + worktree farm can be deleted (preconditions verified 2026-10-28:
zettel clone has 1 unpushed commit, nix clone 1 dirty file, ~148
worktrees attached — resolve those first).
Done when
- agent-queue-worker dispositioned by the pilot verdict and, if the
pilot continues, running laptop-side
- cold-store backup + drill running from laptop timers, one verified
run each, sandbox crons removed
- coord-mirror running from the laptop, one verified sync, sandbox
cron removed
- snapshot-first jobs re-pointed; sandbox fleet clones deleted
Acceptance criteria
- agent-queue-worker is dispositioned by the repo-queue pilot interim-check verdict (2026-10-28 17:25 CDT) and, if the pilot continues, runs laptop-side.
- cold-store-nightly-backup and the restore drill run from laptop timers with one verified run each; the sandbox crons are removed.
- supabase-turso-coord-mirror runs from the laptop with one verified sync; the sandbox cron is removed.
- Snapshot-first control jobs are re-pointed off the sandbox fleet clones, the clones' outstanding state (1 unpushed zettel commit, 1 dirty nix file, ~148 worktrees) is resolved, and the sandbox fleet clones are deleted.
Activitydeveloping-today commented on Oct 28, 2026 dezren39 commented on Oct 28, 2026 Intake review
- Related: Gated on the repo-queue pilot interim check (today, 2026-10-28 17:25 CDT) for item 1; the classification source is
workspace/job-classification-2026-10-28.md in hatch-personal. Labelled meta/epic — this is a program tracker, not a single fix.
- Notes: Intake only; the body already carries items, an unlock condition, and a Done-when list, which the monitor has formalized as an Acceptance criteria section. Effort/l reflects the multi-item program.
- Risks: Item 1 must not move before the pilot verdict (mid-pilot migration would contaminate the Phase 2 measurement). The unlock step deletes sandbox clones — the listed preconditions (unpushed zettel commit, dirty nix file, ~148 worktrees) are destructive if skipped.
- Suggested approach: Work the items in order after the interim-check verdict lands; keep per-item progress as comments here rather than per-item issues, per the fleet's one-issue-per-set rule.
dezren39 commented on Oct 28, 2026 Progress 2026-10-28 (same day, at Drew's direction to start immediately):
- Item 3 (coord-mirror): DONE. Script + state ported to laptop ~/tools/supabase-mirror/, daily systemd timer (06:12 CDT), sandbox cron removed. Verified with a real sync: workers 32, tasks 736, events_new 2690, last_event_id 20842. Porting surfaced and fixed three latent bugs: the script lived in the retired ~/workspace/supabase tree (would have broken the 10-29 run), its helper turso-exec.py was sandbox-only with a hardcoded /home/hatch token path, and a missing import os in that helper (fixed in the repo copy too).
- Item 2 (cold-store): DONE. Nightly: wrapper + timer (03:12 CDT) on the laptop, Drive credentials ported, verified full run (all steps ok; D1 filed, manifest synced, 14 objects cold, within budget). Restore drill: wrapper with the Jan/Apr/Jul/Oct gate + monthly timer; verification run PASSED against the backup the laptop nightly had just produced (rehydration sha256 verified; D1 backup a content-equal subset of live). Both sandbox crons removed.
- Item 1 (agent-queue-worker): still gated on today's 17:25 pilot interim verdict, as planned.
- Item 4 + unlock: unchanged, drain with the pilot.
Remaining on this issue: item 1 disposition, item 4, and the snapshot re-pointing + clone deletion. dezren39 commented on Oct 28, 2026 Update 2026-10-28 ~11:50 CDT:
- Mirror RETIRED (item 3 closed by retirement, not migration): Drew's call — the twice-daily Supabase pg_dump backup to R2 covers the durability concern, and the mirror was observation-only groundwork for a possible queue move to Turso (no active move plan; rebuild takes a day if it revives). Laptop timer disabled + units removed; the Turso muse-meta copy is frozen at 32 workers / 736 tasks / 20,842 events. The sync script stays in ~/tools/supabase-mirror/ (and in hatch-personal laptop/tools/) for that rebuild.
- All-services-in-nix (Drew, same day): the three surviving migrated services (supabase-backup, cold-store-nightly, cold-store-drill) were hand-written user units — now declared in the flake: laptop-backups: declare supabase + cold-store services in the flake (code#1723) dezren39/darwin-nix#1042 extends modules/laptop-backups.nix in the repoArchive pattern. Defaults enable them under the host's existing services.laptop-backups.enable, so merge + a laptop switch activates them; the hand-written unit files are removed immediately after that switch (tracked here so it doesn't drift). Parse-verified on the laptop. New standing rule recorded: no new non-nix-backed services.
dezren39 commented on Oct 28, 2026 Final state 2026-10-28 ~12:20 CDT — the laptop-service consolidation is code-complete:
- amd: laptop services live in this flake — relocate modules from dezren39/nix, add repo-keeper + autocommit (code#1723) #1740 (merged): laptop-backups + codex-remote-control relocated from dezren39/nix into nixos/home/ (amd imports by path; zero inputs.dezren39-nix references remain); new laptop-repo-keeper (hourly) + laptop-autocommit (1-min tracked sweeps for openclaw/hatch/hatch-personal + daily untracked review).
- Remove laptop modules (moved to the code flake, code#1723) dezren39/darwin-nix#1043 (merged): the modules + homeModules output removed from the Darwin flake.
- repo-keeper: tracked-files only + timeout fix (code#1723) #1745 (merged): keeper fixes from its first live runs (timeout-vs-function bug; tracked-only commits).
- Eval proof: the amd config evaluates with all 17 user timers, incl. supabase-backup, cold-store-nightly/drill (from the relocated module), laptop-repo-keeper, laptop-autocommit-{openclaw,hatch,hatch-personal}, laptop-untracked-review.
- First runs (by hand, pre-switch): keeper pulled cairn +6 / nix +2 / opencode +2 / hatch +7 (ff), committed + pushed openclaw's drift; untracked review found nothing to classify. Report-only flags: 28 MiB tracked job log in hatch-personal; 35 MiB tracked codedb.snapshot in openclaw-personal.
- Remaining: ONE step — on the laptop needs Drew's sudo (no passwordless sudo, no auto-upgrade unit on this machine). The command is in Drew's chat. Until then the hand-written supabase/cold-store timers are restored and firing on schedule (next supabase 16:42); after the switch they must be deleted (home-manager owns them) — the switch command Drew has includes that rm.
dezren39 commented on Oct 28, 2026 CLOSED OUT 2026-10-28 ~15:25 CDT — the consolidation is LIVE:
- Switch completed on amd (generation xzwi99z…): the laptop now runs the flake with laptop-backups + codex-remote-control relocated in-repo, the supabase/cold-store units flake-owned, and the new keeper/autocommit/review timers active. First switch attempt failed on a single transient builder failure under system-units; the identical configuration built fully on retry with no code changes, and the second switch activated cleanly.
- Verified live: user timers include laptop-repo-keeper (hourly), laptop-autocommit-{openclaw,hatch,hatch-personal} (every minute), laptop-untracked-review (daily), supabase-backup, cold-store-nightly/drill — unit files are home-manager store symlinks. The keeper service was started under systemd: Result=success, 23 primaries swept.
- Keeper flags standing: ~/git/code primary parked on feat/agy-proxy-warm-stream-json with 8 dirty proxy files (left alone by design — a human/lane decision); a 'developing-today' primary on master with 9 dirty entries; theme-store diverged from its archived upstream; roc fetch exceeds the 60s timeout (degrades gracefully).
- Deploy note: the switch ran from a clean worktree at origin/main (~/git/code-deploy) because the primary is parked; return deploys to the primary once it is back on main.
dezren39 commented on Nov 11, 2026 🤖 Agent note · task 14894 — timer installed + flake merged; the catch-up sync cannot complete with the current script shape (follow-on #8636 / task 14960)
- Agent: queue worker (repo-worker-code), lane code-c
- Session / ID: task 14894
- Found via: queue claim · lane code-c (execution lane: direct)
Done:
- Laptop user timer installed and enabled:
supabase-turso-coord-mirror.timer (daily OnCalendar=*-*-* 04:24:00, Persistent=true, 15m randomized delay) → supabase-turso-coord-mirror.service (oneshot, ExecStart=~/tools/supabase-mirror/sync_agent_to_turso.py, 30m timeout). Verified live: systemctl --user list-timers shows it enabled with the next run scheduled.
- Flake codification merged: PR feat(nixos): supabase-turso coord-mirror timer in the flake (#1723) #8631 (merge sha 1fe984d) adds
nixos/home/supabase-turso-coord-mirror.nix + the host import/enable, and registers the timer in doc/fleet-schedule-registry.md (Codex P1, fixed in the same PR). The next nixos-rebuild switch replaces the hand units with identical store units.
Blocked — one verified sync: the acceptance's sync half cannot complete with the current tooling shape, measured live this run:
- Watermark
state.json: last_event_id 20842, last_run_utc 2026-10-28T16:21:38Z. Backlog via the script's own Management-API route: workers 34, tasks 8,505, events after the watermark: 195,484, checkpoints 2 (count queries answer in 2–8 s; the API is healthy).
- A manual run's fetches eventually completed and wrote a 102 MB
sync.sql (~204k statements), but turso-exec.py sends ALL of it as ONE libSQL pipeline request: no completion after 31 minutes (connection live, client idle) — killed. A second attempt never got past the unbounded single-query events fetch inside 500 s. state.json never advanced. (The mirror's upserts + INSERT OR IGNORE make a re-run idempotent, so the killed attempts left no partial-state hazard.)
Routing: task 14894 is dep-blocked on follow-on task 14960 (issue #8636: paginate the events fetch, chunk the Turso apply into bounded pipeline batches in original order, bound the fetch with a curl max-time — transport shape only, mirror semantics unchanged). When task 14960 completes, task 14894 auto-releases; the next holder runs one sync, verifies state.json has advanced, and completes it. Until then, the daily timer will keep attempting the catch-up and timing out at the service's 30-minute cap — that is the visible symptom of #8636, not a new defect.
dezren39 commented on Nov 11, 2026
Coord-mirror catch-up status (task 14960, for #8636)
The chunked catch-up for the supabase→turso coord mirror is running on the laptop (restarted 2026-11-11 ~14:11Z after transport hardening: turso-exec gained a 300s request timeout + retries, sync gained an 1800s backstop; all statements are INSERT OR IGNORE). Fetch completed (195,497 events paged by id cursor); chunked apply is in progress at ~1–2 min per 1,000-statement batch and will take several hours unattended. state.json advances only on full completion. Full detail, including a correction about an earlier timestamp misread by this lane, is on #8636. Task 14894's final verification unblocks when task 14960 completes. dezren39 commented on Nov 11, 2026
Coord-mirror update for #1723 (via #8636, task 14960 — done): the Supabase -> Turso coord mirror now actually syncs. The chunked catch-up from the 2026-10-28 watermark completed (195,497 events in 40 id-cursor pages, 205 bounded apply batches, exit 0; state.json at last_event_id 217348), and a timer-service run (supabase-turso-coord-mirror.service, Result=success) completed an incremental sync in 17m24s inside its 30-minute timeout, advancing state.json to last_event_id 217358 / last_run 2026-11-11T20:40:21Z. One extra fix was needed for timer runs: the script now falls back to the ~/.config/bws/access-token file when BWS_ACCESS_TOKEN is absent from the systemd environment. Known measured caveat: 981 coord_tasks rows are skipped per run by a pre-existing dedupe_key UNIQUE collision in the mirror's upserts (documented on #8636; a semantics fix is separate from the transport fix). Full evidence: #8636 (comment) dezren39 commented on Nov 11, 2026 🤖 Agent note · verified — Task 14960 / #8636 transport fix completed. Laptop catch-up fetched 195,497 events and applied all 205 batches with SYNC_EXIT:0; state advanced beyond 20842. The subsequent timer-triggered incremental service run applied the remaining 10 events and succeeded in 17m23.985s, below the 30-minute service timeout; final state is event 217358. The run reported 981 statement errors, with the known coord_tasks.dedupe_key UNIQUE-collision behavior tracked separately in #8644. Evidence is in #8636 and ~/tools/supabase-mirror/catchup3-14960.log plus the systemd journal. dezren39 commented on Nov 11, 2026 Agent note - task 14894 resumed and verified done (lane code-b)
Verification (fresh, 2026-11-11T20:55Z):
Outcome: task 14894 completes as already_done - its acceptance was met by the earlier timer work on this task plus the task 14960 transport fix. Stale status/blocked and queue/blocked labels from the dep-block period are removed in the same pass.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|