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

I2700

A lease probe asks a cheap liveness route, and a server holding another lease token is not taken for the leaseholder

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
1
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 I2700

majordomus plan verify I2700

majordomus plan done I2700

What it is

Objective
Point the lease probe at a liveness route that answers without resolving the index and carries the repository id, the leaseholder and a digest of the lease token, and judge a process whose digest differs from the lease's not the leaseholder.
Why
Split from I2126 on 2026-10-14. I2126 delivered the busy-pool half (every request answered on a thread of its own up to MAX_HANDLERS) and its desired_state said 'Not done here' of the liveness probe route and the token check, while its acceptance criteria still required both, so it could never close. The probe still asks GET /, the most expensive route, and compares name, repository_id and leaseholder but not the lease token, pid or started_at, so another process answering GET / for the same repository is taken for the leaseholder. Baseline audit of 2026-10-09 at master 1fb8d6be44, the fencing row.
Now
lease::ask (apps/majordomus-cli/src/lease.rs, behind lease::probe, lease::probe_reply and lease::probe_patiently) sends GET / and compares the index document's name, repository_id and leaseholder key. The lease document carries a token (apps/majordomus-cli/src/lease.rs, LeaseDocument.token) that no answer exposes. /api/v1/live and /api/v1/ready exist (apps/majordomus-cli/src/capability/builtin/health.rs) and the probe uses neither.
Wanted
The lease probe asks a liveness route that answers without resolving the index; the answer carries the repository id, whether the process holds the lease, and a digest of the lease token it holds, never the token itself; a probe that hears a digest other than that of the lease it read judges the answerer not the leaseholder. docs/MCP.md names the route and the comparison.
Done when
unknown: the record declares no `completion`
Risk
unknown: the record declares no `risk`

Acceptance

  • The lease probe asks a liveness route, not GET /, and the answer carries the repository id, leaseholder and a digest of the lease token
  • A process that answers the probe with a token digest other than the lease's is judged not the leaseholder
Validation
bin/majordomus plan validatecargo test --test lease_busy --test mcp_shared
Evidence required
probe_compares_the_token_test
Evidence present
unknown: the record carries no `evidence` entries

Scope

Touches
apps/majordomus-cli/src/lease.rsapps/majordomus-cli/src/http/router.rsapps/majordomus-cli/src/capability/builtin/health.rsapps/majordomus-cli/tests/lease_busy.rstest/casesdocs/MCP.md
Not
How requests are handed to handler threads and MAX_HANDLERS, which I2126 delivered
Depends on
Priority
p1
Profile
implementation
Parallel safe
false
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 I2701; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares docs/MCP.md with I2702; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares test/cases with I2706; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares test/cases with I2708; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares apps/majordomus-cli/src/capability/builtin/health.rs with I2709; they may not run concurrentlymajordomus plan validate