I3015 — serve and mcp discover the repository once, through the shared model
majordomus serve and majordomus mcp take the repository App::load discovered instead of discovering it again (commands/serve.rs and commands/mcp.rs today discover beside App::load), and env, web and guard read the same cell, so every entry point of the executable pays one discovery.
BLOCKED wave 1 · p0 · implementation profile · parallel safe
Blocked. This issue cannot start until I3014 is done. The status is derived from that, not declared.
Objective
majordomus serve and majordomus mcp take the repository App::load discovered instead of discovering it again (commands/serve.rs and commands/mcp.rs today discover beside App::load), and env, web and guard read the same cell, so every entry point of the executable pays one discovery.
Why
The second slice of I1105. The 2026-10-20 survey counted two discoveries at the startup of serve, serve status and mcp, and only App::load's discovery is timed, so the others are never measured.
Current state
serve.rs and mcp.rs call Repository::discover and then App::load, which discovers again.
Desired state
One discovery at each entry point, measured where it happens.
Scope
- apps/majordomus-cli/src/commands/serve.rs
- apps/majordomus-cli/src/commands/mcp.rs
- apps/majordomus-cli/src/commands/env.rs
- apps/majordomus-cli/src/commands/web.rs
- apps/majordomus-cli/src/commands/guard.rs
- apps/majordomus-cli/src/app.rs
- apps/majordomus-cli/tests/hot_path.rs
Out of scope
- The capabilities' Repository::open calls (I3016)
Dependencies
What waits on this
- I1105BLOCKED The repository is discovered once, into one model
- I3017BLOCKED Discovering the repository outside the model is refused
Acceptance criteria
- After serve's startup and after an MCP initialize, repository_discoveries is 1, asserted in tests/hot_path.rs
- The discovery phase is timed at every entry point that discovers
Validation
- cargo test --workspace --all-features
Evidence required
- one_discovery_at_every_entry
Evidence
None recorded. Every token above needs a command or an artifact behind it before this issue can be completed; narrative is refused.
Timeline
- started
- —
- verified
- —
- completed
- —
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/I3015.yaml. Read it back with majordomus plan show I3015.