Skip to content

Correct MCP trust fingerprint, store path, and auth UX - #1017

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-7899-verify-docsmcpmd-by-following-it-end-to-end
Sep 14, 2026
Merged

TheGreatAxios merged 2 commits into
mainfrom
cl-7899-verify-docsmcpmd-by-following-it-end-to-end

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary: Applies verified CL-7899 doc fixes W1–W3 to docs/MCP.md (docs text only, no behavior change). W1: trust fingerprint covers sorted env key names, never values; type defaults http-when-url-else-stdio. W2: store path ~/.corbits/trust/.json, first 32 hex of SHA-256 of realpath-canonicalized root. W3: first-run auth is the mcp ! prompt-box mark; Enter in /mcp opens the URL and auto-copies the link. W4/M1 skipped per spot-check against code: no root PLUGINS.md exists (only docs/PLUGINS.md), and the briefed slug rule matches session/project-key.ts slugSegment, not mcp/auth-store.ts serverDisplaySlug — verifier should re-check those two. Verification: bun run check exit 0 (7307 pass, 0 fail). Fixes CL-7899

W1/W2: trust fingerprint covers sorted env key names (never values) with http-when-url-else-stdio type defaulting; store is ~/.corbits/trust/<repo-hash>.json keyed by first 32 hex of SHA-256 of the realpath-canonicalized root. W3: first-run auth is the mcp ! prompt-box mark plus Enter in /mcp opening the URL and auto-copying the link. W4/M1 intentionally skipped per spot-check: no root PLUGINS.md exists, and the briefed slug rule matches session/project-key.ts, not mcp/auth-store.ts.
@linear-code

linear-code Bot commented Sep 13, 2026

Copy link
Copy Markdown

CL-7899

@TheGreatAxios

Copy link
Copy Markdown
Collaborator Author

M1 applied (cd9e758): docs/MCP.md now states the exact auth-slug rule per src/mcp/auth-store.ts:42-48 (serverDisplaySlug via legacyServerSlug). W4 decided no-change: docs/PLUGINS.md left untouched. No merge.

@TheGreatAxios

Copy link
Copy Markdown
Collaborator Author

Critic review — docs-only, merge-ready

Spot-checked every new claim against code. All accurate.

Verified

  • docs/MCP.md trust fingerprint (sorted env key names, never values; type defaults http-when-url-else-stdio) matches mcpServerFingerprint in src/trust/project-trust.ts:289-299.
  • Store path ~/.corbits/trust/<repo-hash>.json, first 32 hex of SHA-256 of realpath-canonicalized root, matches projectTrustPath in src/trust/project-trust.ts:102-109 (SETTINGS_DIR_NAME=".corbits" per src/branding.ts:24).
  • First-run auth UX (mcp ! prompt-box mark, Enter in /mcp opens URL + auto-copies, SSH rationale) matches src/tui/command-surfaces.ts:1538-1555 (openAuthURL + writeClipboard with SSH-fallback comment) and src/tui/runner/mcp.ts:195; mcp ! mark confirmed in src/tui/shell/internals.ts:464-465. Existing test src/tui/command-surfaces.test.ts:1267 covers Enter-opens-and-copies.
  • Slug rule ([^A-Za-z0-9_-]_, case preserved, empty → server, truncate 48) matches legacyServerSlug/serverDisplaySlug in src/mcp/auth-store.ts:42-48.

Blocking: none.

Nits (non-blocking)

  • Placeholder drift: this PR renames to <repo-hash> here, but docs/PLUGINS.md:25 still says ~/.corbits/trust/<cwd-hash>.json. Consider aligning in a follow-up.
  • projectTrustPath hashes the caller-passed cwd after resolve+realpathSync (with lexical fallback), not strictly a git toplevel — "project root" reads fine in practice but is slightly idealized.

Hygiene: docs text only, 1 file, +11/−8, no behavior change. All CI checks green (build, typecheck, eslint, prettier, tests, static-analysis).

Verdict: approve — safe to merge.

@TheGreatAxios
TheGreatAxios marked this pull request as ready for review September 14, 2026 04:46
@TheGreatAxios
TheGreatAxios merged commit 40b96b0 into main Sep 14, 2026
9 checks passed
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