FM-5 — cut over server-side mcp__forgejo__ references to mcp__forge__ #810
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#810
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?
As an operator, I want every server-side reference to the legacy
mcp__forgejo__*tool namespace (in agent-prompt strings, security gates, hook keys, and hint text) rewritten to itsmcp__forge__*equivalent, so that agents stop being instructed to call tools that no longer exist (the binary was deleted in FM-3) and instead use the working forge-mcp surface restored by FM-4.Context
FM-3 (#687) deleted
forgejo-mcpfrom the container image. Skills were cleaned (git grep mcp__forgejo__ skills/returns zero), but server-side code that emits tool names into agent prompts, matches them in security gates, or keys hooks on them was missed. As long as these strings referencemcp__forgejo__*:parent-pr.ts:221instructs agents "open your PR viamcp__forgejo__create_pull_request" — agent attempts a tool that the SDK no longer mounts.architect.ts:625, 674security gates usestartsWith("mcp__forgejo__")and=== "mcp__forgejo__merge_pull_request"— these match nothing post-cutover, so the gate's intent (block PR-merge from non-session repos, log mid-flight forge access) is silently bypassed.agent-runner.ts:263-277token-budget first-touch hook keys onmcp__forgejo__*— never fires.worker.ts:543hint string aboutmcp__forgejo__*_file— points operators at the wrong namespace.This story is a textual rename with security-gate verification — no behaviour changes beyond pointing at the correct tool names.
Depends on FM-4 landing first (otherwise the renamed names still don't resolve because the allowlist is wrong).
Acceptance criteria
Code rename
apps/server/src/domain/workflow/parent-pr.ts:221instruction string usesmcp__forge__create_pull_request.apps/server/src/domain/agent/architect.ts:625security gate matchestoolName.startsWith("mcp__forge__").apps/server/src/domain/agent/architect.ts:674matcher:toolName === "mcp__forge__merge_pull_request".apps/server/src/domain/agent/agent-runner.ts:263-277token-budget hook keys onmcp__forge__*.apps/server/src/background/worker.ts:543hint mentionsmcp__forge__write_file(note: forge-mcp renamedupdate_file→write_file).apps/server/src/domain/ports/mcp-registry-port.ts:25, 99doc-comment references updated tomcp__forge__*.git grep -nE "mcp__forgejo__" apps/server/returns only:mcp-config.tsforgejoToolEntriesblock (removed in FM-6, not this story)MEMORY.md/specs//docs/(out of scope)Tests
architect.test.tssecurity-gate tests updated to use the new tool names.agent-runner.test.tsfirst-touch token-budget tests updated.parent-pr.test.tssnapshot covers the renamed instruction.Manual smoke
mcp__forge__create_pull_request.submit_review+merge_pull_requestroute throughmcp__forge__*.Out of scope
dualMount,forgejoMcpCommand,FORGEJO_TOOLS_ALLOWLISTconstant,FORGEJO_MCP_TOOLSenv wiring — see FM-6.forgejoserver entry name inmcpServersmap (mcp-config.ts:139,default-mcp-registry.ts:130) — that lives in FM-6 along with the rest of the legacy mount.References
specs/forge-mcp-cutover-followup.md§Pass 2.specs/forge-mcp-cutover-followup.md§Pass 1 (mapping table).