FM-6 — rip dualMount + forgejoMcpCommand + FORGEJO_TOOLS_ALLOWLIST + FORGEJO_MCP_TOOLS #811
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#811
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 legacy
forgejo-mcpplumbing artefact removed from the codebase (thedualMountflag, theforgejoMcpCommandconfig, theFORGEJO_TOOLS_ALLOWLISTconstant, theFORGEJO_MCP_TOOLSenv wiring, theforgejoentry in the MCP servers map), so that the codebase has one MCP namespace, one mount path, and zero dead branches that mask future bugs the way the silent-spawn-fail did since 2026-05-01.Context
After FM-3 (#687) deleted the binary but left the dual-mount plumbing in place,
dualMount=truedefaulted into a state that tried to spawn a non-existentforgejo-mcpprocess at every dispatch. The silent fail meant agents had no MCP at all for two days before anyone noticed (operator only spotted it from agent log saying "Forge MCP is broken at the harness gate"). The broader memory rule applies: no compat shims, noif (!new) fallback to oldbridges. With FM-4 (allowlist sync) and FM-5 (server-side rename) landed, the legacy mount is dead code — this story removes it.Must land after FM-4 and FM-5 have shipped and been smoke-tested. If the legacy code path is still needed as a fallback (it should not be), this story is the wrong shape and the situation regresses to dual-system maintenance.
Acceptance criteria
default-mcp-registry.ts(apps/server/src/infrastructure/agents/)DefaultMcpRegistryOptions.dualMountfield removed from interface + jsdoc.dualMountdefault in constructor (opts.dualMount ?? true) removed.dualMountplumbing inreconfigure()removed.if (legacyForgejoMounted)branch inserversFor()removed (no more push offorgejoserver spec).if (legacyForgejoMounted)branch inallowedTools()removed (no more push ofmcp__forgejo__*entries).DefaultMcpRegistryOptions.forgejoMcpCommandfield removed.agent-runner.ts+ dispatch sitesforgejoMcpCommandmodule-level variable removed (apps/server/src/domain/agent/agent-runner.ts:80).setMcpConfig()first parameter (now defunct) removed; signature becomessetMcpConfig(forgejoUrl: string, forgeCommand?: string).architect.ts,architect-agent-dispatch.ts,mcp-config.ts,main.ts(anywhere that reads/writes the command).mcp-config.ts(apps/server/src/domain/agent/)FORGEJO_TOOLS_ALLOWLISTconstant removed (lines 42-69).forgejoToolEntriesblock inbuildMcpSetup()removed (line 172).FORGEJO_MCP_TOOLSenv injection in mcp-server map removed (line 148).forgejokey inmcpServersmap removed — onlyforge(and conditionalpenpot) remain.McpSetupInput.forgejoMcpCommandfield removed.default-mcp-registry.tsenv wiringFORGEJO_MCP_TOOLSenv entry in legacy mount block removed (line 139, after the legacy mount itself is gone this is moot but verify).Dockerfile + container image
forgejo-mcpbuild steps,patches/, or version pin comments.docs/credentials.md,docs/forge-mcp.md) describe the legacy binary as still mounted, update.Tests
default-mcp-registry.test.tsno longer referencesdualMountand no longer asserts legacymcp__forgejo__*tool names appear inallowedTools().mcp-config.test.tsupdated; tests coveringforgejoToolEntriesremoved.git grep -nE "dualMount|forgejoMcpCommand|FORGEJO_TOOLS_ALLOWLIST|FORGEJO_MCP_TOOLS|mcp__forgejo__" apps/ packages/returns zero hits outsideMEMORY.md,specs/, ordocs/forge-mcp.md(acceptable historical doc).Smoke
just qaclean.mcp__forge__*invocations, no curl-fallback warnings.docker exec <container> env | grep FORGEJO_MCPreturns nothing.Out of scope
$FORGEJO_ACCESS_TOKENenv injection incontainer-reconcile.ts:398— still needed forgit push/git fetchfrom inside the container.forge-mcpalready handles all three forge types viaFORGE_TYPE.References
specs/forge-mcp-cutover-followup.md§Pass 3.~/.claude/projects/.../memory/feedback_no_compat_bridge.md.