Skip to content

I3831 — A hook never starts a cold cargo build: a stale executable is the installed release, or the check is skipped and says so

Make bin/majordomus-cli, when run from a git hook (MAJORDOMUS_HOOK set) with a missing or stale executable, run the installed release the way `mcp` already does (mj_rust_installed, ADR 0172), and when there is none, skip with a line naming what was not checked, instead of building the crate.

READY wave 0 · p1 · implementation profile · parallel safe

Part of ci-critical-path — The critical path from a change to its verdict, and from a merge to its verified deploy, runs under a minute warm.

Ready. Every dependency is done, so majordomus plan start I3831 will be accepted.

Objective

Make bin/majordomus-cli, when run from a git hook (MAJORDOMUS_HOOK set) with a missing or stale executable, run the installed release the way `mcp` already does (mj_rust_installed, ADR 0172), and when there is none, skip with a line naming what was not checked, instead of building the crate.

Why

On 2026-10-20 the pre-commit worktree guard of feature/the-tailnet-finds-a-trusted-machine waited 60 s on the shared build directory's lock and then compiled every dependency cold in ~/.cargo/build-private, at a load of 77, for a check that takes a second.

Current state

bin/majordomus-cli builds whenever the executable is stale unless MAJORDOMUS_BIN or MAJORDOMUS_NO_BUILD is set; only `mcp` falls back to the installed release (use_installed_for_mcp).

Desired state

No hook starts cargo; a hook run with a stale executable names the release it used or the check it skipped.

Scope

  • bin/majordomus-cli
  • lib/rust_bin.sh
  • .githooks
  • docs/WORKTREES.md

Out of scope

  • Changing which checks CI requires
  • Claude Code permission settings, which are the owner's to paste

Dependencies

None. This issue is a root of the graph.

Acceptance criteria

  • With a stale executable and an installed release, a hook's guard runs the installed release and says so on stderr, and no cargo process starts
  • With a stale executable and no installed release, the hook skips the check with a line naming it and exits as its gate class says
  • Outside a hook the launcher builds as before

Validation

  • bash test/run.sh 3831_a_hook_never_starts_a_cold_build 96_worktree_topology
  • bin/majordomus plan validate

Evidence required

  • a_hook_never_starts_a_cold_build_test

Evidence

None recorded. Every token above needs a command or an artifact behind it before this issue can be completed; narrative is refused.

Timeline

started
—
verified
—
completed
—

Those three fields, the evidence above and the state of the dependencies are all the status is made of. There is no status field to disagree with them.

Canonical record: .ai/repo/project/issues/I3831.yaml. Read it back with majordomus plan show I3831.

Searches the titles and descriptions of every page this site publishes.