Skip to content

fix(monitoring): drop the perpetually-warning OAuth live-discovery check - #23

Merged
aterga merged 2 commits into
mainfrom
claude/imcp2-status-remove-discovery
Jul 5, 2026
Merged

aterga merged 2 commits into
mainfrom
claude/imcp2-status-remove-discovery

Conversation

@aterga

@aterga aterga commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator

What

Removes the last non-green item from the status dashboard (monitoring/mcp-status): the "Live link discovery via OAuth authorize" check, which was a permanent, non-actionable WARN.

Follow-up to #21. With #21, the only remaining non-green item on https://mcp.beta.id.ai/status/ is this ii-discovery check.

Why it's obsolete

The check (discoverIiViaAuthorize) registered a throwaway client, hit /oauth/authorize, and expected an HTTP 3xx redirect with a Location header pointing at II — then reported WARN when it didn't get one.

But this server's /oauth/authorize deliberately returns a script-initiated navigation (an HTML page that calls location.replace), not an HTTP redirect, because:

  • the II /mcp URL carries its params in the fragment (#…), which an HTTP Location redirect drops; and
  • form-action CSP is enforced across redirects.

So the probe always sees HTTP 200 with no Location header → permanent WARN that can never pass, regardless of health.

It also added no signal: the MCP→II pairing is already established by ii-target (configured / naming-convention) and confirmed for real by ii-mcp-flow (#21), which probes the resolved II origin's /mcp delegation flow.

Changes

  • Remove the ii-discovery check and the now-unused discoverIiViaAuthorize helper; checkLinkage becomes a synchronous origin-resolve (configured ?? naming-convention), with a comment explaining why we don't probe the redirect headlessly.
  • Drop the corresponding suggestion in buildSuggestions and the unused isAllowedOrigin import in checks.js.
  • Update the tool README (Section 2 description + beta snapshot).
  • Add a checkLinkage unit test (the function was previously untested).

No changes to report.js, server.js, cli.js, or public/index.html.

Verification

  • node --test monitoring/mcp-status/checks.test.js — 15/15 pass.
  • Live run against beta (node monitoring/mcp-status/cli.js): overall pass, all three sections green, exit code 0 (so /api/status returns 200).

Note: the live dashboard reflects this once it merges to main and imcp-status.service redeploys (it also picks up #21's checks at the same time).

🤖 Generated with Claude Code


Generated by Claude Code

The "Live link discovery via OAuth authorize" check could never pass against
this server: /oauth/authorize issues a script-initiated navigation (an HTML
page that calls location.replace), not an HTTP 3xx redirect — the II /mcp URL
carries its params in the fragment and form-action CSP is enforced across
redirects — so there is no Location header to read and the probe was a
permanent WARN with no actionable meaning.

The MCP->II pairing is already established by ii-target (configured / naming
convention) and confirmed for real by ii-mcp-flow, which probes the resolved
II origin's /mcp delegation flow. So the live-discovery probe added no signal.

Remove the ii-discovery check and the now-unused discoverIiViaAuthorize helper
(checkLinkage becomes a synchronous resolve), drop its suggestion, and update
the README. A healthy deployment now reports all green. Add a checkLinkage
unit test. 15/15 tests pass; live beta run is overall: pass.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01K2T7oqtTPLDSasZC3b4Yrv
@aterga
aterga marked this pull request as ready for review June 29, 2026 09:17
Copilot AI review requested due to automatic review settings June 29, 2026 09:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes an obsolete MCP→II “live discovery” check from the monitoring/mcp-status dashboard that could never pass (because /oauth/authorize performs script-initiated navigation rather than an HTTP redirect), leaving only actionable linkage/health signals.

Changes:

  • Deletes the ii-discovery check and the discoverIiViaAuthorize helper; makes checkLinkage a synchronous “configured-or-derived origin resolve”.
  • Updates suggestions and docs to reflect that /oauth/authorize is not usable for headless confirmation, and that /mcp delegation flow health is the actionable signal.
  • Adds a unit test for checkLinkage.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
monitoring/mcp-status/checks.js Removes OAuth-based “live discovery” probe; simplifies linkage resolution and updates suggestions.
monitoring/mcp-status/checks.test.js Adds a checkLinkage unit test and updates imports accordingly.
monitoring/mcp-status/README.md Updates wording and the beta snapshot to reflect removal of the warning check.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread monitoring/mcp-status/checks.js Resolved
Comment thread monitoring/mcp-status/README.md Resolved
Comment thread monitoring/mcp-status/checks.js Resolved
Address Copilot review on PR #23: the docs said the MCP→II pairing is
"confirmed for real" by the II-health section. That overstates it — probing the
resolved II origin's /mcp flow only shows that origin is reachable and has
delegation enabled; it does not prove the MCP server actually hands off to that
II instance (the pairing is inferred from config / the naming convention, not
live-verified, especially now that the /oauth/authorize discovery probe is
gone). Reword the checkLinkage JSDoc, the ii-target check description, and the
README to state the guarantee accurately. Comment/doc-only.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01K2T7oqtTPLDSasZC3b4Yrv
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.

3 participants