Skip to content

I3180 — Entering a checkout whose executable is missing or stale starts one background build and says building

When the entry hook finds no executable or a stale one, start one deduplicated, detached build under the shared build lock, report 'building' in the banner and the runtime state, and let the next entry or client start the server once it finishes; never compile synchronously in the shell.

BLOCKED wave 1 · p2 · implementation profile · parallel safe

Part of runtime-lifecycle — One usable server per checkout starts, attaches, stops and reports its state without races or hidden kills.

Blocked. This issue cannot start until I3179 is done. The status is derived from that, not declared.

Objective

When the entry hook finds no executable or a stale one, start one deduplicated, detached build under the shared build lock, report 'building' in the banner and the runtime state, and let the next entry or client start the server once it finishes; never compile synchronously in the shell.

Why

Owner standing order 2026-10-12: entering a repository must always end with the server, the mesh and the UI up, building automatically. bin/majordomus-env deliberately never builds and disables auto-start when stale (comment lines 3-7, 56-66), so a fresh clone with direnv allow has no server until a person runs just build. Sources: chatgpt-majordomus:c233#0, chatgpt-majordomus:c233#2.

Current state

Verified: bin/majordomus-env never builds; bin/majordomus-mcp's launcher can; lib/rust_bin.sh holds the build lock and free-space floor; PR #1312 (in flight; its ADR is not on master yet) makes an MCP client always get a server.

Desired state

One background build per stale generation, visible as state 'building', refused below the disk floor with the reason.

Scope

  • bin/majordomus-env
  • lib/rust_bin.sh
  • test/cases/191_entry_races.sh
  • docs/WORKTREES.md

Out of scope

  • Building inside the prompt's critical path
  • Building in a repository that only adopts the layer

Dependencies

Acceptance criteria

  • Ten shells entering a cold clone start one build
  • The shell returns in its banner budget while the build runs
  • A build below the disk floor is refused and named

Validation

  • majordomus plan validate
  • bash test/run.sh 191_entry_races

Evidence required

  • case_entry_builds_once

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/I3180.yaml. Read it back with majordomus plan show I3180.

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