I2848 — A pre-push gate that runs the executable does not wait on another worktree's build
The before-push gates that run the executable (economics-claims runs `cargo run -- economics check`) use a binary that already exists for the commit's crate, or report the lock wait apart from the gate's own time, so a push is not held for half an hour behind another worktree's build.
READY wave 0 · p1 · implementation profile · parallel safe
Ready. Every dependency is done, so majordomus plan start I2848 will be accepted.
Objective
The before-push gates that run the executable (economics-claims runs `cargo run -- economics check`) use a binary that already exists for the commit's crate, or report the lock wait apart from the gate's own time, so a push is not held for half an hour behind another worktree's build.
Why
Measured on 2026-10-21. #1753's pre-push at 86908522991 took 2872 s against a bound of 180 s, and 2158 s of that was economics-claims. .ai/repo/ci/structure-durations.tsv records the same gate at 6 s, so nearly all of it was the `cargo run` waiting for the shared build directory's lock while other sessions compiled. The branch changed no Rust: the crate was byte-identical to master's, and a shared master binary for it existed under ~/.cache/majordomus-master-bin. Nine concurrent pre-pushes on one machine had already led a3 and 9c to allow one push at a time.
Current state
economics-claims runs `cargo run --quiet --manifest-path apps/majordomus-cli/Cargo.toml -- economics check` (.ai/repo/ci/gates.yaml). It compiles or waits for the shared build lock even when MAJORDOMUS_BIN names a binary of an identical crate. run-plan reports the wait as the gate's own duration.
Desired state
A before-push gate that runs the executable uses MAJORDOMUS_BIN, or the bin/majordomus resolution, when it names a binary built from the same crate inputs, and builds only otherwise. run-plan reports time spent waiting for the build lock apart from the gate's own run. A case shows that a branch with no crate change runs economics-claims without invoking cargo.
Scope
- .ai/repo/ci/gates.yaml
- scripts/ci/run-plan
- .ai/repo/project/issues/I2848.yaml
Out of scope
- The shared build directory's own locking and reclaim (I2713, I2787)
- The one-push-at-a-time rule between sessions, which is coordination on the board
Dependencies
None. This issue is a root of the graph.
Acceptance criteria
- With MAJORDOMUS_BIN naming a binary of the commit's crate, economics-claims runs no cargo process
- run-plan's summary states lock wait and gate time separately for a gate that built
- Case 3248 fails on a run-plan that calls cargo for economics-claims while a matching binary is named
Validation
- bin/majordomus plan validate
- bash test/run.sh 3248_a_pre_push_gate_does_not_wait_on_another_build
Evidence required
- a_pre_push_gate_reuses_the_binary_case
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/I2848.yaml. Read it back with majordomus plan show I2848.