Repository navigation
fix(deploy): the tracked checkout is a durable fact resolved every tick — a core built in a lease worktree tracked the lease and read "git fetch absent" for 4.5 h after the merge pruned it (card 790c6bcb) - #4248
Conversation
…ck — a core built in a lease worktree tracked the lease and read "git fetch absent" for 4.5 h after the merge pruned it (card 790c6bcb) The checkout the deploy decision tracks had two resolvers (`modules/deploy_tracker.rs:: from_env`, `bin/continuum.rs::tracked_repo_dir`), both `CONTINUUM_TRACK_REPO_DIR` else the repo root of `CARGO_MANIFEST_DIR` — wherever the binary was BUILT — and the tracker's copy resolved it once at construction. IntelMac, 2026-09-19 21:38Z → 02:0xZ: the running core had been built in the #4228 lease worktree; `airc work merge` pruned it; for 55 ticks the tracker read `SourceUnavailable { "git fetch canary absent" }` — a git failure, not the truth ("the checkout I track is gone") — while canary moved four tips past it. Every lease build on every node carries the same pointer. - `runtime::tracked_checkout` is THE resolver, both owners call it. The candidate (the recorded fact, else the build-time root) resolves to the DURABLE main working tree of its repo (`git rev-parse --path-format=absolute --git-common-dir`'s parent): a worktree resolves to the clone it came from, a plain checkout to itself. A candidate that is gone is `CheckoutError::Gone(path)`, a directory that is no checkout is `NotARepo`; both Display the fix (`set CONTINUUM_TRACK_REPO_DIR`). - `DeployTrackerModule` resolves on EVERY tick (one `is_dir` + one bounded git call) — the source no longer holds a dir; a vanished checkout is named by path in the tick's `SourceUnavailable`, on the first tick after. `tree_dirty` reads the same resolution. - `continuum install`'s core arm RECORDS the durable checkout it deployed from as `CONTINUUM_TRACK_REPO_DIR` (once; read mode records nothing), so the core built by an install from a lease tracks the clone, not the lease. - Test: a temp repo + worktree — the worktree resolves to main, main to itself, the pruned worktree is `Gone` by path, a plain dir is `NotARepo`. Receipt on IntelMac: with the key pinned by hand and the core rebooted onto fd1960e, the first tick read the tip (`deploy.track.request_written` tip 6d43075, running fd1960e) — the read this change makes automatic. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
|
APPROVE at exact head dc01e71. One resolver ( Nit, not a condition: |
The defect (card 790c6bcb)
The checkout the deploy decision tracks had two resolvers (
modules/deploy_tracker.rs::from_env,bin/continuum.rs::tracked_repo_dir), bothCONTINUUM_TRACK_REPO_DIRelse the repo root ofCARGO_MANIFEST_DIR— wherever the binary was BUILT — and the tracker's copy resolved it once at construction.IntelMac, 2026-09-19 21:38Z → 02:0xZ: the running core had been built in the #4228 lease worktree;
airc work mergepruned it; for 55 ticks (4.5 h) the tracker readSourceUnavailable { "git fetch canary absent" }— a git failure, not the truth ("the checkout I track is gone") — while canary moved four tips past it. Every lease build on every node carries the same pointer.The fix
runtime::tracked_checkout, called by both owners. The candidate (the recorded fact, else the build-time root) resolves to the durable main working tree of its repo (git rev-parse --path-format=absolute --git-common-dir's parent): a worktree resolves to the clone it came from, a plain checkout to itself. Gone →CheckoutError::Gone(path); a directory that is no checkout →NotARepo; both name the fix.SourceUnavailableon the first tick after.tree_dirtyreads the same resolution.continuum install's core arm records the durable checkout it deployed from asCONTINUUM_TRACK_REPO_DIR(once;--checkrecords nothing), so a core built by an install from a lease tracks the clone, not the lease.Tests
a_worktree_resolves_to_the_durable_main_checkout_and_a_pruned_one_is_named_gone: temp repo + worktree — worktree → main, main → main, pruned worktree →Goneby path (message names the key), plain dir →NotARepo.Receipt on IntelMac: 33 passed / 0 failed (
tracked_checkout+deploy_tracker+source_hygiene, all ratchets green), REAL_EXIT 0;cargo check --lib --bin continuumREAL_EXIT 0. Live: with the key pinned by hand and the core rebooted onto fd1960e, the first tick read the tip (deploy.track.request_writtentip 6d43075, running fd1960e) — the read this change makes automatic.Faster or slower?
Neither for a citizen: two bounded git calls per 5-minute tick on the tracker's own task, off the cognition path.
🤖 Generated with Claude Code
https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE