Skip to content

A deploy aligns every present submodule checkout; tracker and consumer share one dirty predicate (card a1e1af51) - #5525

Merged
joelteply merged 3 commits into
canaryfrom
cormac/deploy-submodule-align
Oct 27, 2026
Merged

joelteply merged 3 commits into
canaryfrom
cormac/deploy-submodule-align

Conversation

@joelteply

@joelteply joelteply commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Why

A node that can't deploy keeps its residents on old code. Every deploy is a cold start for each mind's prefix, and a wedged deploy tree forces a hand repair plus an extra restart. This is lifecycle work under plan path step 1 (Fast): the deploy owner must work without a hand.

On enrico, 2026-10-27, deploy-consume's git submodule update touched only initialized submodules, and the engine checkout was present but unregistered: its .git file points into .git/modules, and .git/config has no entry. So every move across an engine pin left core/vendor/llama.cpp behind:

  • rolling back to e653e46 (pin 7d8bff696) left it at 741b0175b;
  • the next forward deploy (3527c7d, pin 741b0175b) left it at 7d8bff696.

The two checks then disagreed. The tracker counted that pointer as dirty, while the consumer ignored submodules entirely, even though the tracker's comment says "same rule the consumer applies". So deploy.track.decision read RefuseDirty and no deploy landed until I realigned it by hand, twice.

What

continuum_git::submodules, added to the crate that already judges the deploy tree's index.lock for the consumer:

  • has_operator_work, one predicate over git status --porcelain=v2 --untracked-files=no:
    • a changed file is work, and so is a change inside a submodule;
    • a moved submodule pointer is not, because aligning it is the deploy's job.
    • deploy_consume and deploy_tracker both read it, so the two can't disagree again.
  • align initializes a present-but-unregistered checkout (git submodule init writes config only, never a clone), then runs git submodule update --quiet --recursive. Both of the consumer's checkout sites use it. An absent submodule stays absent.

Verified

  • Local (enrico, 2026-10-27, branch head 6e24c63; continuum-git is a leaf crate built with -j 1 niced): cargo test -p continuum-git --lib submodules → 2 passed.
    • a_moved_pointer_is_not_work_and_a_change_inside_is: the predicate over real porcelain-v2 lines for drift, a change inside a submodule, a file, and an unmerged entry.
    • a_present_unregistered_checkout_follows_the_pin_both_ways, with real git repos:
      • a deploy tree whose engine checkout is present and unregistered, as on enrico, follows the pin old → new → old;
      • before each align the tree is not operator work; after it, it reads clean;
      • a hand edit inside the engine checkout is work;
      • an absent submodule is never cloned.
  • Mutations (each run, then reverted):
    • skipping the init fails the pin test ("the engine checkout follows the core's pin");
    • counting a moved pointer as work fails both tests.
  • Not built locally: continuum-core (the consumer bin and the tracker module). CI is that compile; I'll post the receipt at this head.

Measured after deploy

Owner Cormac, at the next engine pin change on enrico:

  • the deploy consumer leaves git status clean;
  • the tracker never reads RefuseDirty on a submodule pointer;
  • the submodule HEAD equals LLAMA_CPP_PIN.

Removed / added

The consumer's two git submodule update calls and both copies of the dirty rule (the consumer's --ignore-submodules=all and the tracker's plain porcelain check) are replaced by the two shared functions. The new module is about 150 lines, most of it the real-git test.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

…sumer share one dirty predicate (card a1e1af51)

enrico, 2026-10-27: the consumer's `git submodule update` touched initialized
submodules only, and the engine checkout was present but unregistered. Every move
across an engine pin left core/vendor/llama.cpp behind (rollback to 7d8bff696
left it at 741b0175b; the next forward deploy left it at 7d8bff696). The tracker
counted that pointer as dirt while the consumer ignored submodules entirely, so
the node read RefuseDirty and took no deploy until a hand realigned it.

continuum_git::submodules (the crate that already judges the deploy tree's
index.lock for the consumer):
- has_operator_work: one porcelain-v2 predicate; a changed file or a change inside
  a submodule is work, a moved submodule pointer is the deploy's to align.
  deploy_consume and deploy_tracker both read it.
- align: initializes a present-but-unregistered checkout (config only, never a
  clone), then `submodule update --recursive`. Both of the consumer's checkout
  sites use it.

Tests with real git: a present, unregistered engine checkout follows the pin
old -> new -> old with a clean tree each time; a hand edit inside it is work; an
absent submodule is never cloned. Mutations: skipping the init fails the pin test;
counting a moved pointer as work fails both.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@joelteply joelteply changed the title A deploy aligns every present submodule checkout, and tracker and consumer share one dirty predicate (card a1e1af51) A deploy aligns every present submodule checkout; tracker and consumer share one dirty predicate (card a1e1af51) Oct 27, 2026
joelteply and others added 2 commits October 27, 2026 06:29
…, adding no spawn site (spawn_sites ratchet)

The consumer passes its own git_in; the crate's only subprocesses are in its tests.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…is the deploy's (Codex on #5525)

A staged gitlink (XY M.), a rename or copy, or anything but '.M SC..' is an
operator's work; the predicate used to read only the submodule's M/U flags.
Unit lines for staged and renamed gitlinks, and a real-git staged gitlink in
the deploy fixture. Mutation: accepting any XY on SC.. fails the unit test.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@joelteply

Copy link
Copy Markdown
Contributor Author

Independent Codex review: PASS for b24ce3e. The staged-gitlink ownership blocker is fixed: only ordinary unstaged SC.. pointer drift is exempt; staged pointers, renames, unmerged entries and internal edits remain operator work. Reviewed shared tracker/consumer predicate and both alignment calls. Real-git fixture covers forward/backward pins, present unregistered checkout, staged pointer and absent uninitialized checkout. Owner reported mutation fails the staged-pointer assertion. Exact-head CI is green, including core/git tests, source hygiene, Windows MSVC check and installed-release handoff. Native Windows custody/standalone jobs were skipped; this is not fresh-install or live deployment proof. Platform consumer adoption remains a separate acceptance step.

@joelteply
joelteply merged commit 8b09fdb into canary Oct 27, 2026
18 checks passed
@joelteply
joelteply deleted the cormac/deploy-submodule-align branch October 27, 2026 11:58
joelteply added a commit that referenced this pull request Oct 27, 2026
…un one at a time (card bd3f9f12) (#5530)

#5525's real-git submodule test spawns git in the same test binary as
index_lock's dead-lock test. may_work_on counts a git whose cwd cannot be read
as possibly working in the tree, and on ubuntu an exiting git reads that way, so
the lock was Held: 'no git runs in a fresh tempdir' (index_lock.rs:238, run
40512737561, ubuntu-latest). A crate test mutex, GIT_PROCESSES, is held by both.
macOS reads other processes' cwd and never reproduced it (0/12 on canary); with
the mutex, 3/3 local runs pass.


Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant