feat(mcp): refuse owner_repo= forge writes to a populated repo outside the session's scope #616
No reviewers
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea!616
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-418-forge-write-guard"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
This builds the ADR 0019 amendment of 2026-09-08. A content write through
owner_repo=to a repo outside the session's scope now reads the forge repo first. An empty repo is allowed. A populated repo is refused, with no override, and the refusal names the remedy: clone, change in a worktree, andmadt_finish, or use the CLI. A failed read refuses too.ADR 0043 records the scope: the launch repo and the child clones of the launch directory are in scope, so
owner_repo=naming one of them behaves like omitting it.Guarded:
madt_filescreate, update, delete, and batch, andmadt_branches_remotecreate.madt_commithas noowner_repo=, andmadt_api_callstays a documented gap, as the amendment says. Both tool descriptions state the refusal.Tests cover the decision table (in-scope and omitted
owner_repo=make no forge read), each guarded handler (it refuses before it uses the service, and the test fails with a guard removed), and the scope scan against a temp workspace with a child clone and a symlinked child.Closes #418
Closes #418