Skip to content

[codex] repair stale MCP registrations - #223

Merged
morluto merged 2 commits into
mainfrom
codex/repair-stale-mcp-registrations
Jul 29, 2026
Merged

[codex] repair stale MCP registrations#223
morluto merged 2 commits into
mainfrom
codex/repair-stale-mcp-registrations

Conversation

@morluto

@morluto morluto commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Problem

GitContribute previously generated MCP registrations that launched gitcontribute mcp. The current CLI requires gitcontribute mcp serve --transport=stdio, so those registrations now exit during MCP initialization and surface as a generic handshake failure in clients such as Codex.

Current setup already writes the canonical launcher, but the surrounding lifecycle paths did not recognize stale registrations:

  • doctor checked only whether a GitContribute entry existed.
  • upgrade --check parsed launcher arguments but classified registrations only by executable version.
  • upgrade --yes therefore had no repair path when the executable was current but its arguments were stale.

Fix

Introduce one client-neutral registration inspection contract with absent, current, and stale states. Canonical launcher construction and validation now cover both the durable absolute executable and the complete MCP argument vector.

Use that inspection consistently across lifecycle operations:

  • doctor reports an existing stale or malformed registration as a required diagnostic failure and points users to setup for repair.
  • upgrade --check reports registration repair required and identifies stale clients.
  • upgrade --yes repairs stale registrations as one rollback-safe activation, preserves each configured executable path, verifies the resulting entries, and reports the clients that must restart.
  • Setup continues to perform the canonical full repair and reports restart requirements whenever a registration changes.

The obsolete gitcontribute mcp invocation is not restored as a compatibility alias.

Safety and compatibility

Inspection remains read-only. Repair requires the existing explicit upgrade --yes or setup consent boundary, never creates registrations, preserves unrelated client configuration, and rolls back every selected registration if activation or verification fails.

No dependencies were added.

Validation

  • make verify
  • Focused setup, doctor, upgrade-check, and upgrade-repair tests
  • npm package tests (npm run test:npm)

@morluto morluto changed the title repair stale MCP registrations [codex] repair stale MCP registrations Jul 29, 2026
@morluto
morluto marked this pull request as ready for review July 29, 2026 12:15
@cursor

cursor Bot commented Jul 29, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@morluto
morluto merged commit 0e177f7 into main Jul 29, 2026
12 of 13 checks passed
@morluto
morluto deleted the codex/repair-stale-mcp-registrations branch July 29, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant