Skip to content

I2414 — mesh.state and mesh.peers answer a filtered summary that fits one tool answer

Give mesh.state and mesh.peers inputs that narrow and summarise: a kind (sessions, claims, handovers, reviews), open-only, mine-only, a scope or PR substring and a limit, with a counts-only summary by default.

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

Give mesh.state and mesh.peers inputs that narrow and summarise: a kind (sessions, claims, handovers, reviews), open-only, mine-only, a scope or PR substring and a limit, with a counts-only summary by default.

Why

Both take no input (apps/majordomus-cli/src/capability/builtin/mesh.rs:1184-1216). Measured on 2026-10-10: mesh.state 449 kB and mesh.peers 313 kB on this Mac's server at 23:50Z (165 claims, 126 sessions, 133 overlaps, 15 handovers, 30 reviews; the live items alone about 150 kB), and one 80-event page of mesh.events came to 83k characters. Every MCP client's tool-result limit is exceeded, so every read went through a saved file and jq.

Current state

Whole-state answers only; mesh.events is the only paged read.

Desired state

A default answer under 16 kB with counts and the newest items; filters that return exactly the asked slice; the full state still available on request.

Scope

  • apps/majordomus-cli/src/capability/builtin/mesh.rs
  • apps/majordomus-cli/src/mesh/state.rs
  • apps/majordomus-cli/src/mesh/page.rs
  • apps/majordomus-cli/src/cli.rs
  • apps/majordomus-cli/src/commands/mesh.rs
  • apps/majordomus-cli/src/cockpit/pages.rs
  • apps/majordomus-cli/src/integration/exclusive.rs
  • apps/majordomus-cli/tests/mesh_cooperation.rs
  • apps/majordomus-cli/tests/integration_across_machines.rs
  • apps/majordomus-cli/tests/reasoning_mesh.rs
  • scripts/lib/advisors/mesh-review.mjs
  • scripts/lib/advisors/contract.test.mjs
  • docs/claims/mesh-liveness-expiry.md
  • docs/claims/mesh-three-runtime-convergence.md
  • docs/MESH.md

Dependencies

None. This issue is a root of the graph.

What waits on this

Acceptance criteria

  • mesh.state with no input answers under 16 kB on a journal of 20 000 events
  • Each filter returns exactly the matching items, proved on a fixture state
  • The full answer is still available with an explicit input

Validation

  • bin/majordomus plan validate
  • cargo test --lib capability::builtin::mesh
  • cargo test --lib mesh::page
  • cargo test --test mesh_cooperation

Evidence required

  • mesh_state_filtered_test

Evidence

coverstypecommandresultat commit
mesh_state_filtered_testtestcargo test --lib -- mesh::page mesh::state capability::builtin::mesh; cargo test --test mesh_cooperation36 passed, 0 failed; mesh_cooperation 7 passed, 0 failed (code on master since 1eb8d5fa89b; re-run at master 01227a0)01227a0

Timeline

started
2026-10-17T11:59:31Z
verified
2026-10-17T12:00:04Z
completed
2026-10-17T12:00:18Z

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

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