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

I2163

A client never attaches to a server of another version without saying so, and a newer client replaces an older server

Where it stands

devtask.issue
Readiness
complete completion is recorded and every required evidence token is present
Status
DONE
Can start
not now
Milestone
Milestone status
ACTIVE
Wave
1
Waiting on
none
Holds back
none
Behind it in all
0
Evidence
2 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 I2163

majordomus plan verify I2163

majordomus plan done I2163

What it is

Objective
Make the election compare versions through the one standing verdict: a newer client takes over in an ordered hand-off, an older client attaches and says it is older.
Why
lease::elect and ask compare name, repository_id and leaseholder, never the version (apps/majordomus-cli/src/lease.rs:896-920). The superseded check covers only a binary replaced at the same path (apps/majordomus-cli/src/lease.rs:695-709); the installer puts each version in its own directory under ~/.local/share/majordomus/versions/<v>/, so an upgrade changes the path and nothing is superseded. A new client then attaches to the older server, and the mismatch is reported only as an Outdated warning by server::standing_at (apps/majordomus-cli/src/capability/builtin/server.rs:410-424, apps/majordomus-cli/src/capability/builtin/health.rs:606), which MCP clients never see. docs/MCP.md:49 presents supersession as covering yesterday's code. Baseline audit of 2026-10-09 at master 1fb8d6be44, failure gap 3, premise 3 and drift 7.
Now
After an upgrade through the installer, new clients are served by the old version until it idles out.
Wanted
ask treats a lease whose version differs from crate::VERSION through the verdict server::standing_at already gives: a newer client takes over in an ordered hand-off, the old server's sessions moving on as I2127 makes them; an older client attaches and reports the difference in its initialize answer; docs/MCP.md says what each case does.
Done when
unknown: the record declares no `completion`
Risk
unknown: the record declares no `risk`

Acceptance

  • A client of version N+1 started beside a server of version N installed at another path ends with one server of N+1 and the old server's sessions re-attached
  • A client of version N-1 attaching to a server of version N reports the difference in its initialize answer
  • One function decides the version verdict for elect, serve ensure and server.status
Validation
bin/majordomus plan validatecargo test --test serve_lifecycle --test server_statusMJ_TEST_JOBS=4 bash test/run.sh <the case this issue adds>
Evidence required
newer_client_replaces_older_server_testolder_client_told_test
Evidence present
newer_client_replaces_older_server_testolder_client_told_test

Scope

Touches
apps/majordomus-cli/src/lease.rsapps/majordomus-cli/src/capability/builtin/server.rsapps/majordomus-cli/src/mcp/protocol.rsapps/majordomus-cli/src/commands/serve.rsapps/majordomus-cli/tests/serve_lifecycle.rstest/casesdocs/MCP.md
Not
unknown: the record declares no `non_scope`
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-09
Updated
2026-10-14T22:15:01Z
Started
2026-10-14T22:14:26Z
Verified
2026-10-14T22:14:44Z
Completed
2026-10-14T22:15:01Z

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

Nothing is wrong with these records.