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

I2059

A rebuild never replaces the executable a live lease names

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 2
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 I2059

majordomus plan verify I2059

majordomus plan done I2059

What it is

Objective
Stop an entry point from rebuilding the executable in place under a running shared server, and make the server that follows a superseded one bind the address the old one was serving, or say that it did not.
Why
bin/majordomus-cli rebuilds apps/majordomus-cli/target/debug/majordomus whenever the sources moved. In the primary checkout that file is the one the shared server was started from, and since #747 a replaced executable supersedes the lease. On 2026-10-08 a server the owner had ordered onto every interface (0.0.0.0:57547, started 2026-10-07T18:49Z) lost its lease at 08:06:32Z: .ai/local/state/mcp/server.log records 'superseded lease: the server was started from ... target/debug/majordomus and that file has been replaced since', after a diagnostic build in the primary. The integrator reported the same after every `prs refresh`, `plan` and `drain` run from the primary following a fast-forward. The successor was started by a launcher whose environment did not carry MAJORDOMUS_HTTP_HOST, so it bound loopback on another port; new sessions were answered 409 lease_lost by the old server and nobody was told the address had changed. #747 made the consequence visible. It did not remove the cause.
Now
A build in a checkout with a ready server replaces the file its lease names. The lease is superseded, the next launcher starts a successor on the default address, and the address the old server was serving is not carried over or mentioned.
Wanted
Building in a checkout leaves its ready server ready on the same address until something restarts it on purpose: the build writes beside the leased executable and a restart swaps it, or the server runs from a copy. When a server is superseded, its successor serves the address the old one published, or the supersession is reported with both addresses on every surface that reports a server's standing.
Done when
unknown: the record declares no `completion`
Risk
unknown: the record declares no `risk`

Acceptance

  • A build run in a checkout whose server is ready leaves `serve status` reporting that server ready on the address it had before the build
  • A successor started after a supersession binds the host and port the superseded lease published, or `serve status` names both addresses and why they differ
  • A server bound through MAJORDOMUS_HTTP_HOST or --host is not replaced by a loopback server without a line in server.log saying so
Validation
bin/majordomus plan validateMJ_TEST_JOBS=4 bash test/run.sh <the case this issue adds>
Evidence required
rebuild_keeps_server_ready_casesuccessor_address_case
Evidence present
unknown: the record carries no `evidence` entries

Scope

Touches
bin/majordomus-clilib/rust_bin.shapps/majordomus-cli/src/lease.rsapps/majordomus-cli/src/commands/serve.rsdocs/MCP.mdtest/cases
Not
unknown: the record declares no `non_scope`
Depends on
unknown: the record declares no `depends_on`
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-08
Updated
2026-10-08
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 I2114; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares test/cases with I2282; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares test/cases with I2410; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares test/cases with I2411; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares apps/majordomus-cli/src/commands/serve.rs with I2412; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares apps/majordomus-cli/src/lease.rs with I2413; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares test/cases with I2653; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares lib/rust_bin.sh with I2713; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares lib/rust_bin.sh with I2714; they may not run concurrentlymajordomus plan validate
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/MCP.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