repo-scope: madt_adr and other MCP tools cannot target a nested repo, because they take no dir= #638
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#638
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
What happens
I am moving architecture decision records into ten repos. One is a workspace repo. The other nine are nested, gitignored clones inside its working tree. My MCP server starts in the workspace repo.
madt_adrhas nodir=, so it acts only on the workspace repo. It cannot reach the nine nested repos. Other tools have the same kind of gap. The table lists the gaps in the default tool set.Gaps
I read these gaps from the tool schemas that my MCP server serves today. I did not check the gated domains.
dir=owner_repo=madt_adr(init,new,check)docs/decisions/treemadt_prunemadt_remote_addmadt_prsaction=checkoutmadt_orchestratebatch mergemadt_openmadt_api_call,madt_server_infomadt_releasesdownloadmadt_issuescreate,comment,list, andgetonlyowner_repo=.These tools take
dir=today:madt_status,madt_pull,madt_fetch,madt_worktrees,madt_branch_create,madt_branch_delete,madt_add,madt_commit,madt_push,madt_finish,madt_log,madt_ref_inspect,madt_tag_list,madt_auth_use_ssh,madt_auth_whoami.Ask
Confirm each row against
main, and add rows for the gated domains. Then fix each gap, or record why it stays.Relates to #485, #507, and #577.
Deferred out of v0.20.0. #638 is not a mechanical change: every tool here
touches the forge even on its local path, so a correct dir= has to resolve the
dir's OWN forge identity through config.GetConfigForDir. That resolver has a
CLOSED call-site allowlist (internal/parity/getconfigfordir_drift.go,
getConfigForDirSites), pinned by TestNoUnpinnedGetConfigForDirCallSites: a new
site is an ADR 0027 credential-boundary carve-out, a recorded decision per tool,
not a drop-in. So #638 is a set of boundary rulings and gets its own pass.
Per row, confirmed against main:
issue verify resolve the LAUNCH forge (origin.go:52-60; adr.go:1512), so on a
foreign dir they read the wrong origin. Needs a dir-scoped resolver (a new
carve-out) or a refusal of the forge paths on a foreign dir. Reconcile-style
precedent, and the real need behind this issue.
checkout moves HEAD. Needs a dir-scoped PR read (a new carve-out) plus a
foreign-primary clamp. Direct analogue of orchestrate reconcile.
when remote=true. A credential-boundary widening.
identity lands in a foreign repo's config is a credential decision.
writes revert branches, all credentialed and HEAD-moving.
madt_api_call; likely stays launch-forge-only.
non-DirScope, dirscope_drift.go:149). A repo selector collides; either rename
the download param (breaking) or add a distinct selector.
Not gaps, by-design boundary: madt_api_call (ADR 0027 forbids foreign-cred
resolution), madt_issues (the dir= report carve-out is already built -
create/comment/list/get only), and the gated domains (forge-API tools selected
by owner_repo=, no local-repo gap).
When this is picked up, madt_adr and madt_prs checkout are the cleanest first
carve-outs: reconcile-style precedent and the actual multi-repo need. The rest
follow.