You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CoderMCPServer: trust only Coder's own 404 before clearing the config ID (gate before M9) #337
The CoderMCPServer controller treats any 404 as "the config is gone". That includes a proxy HTML 404 and Coder's Route not found. for a wrong base URL. This is the MCP version of #327 (CoderAIProvider).
Impact
After a spec edit (generation 2 or later), when an earlier apply has already replaced the nonce display name:
A false 404 on the GET makes the controller clear status.configID (internal/controller/codermcpserver_apply.go, the GET at the top of the apply).
The controller goes back to the create path, which finds the slug.
The display name is no longer the nonce, so the record step reports SlugConflict and clears the create marker.
The object then has no ID and no marker. A later delete removes the finalizer, and the config stays in Coder unmanaged, possibly enabled and holding credentials.
Before #328, the controller stalled on any 404 and kept the ID. #328 adds this path, and the stacked #329 and #330 keep it.
Fix
Use isCoderResourceNotFound (added in #325) for the MCP GET in the apply, the kill-switch read (#329), and the disable read (#330). A non-Coder 404 waits with CoderUnavailable and changes nothing. Add tests for an HTML 404 and for Route not found. on each path.
Gate
This must land before M9 (CoderMCPServer activation). The kind is dormant today, so no install is affected.
Activity