Skip to content

I2413 — A linked worktree cooperates through its repository's running server, and a start that cannot ensure one says why

Mesh commands in a linked worktree with no server of its own use a running server of the same repository (the primary's, or the first ready one), and the session-start hook reports, never silently skips, when it cannot ensure a server.

DONE wave 0 · p1 · implementation profile · parallel safe

Part of the-mesh-works-out-of-the-box — The mesh works out of the box: trusted machines find each other by every means and their sessions cooperate from the first turn.

Objective

Mesh commands in a linked worktree with no server of its own use a running server of the same repository (the primary's, or the first ready one), and the session-start hook reports, never silently skips, when it cannot ensure a server.

Why

`majordomus mesh handover publish` in a linked worktree answered 'cooperation inactive ... no running server for this checkout' (apps/majordomus-cli/src/commands/mesh.rs:272-279) because the lease is per checkout (lease.rs:465-467). The workaround `serve ensure` in that worktree started a second server on *:8741 beside the primary's 127.0.0.1:8741 (2026-10-10). The start hook skips with 'not ensured' when the binary is unbuilt or stale (lib/capture.sh:1613-1620).

Current state

A worktree without its own server is off the mesh; the start hook skips silently.

Desired state

A worktree's mesh commands reach the repository's running runtime; a start that ensures nothing prints the reason and the remedy.

Scope

  • apps/majordomus-cli/src/commands/mesh.rs
  • apps/majordomus-cli/src/lease.rs
  • lib/capture.sh
  • docs/MESH.md
  • test/cases

Dependencies

None. This issue is a root of the graph.

Acceptance criteria

  • In a linked worktree with no server, `mesh claim` and the mesh reads reach the primary's running runtime, and `mesh handover publish` through that borrowed server is refused by name (borrowed_server, ad249172cce): it would publish a handover of the other checkout
  • No command run in a worktree starts a server bound beyond loopback
  • A start whose binary is stale prints why no server was ensured and what to run

Validation

  • bin/majordomus plan validate
  • cargo test --test mcp_shared

Evidence required

  • worktree_publishes_through_primary_test

Evidence

coverstypecommandresultat commit
worktree_publishes_through_primary_testcivalidate run 39438896504 at master 9a5a9b77520 (e8235eece2d and ad249172cce are its ancestors): rust (3) job 118758853049 runs tests/server_status.rs a_worktree_without_a_server_asks_the_primarys_for_the_mesh; rust (2) job 118758902449 runs commands::mesh::tests::a_worktree_without_a_server_borrows_the_primarys_first and a_publish_through_a_borrowed_server_is_refused_in_textsuccess (all three ok; the run's rust, suite and structure jobs green)573df96

Timeline

started
2026-10-20T22:50:43Z
verified
—
completed
2026-10-20T22:51:23Z

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/I2413.yaml. Read it back with majordomus plan show I2413.

Searches the titles and descriptions of every page this site publishes.