Fix MCP remote default repo mismatch for prgs #530

Closed
opened 2026-07-08 04:05:21 -05:00 by jcwalker3 · 2 comments
Owner

Problem:
During PR #527 / issue #515 routing, bare remote=prgs resolved to the wrong repository, apparently an absence-categories app with PR #1 base main, instead of Scaled-Tech-Consulting/Gitea-Tools. This caused false 404s when looking up PR #527 and issue #515.

Observed correct repository:

  • Local git remote prgs = https://gitea.prgs.cc/Scaled-Tech-Consulting/Gitea-Tools.git
  • Correct MCP calls require explicit:
    • org=Scaled-Tech-Consulting
    • repo=Gitea-Tools

Risk:
LLM sessions may falsely conclude issues/PRs do not exist, create duplicates, skip reviews, or mutate the wrong repository if MCP defaults disagree with the local git remote.

Required behavior:

  1. MCP remote resolution must agree with the local git remote when operating inside a Gitea-Tools worktree.
  2. If a bare remote name resolves ambiguously or to a repo different from the local git remote, the tool must block and require explicit org/repo.
  3. False 404s caused by repo mismatch should include a diagnostic hint showing the resolved repo.
  4. Workflow docs and canonical prompts should require explicit org/repo until the bug is fixed.

Acceptance criteria:

  • Add regression coverage for remote=prgs resolving to the wrong repo.
  • Add a guard that detects mismatch between local git remote URL and MCP resolved org/repo.
  • Add tests proving PR/issue lookup cannot silently query a different repository.
  • Update reviewer/author/merger handoff templates to include explicit org/repo fields.
Problem: During PR #527 / issue #515 routing, bare `remote=prgs` resolved to the wrong repository, apparently an absence-categories app with PR #1 base `main`, instead of `Scaled-Tech-Consulting/Gitea-Tools`. This caused false 404s when looking up PR #527 and issue #515. Observed correct repository: - Local git remote `prgs` = `https://gitea.prgs.cc/Scaled-Tech-Consulting/Gitea-Tools.git` - Correct MCP calls require explicit: - `org=Scaled-Tech-Consulting` - `repo=Gitea-Tools` Risk: LLM sessions may falsely conclude issues/PRs do not exist, create duplicates, skip reviews, or mutate the wrong repository if MCP defaults disagree with the local git remote. Required behavior: 1. MCP remote resolution must agree with the local git remote when operating inside a Gitea-Tools worktree. 2. If a bare remote name resolves ambiguously or to a repo different from the local git remote, the tool must block and require explicit org/repo. 3. False 404s caused by repo mismatch should include a diagnostic hint showing the resolved repo. 4. Workflow docs and canonical prompts should require explicit org/repo until the bug is fixed. Acceptance criteria: - Add regression coverage for `remote=prgs` resolving to the wrong repo. - Add a guard that detects mismatch between local git remote URL and MCP resolved org/repo. - Add tests proving PR/issue lookup cannot silently query a different repository. - Update reviewer/author/merger handoff templates to include explicit org/repo fields.
jcwalker3 added the status:in-progress label 2026-07-08 14:34:55 -05:00
Author
Owner

Issue claim heartbeat

<!-- gitea-issue-claim-heartbeat:v1 --> **Issue claim heartbeat** - kind: claim - issue: #530 - branch: fix/issue-530-remote-repo-mismatch - phase: claimed - profile: prgs-author - pr: none - blocker: none - next_action: create worktree and begin implementation
sysadmin removed the status:in-progress label 2026-07-08 21:07:04 -05:00
Author
Owner

Canonical Issue State

STATE: regressed-follow-up-filed
WHO_IS_NEXT: author
NEXT_ACTION: implement follow-up for control-plane guide schema/local alignment
NEXT_PROMPT:

See the new follow-up issue filed for mcp_get_control_plane_guide org/repo schema gap after #530.

WHAT_HAPPENED: Live controller triage hit #530 guard on mcp_get_control_plane_guide(remote=prgs); remediation demanded org/repo but the guide schema lacked those parameters.
WHY: #530 guard is correct for mutations; guide bootstrap was left unusable.
RELATED_PRS: #555
BLOCKERS: none (follow-up tracks residual)
VALIDATION: reproduced mcp_get_control_plane_guide(remote=prgs) -> Timesheet vs Gitea-Tools mismatch with impossible recovery
LAST_UPDATED_BY: jcwalker3 (prgs-author)

## Canonical Issue State STATE: regressed-follow-up-filed WHO_IS_NEXT: author NEXT_ACTION: implement follow-up for control-plane guide schema/local alignment NEXT_PROMPT: ```text See the new follow-up issue filed for mcp_get_control_plane_guide org/repo schema gap after #530. ``` WHAT_HAPPENED: Live controller triage hit #530 guard on mcp_get_control_plane_guide(remote=prgs); remediation demanded org/repo but the guide schema lacked those parameters. WHY: #530 guard is correct for mutations; guide bootstrap was left unusable. RELATED_PRS: #555 BLOCKERS: none (follow-up tracks residual) VALIDATION: reproduced mcp_get_control_plane_guide(remote=prgs) -> Timesheet vs Gitea-Tools mismatch with impossible recovery LAST_UPDATED_BY: jcwalker3 (prgs-author)
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Scaled-Tech-Consulting/Gitea-Tools#530