Skip to content

I2735 — An edit no claim covers is refused

With session.edits_require_claim on and the mesh enabled, a provider's pre-tool hook refuses a write (Edit, Write, MultiEdit, NotebookEdit) no claim covers: the active task's scope or a live mesh claim of the writing session; judged by majordomus guard hook in the checkout the file belongs to, and by the capability guard.edit over MCP and HTTP.

BLOCKED wave 3 · p0 · implementation profile · runs alone

Part of every-session-joins-the-mesh — Every LLM session joins the Majordomus mesh at start, told the mesh as work.

Blocked. This issue cannot start until I2289 is done. The status is derived from that, not declared.

Objective

With session.edits_require_claim on and the mesh enabled, a provider's pre-tool hook refuses a write (Edit, Write, MultiEdit, NotebookEdit) no claim covers: the active task's scope or a live mesh claim of the writing session; judged by majordomus guard hook in the checkout the file belongs to, and by the capability guard.edit over MCP and HTTP.

Why

On 2026-10-15 the owner asked why a session does not join the mesh and work on it, and why nothing enforces it. I2734, I2288 and I2289 put the session and the task on the mesh and refuse a completion off it; an edit nobody claimed was still never stopped, so the claim stayed a convention until the edit itself asked for one. Prior art: the unmerged branch feature/the-guard-refuses-an-unready-episode (2026-09-11) wired a PreToolUse guard for server readiness; this asks a different question, in the executable, because the hook runs before every edit and the shell tool's cold start was measured at about 4 s.

Current state

No hook runs before a tool; an edit no claim covers is never refused.

Desired state

guard hook exits 2 with the path and the remedy for an unclaimed edit; the session's own live claim or the active task's scope lets it through; local state, a path outside the checkout, the policy off and a server that does not answer are let through; the tracked shim passes on 2 and nothing else.

Scope

  • apps/majordomus-cli/src/guard.rs
  • apps/majordomus-cli/src/capability/builtin/guard.rs
  • apps/majordomus-cli/src/commands/guard.rs
  • apps/majordomus-cli/src/cli.rs
  • apps/majordomus-cli/src/cli/local.rs
  • apps/majordomus-cli/src/policy.rs
  • .claude/hooks/majordomus-edit-guard
  • .ai/repo/policy.yaml
  • share/schemas/majordomus/policy/policy.v1.schema.json
  • share/skeleton/policy.yaml
  • test/cases/3069_an_edit_no_claim_covers_is_refused.sh
  • docs/MESH.md

Dependencies

Acceptance criteria

  • An unclaimed edit is refused with exit 2, naming the path and the remedy
  • The writing session's live claim, or the active task's scope, lets the edit through; another session's claim does not
  • Local state, a path outside the checkout, a tool that writes no file, the policy off and an unanswering server are let through
  • The checkout judged is the one the written file belongs to
  • The tracked shim passes on the refusal and nothing else

Validation

  • bin/majordomus plan validate
  • cargo test --lib guard
  • bash test/run.sh 3069_an_edit_no_claim_covers_is_refused

Evidence required

  • case_3069
  • guard_unit_tests

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

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