Skip to content
Cockpit0.29.0
A snapshot: read at commit 707a04c7ce8 on 2026-10-18T00:06:01Z by majordomus 0.29.0. Nothing on this page is read again. See it live

I2714

One build directory never serves two worktrees' jobs at once

Where it stands

devtask.issue
Readiness
ready no dependency and no gate holds it; nobody has started it
Status
READY
Can start
startable
Milestone
Milestone status
ACTIVE
Wave
0
Waiting on
none
Holds back
none
Behind it in all
0
Evidence
0 of 1
A move writes the repository: it stamps one field of this issue's record and appends one event to the ledger, and a commit will carry both.
The same moves from a terminal

majordomus plan start I2714

majordomus plan verify I2714

majordomus plan done I2714

What it is

Objective
Prevent a build directory set through CARGO_BUILD_BUILD_DIR from being used by jobs of two different worktrees at the same time, so that one job's build cannot replace the artifacts another job is testing.
Why
2026-10-14 ~17:30Z: the rust job judging I1501 ran in the private build directory b6-zeta while a landing chain of another worktree and an agent built there too; about 600 doctests failed with \"no such file ... libmajordomus_cli-8669a524ae357c6a.rlib\" and projection-closure \"could not answer\". None of it was the head's defect; the 40-minute job had to be rerun. ADR 0139 keys the default build directory per worktree, but an exported CARGO_BUILD_BUILD_DIR overrides it for every worktree that inherits it.
Now
mj_cargo_bounded waits on cargo's lock and falls back to a private directory only when the shared one is busy beyond a minute; an explicitly exported directory used by two worktrees is accepted silently.
Wanted
A build records which worktree holds its build directory while it runs; a build from a different worktree that finds the directory held refuses, or moves to a directory of its own, and says so, before it compiles anything.
Done when
unknown: the record declares no `completion`
Risk
unknown: the record declares no `risk`

Acceptance

  • Two worktrees building with the same CARGO_BUILD_BUILD_DIR at once: the second refuses or relocates with a line naming the holder
  • One worktree's repeated builds in its own directory are unaffected
Validation
bin/majordomus plan validate
Evidence required
build_dir_has_one_holder_case
Evidence present
unknown: the record carries no `evidence` entries

Scope

Touches
lib/rust_bin.shdocs/DEVELOPMENT_RUNTIME.md.ai/repo/adrs/0139-*.mdtest/cases
Not
unknown: the record declares no `non_scope`
Depends on
none
Priority
p1
Profile
implementation
Parallel safe
true
Owner
unknown: the record declares no `owner`

The work so far

Branches
none
Merged
none
Commits
0
Trunk
master
Sessions
none
Created
2026-10-14
Updated
2026-10-14
Started
unknown: the record declares no `started_at`
Verified
unknown: the record declares no `verified_at`
Completed
unknown: the record declares no `completed_at`

Synchronisation

Adapter
scripts/github-sync
Repository
unknown: the derived plan's header carries no repository
External issue
unknown: a live GitHub state; this executable makes no network call, so only `scripts/github-sync --check` can answer it
State there
unknown: a live GitHub state; this executable makes no network call, so only `scripts/github-sync --check` can answer it

Findings

LevelCodeMessageReproduce
WARNscope_conflictshares test/cases with I2716; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares test/cases with I2717; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares test/cases with I2718; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares test/cases with I2720; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares test/cases with I2723; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares docs/DEVELOPMENT_RUNTIME.md with I2731; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares test/cases with I2734; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares test/cases with I2740; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares test/cases with I2742; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares test/cases with I2747; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares test/cases with I2760; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares test/cases with I2786; they may not run concurrentlymajordomus plan validate