API tools: dir= targeting — file issues against any locally-cloned, repo-scoped-authed repo #59
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#59
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?
The git plane already resolves forge + credentials per-repo:
madt_fetch/madt_worktrees/madt_commit/madt_finishacceptdir=on a foreign clone and push / open PRs against that repo's own remote using its per-repo credentials (the documented foreign-repos flow). The issue/API plane does not:madt_issuestakes onlyowner_repo=, resolved against the MCP server's launch-bound forge.Consequence: a session whose server is bound to forge A cannot file a bug against a repo cloned locally from forge B, even though the local clone carries working credentials in its repo scope. Concrete case (2026-07-14): from a Gitea-bound session I needed to file mad-tea bugs; mad-tea's tracker is on Codeberg (a correctly-authed local clone exists),
owner_repo=404s on the bound server, and the CLI fallback is correctly blocked by the CLI-steering hook (ADR 0009) — leaving no sanctioned path at all. (I had to file these two issues by hand.)Ask: if a repo is cloned locally and correctly authed inside that repo's scope, any agent/user on the system should be able to file a bug against it. Give
madt_issues(and the sibling API tools — prs, labels, milestones, comments) adir=form that resolves server + auth from that clone's remote/credential scope, mirroring what the git plane already does.Another concrete occurrence (2026-07-15), and a scope addition:
madt_api_callbelongs in this sweep too - it is not in the sibling list above (prs, labels, milestones, comments) but has the same launch-bound limitation.Case: from a session launched in an unauthed scratch checkout I needed one read against Codeberg -
GET /user/gpg_keyson the account that owns a correctly-authed local clone of this repo.madt_api_callhas nodir=(its input struct is method/endpoint/body/raw/jq/template/paginate only; internal/mcp/tools_api.go:20) and resolves credentials viaconfig.GetCredentials(ctx)against the server's launch environment, so the MCP call failed withnot configured - run 'madtea auth login' first. The only working path was the discouraged one: runningmadtea api /user/gpg_keysfrom inside the authed clone via the shell.One wrinkle that distinguishes it from the typed tools:
owner_repo=can never substitute here. The passthrough hits endpoints like/user/gpg_keysthat have no repo scope at all -dir=onmadt_api_callwould be purely a credential/forge-resolution selector ("call forge X as the identity configured in clone Y"), not a repo scoper. That makes it a clean data point for the #62 matrix: a remote-API tool whose correct scope isdir=, notRepoScope.The decision I recorded in #90 (2026-07-15) appears to supersede this ask: agents must be prevented from crossing outside the launch pwd and using auth tokens found in other checkouts - the launch scope is the credential boundary. That reads as the opposite of "if a repo is cloned locally and correctly authed inside that repo's scope, any agent/user on the system should be able to file a bug against it": under that decision the sanctioned remedy for the 2026-07-14 scenario is authenticating the session's own scope (#89 in-MCP OAuth login, #88 connect-time warning), not per-repo credential targeting. #87 (the passthrough sibling of this ask) was closed under the same decision. Leaving this open until I reconcile it - see the needs-decision section of #90.
Should be resolve by #90.