Skip to content

feat(gateway): B1 — Syntropy MCP gateway link (KG-first, config-gated, disabled-by-default) - #56

Merged
supmo668 merged 12 commits into
mainfrom
mangyinm/syntropy-mcp-b1
Jul 10, 2026
Merged

supmo668 merged 12 commits into
mainfrom
mangyinm/syntropy-mcp-b1

Conversation

@supmo668

@supmo668 supmo668 commented Jul 10, 2026 •

Copy link
Copy Markdown

openclaw-syntropy-agentic-chat B1 (T1.1-T1.4). listMcpTools on shared transport · ToolCatalog (single-flight refresh, stale-while-refreshing, FAIL-CLOSED max-stale drop, collision prefixing) · SyntropyMcpPlugin (config-gated, DISABLED-BY-DEFAULT, static-key/m2m seams, primed discovery w/ capped backoff, registerTool factory injection through tool-policy pipeline, unknown-tool refresh+retry-once, gateway_stop cleanup) · T1.4 live-QA transport fixes (MCP Accept header/406, SSE-framed parse, McpSession streamable-http handshake + expired-session retry-once; SJ stateless path byte-identical + regression-pinned). Gates: 237 tests, tsgo 0, sealed 60/60. Receipt qgr-pr-prep-20260708-2038-4d09854 (receipt-verify ✓). Disabled-by-default = inert until enabled (B2 gated on SJ /tokens/exchange). 🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added an MCP integration that discovers available tools and makes them accessible to the agent.
    • Added support for multiple MCP servers with configurable authentication, refresh intervals, and stale-data safeguards.
    • Added resilient session handling, streaming responses, automatic discovery retries, and refresh-on-unknown-tool behavior.
    • Added context showing currently available MCP tools.
  • Bug Fixes
    • Improved error handling to prevent credential exposure and safely isolate unavailable servers.
    • Added recovery for expired sessions and malformed or unsupported responses.
  • Tests
    • Added comprehensive coverage for discovery, authentication, caching, sessions, retries, and failure scenarios.

supmo668 and others added 9 commits July 8, 2026 19:48
… discovery on the shared transport (never-throws result union, nameless entries skipped, token never in errors, shared MCP_TIMEOUT_MS) + 8 tests

Generated-With: Claude Code
Co-Authored-By: openclaw <[email protected]>
Co-Authored-By: Claude <[email protected]>
…discovered-tool cache (single-flight refresh, stale-while-refreshing <= maxStale, mutating-tools fail-closed drop past maxStale, collision prefixing, injectable clock/transport) + 13 tests + package scaffold

Generated-With: Claude Code
Co-Authored-By: openclaw <[email protected]>
Co-Authored-By: Claude <[email protected]>
…g-gated MCP-client plugin (per-server auth seams: static-key env / m2m-exchange fail-closed B2 placeholder; fire-and-forget primed discovery w/ capped backoff; sync registerTool factory mapping descriptors→tools via shared transport; unknown-tool refresh+retry-once; before_agent_start availability line; plugin-owned refresh interval + gateway_stop cleanup) + 17 tests; disabled-by-default (bundled, config-gated)

Generated-With: Claude Code
Co-Authored-By: openclaw <[email protected]>
Co-Authored-By: Claude <[email protected]>
…w fail-closed via isProvablyReadOnly (unannotated tools drop past maxStale; red-first) + folded coverage: retry-once bound on persistent unknown-tool, execute getToken-reject fail-closed (no transport call, no token text), collision-prefixed tool executes unprefixed wire name on owning server, exact exponential backoff assertions (was vacuous <=30000); 33/33

QGR-Finding: SEC-B1-1
Generated-With: Claude Code
Co-Authored-By: openclaw <[email protected]>
Co-Authored-By: Claude <[email protected]>
Generated-With: Claude Code
Co-Authored-By: openclaw <[email protected]>
Co-Authored-By: Claude <[email protected]>
…der (fixes FastMCP 406) + SSE-framed response parsing + McpSession stateful streamable-http handshake (initialize/mcp-session-id/initialized, single-flight, expired-session invalidate+retry-once, stateless servers unaffected — SJ path byte-identical) threaded per-server through catalog discovery + tool execute; +19 tests (237 green). LIVE-PROVEN vs kg-mcp-test: 10 kg_* tools discovered, real kg_bilingual_term round-trip, bad-key fail-closed 401

Generated-With: Claude Code
Co-Authored-By: openclaw <[email protected]>
Co-Authored-By: Claude <[email protected]>
…ink complete (supersedes 921df67)

Generated-With: Claude Code
Co-Authored-By: openclaw <[email protected]>
Co-Authored-By: Claude <[email protected]>
…ly swept into 2f1c442 — push accountability logs live monorepo-side, not in this repo

Generated-With: Claude Code
Co-Authored-By: openclaw <[email protected]>
Co-Authored-By: Claude <[email protected]>
…persedes 545f4d2)

Generated-With: Claude Code
Co-Authored-By: openclaw <[email protected]>
Co-Authored-By: Claude <[email protected]>
@coderabbitai

coderabbitai Bot commented Jul 10, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@supmo668, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 30 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e9610b9f-e256-41cc-847f-4181bc84fce3

📥 Commits

Reviewing files that changed from the base of the PR and between 2f62933 and b1e866b.

📒 Files selected for processing (2)
  • scripts/docker/install-sh-e2e/run.sh
  • workstreams/openclaw/qgr/SyntropyHealth-Applications-mo-openclaw-openclaw-SyntropyHealth-Applications-qgr-pr-prep-20260710-0338-17ead6b.md
📝 Walkthrough

Walkthrough

Adds a new syntropy-mcp OpenClaw plugin with MCP tool discovery, stateful Streamable HTTP support, cached catalog management, executable agent tools, lifecycle timers, authentication handling, tests, and PR preparation receipts.

Changes

MCP plugin functionality

Layer / File(s) Summary
MCP transport and session flow
extensions/syntropy/src/client.ts, extensions/syntropy/src/client*.test.ts
Adds JSON/SSE parsing, stateful session initialization and recovery, shared MCP requests, tools/list, and transport/session tests.
Cached discovery catalog
extensions/syntropy-mcp/src/catalog.ts, extensions/syntropy-mcp/src/catalog.test.ts
Adds per-server caching, refresh de-duplication, TTL state, collision prefixing, error callbacks, and stale-tool fail-closed behavior.
Plugin configuration and lifecycle
extensions/syntropy-mcp/src/index.ts, extensions/syntropy-mcp/src/index.test.ts, extensions/syntropy-mcp/openclaw.plugin.json, extensions/syntropy-mcp/package.json
Defines plugin configuration and wiring for authentication, discovery retries, executable tools, agent context, periodic refresh, shutdown cleanup, and manifest registration.
PR preparation receipts
workstreams/openclaw/qgr/*.md
Adds three receipt documents containing metadata, artifact hashes, attestation logs, and review summaries.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant OpenClaw
  participant SyntropyMcpPlugin
  participant ToolCatalog
  participant MCPServer
  OpenClaw->>SyntropyMcpPlugin: register plugin
  SyntropyMcpPlugin->>ToolCatalog: refresh configured servers
  ToolCatalog->>MCPServer: tools/list
  MCPServer-->>ToolCatalog: tool descriptors
  ToolCatalog-->>SyntropyMcpPlugin: catalog snapshot
  SyntropyMcpPlugin-->>OpenClaw: register executable tools
Loading

Poem

I’m a rabbit with tools in a burrow so bright,
MCP brings fresh discoveries each night.
Sessions hop safely, caches hold tight,
Stale spells close with a fail-closed bite.
“Thump!” says the plugin—everything’s right!

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is a terse summary, but it omits most required template sections and structured verification details. Rewrite it using the template: fill Summary, Change Type, Scope, Linked Issue/PR, Security Impact, Repro, Evidence, Human Verification, Compatibility, Failure Recovery, and Risks.
Docstring Coverage ⚠️ Warning Docstring coverage is 38.46% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly names the Syntropy MCP gateway link and key traits like config-gated and disabled-by-default.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch mangyinm/syntropy-mcp-b1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

⚠️ Formal models conformance drift detected

The formal models extracted constants (generated/*) do not match this openclaw PR.

This check is informational (not blocking merges yet).
See the formal-models-conformance-drift artifact for the diff.

If this change is intentional, follow up by updating the formal models repo or regenerating the extracted artifacts there.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@extensions/syntropy-mcp/src/catalog.ts`:
- Around line 182-186: Update isProvablyReadOnly to fail closed on contradictory
annotations: return false whenever annotations.mutates is true or
annotations.readOnlyHint is explicitly false, and only return true when the
available annotations contain no mutation indication and at least one
affirmative read-only indication. Add tests covering contradictory combinations
such as readOnlyHint true with mutates true and readOnlyHint false with mutates
false.

In `@extensions/syntropy-mcp/src/index.ts`:
- Around line 126-133: Validate that a positive maxStaleSeconds is at least
refreshSeconds before assigning it in the configuration parsing logic. Update
the existing validation around maxStaleSecondsRaw and throw a clear error when
maxStaleSecondsRaw is less than refreshSeconds, preventing inconsistent
freshness and staleness behavior in getToolDescriptors.
- Around line 240-242: Track the original tool name explicitly instead of
inferring it from surfacedName. Add a wireName field to CatalogEntry and
populate it with the tool’s original descriptor name when catalog entries are
created; then update the wire-name resolution in the relevant request-handling
logic to use the catalog entry’s wireName directly, removing the server.id
prefix check and slicing logic.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 69429ede-e530-42dc-b2bc-2d2addef6d4c

📥 Commits

Reviewing files that changed from the base of the PR and between d57ad93 and 2f62933.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (13)
  • extensions/syntropy-mcp/openclaw.plugin.json
  • extensions/syntropy-mcp/package.json
  • extensions/syntropy-mcp/src/catalog.test.ts
  • extensions/syntropy-mcp/src/catalog.ts
  • extensions/syntropy-mcp/src/index.test.ts
  • extensions/syntropy-mcp/src/index.ts
  • extensions/syntropy/src/client.list-tools.test.ts
  • extensions/syntropy/src/client.session.test.ts
  • extensions/syntropy/src/client.test.ts
  • extensions/syntropy/src/client.ts
  • workstreams/openclaw/qgr/SyntropyHealth-Applications-mo-openclaw-openclaw-SyntropyHealth-Applications-qgr-pr-prep-20260708-2020-921df67.md
  • workstreams/openclaw/qgr/SyntropyHealth-Applications-mo-openclaw-openclaw-SyntropyHealth-Applications-qgr-pr-prep-20260708-2035-545f4d2.md
  • workstreams/openclaw/qgr/SyntropyHealth-Applications-mo-openclaw-openclaw-SyntropyHealth-Applications-qgr-pr-prep-20260708-2038-4d09854.md

Comment on lines +182 to +186
isProvablyReadOnly(descriptor: McpToolDescriptor): boolean {
const annotations = descriptor.annotations;
if (!annotations) return false;
return annotations.readOnlyHint === true || annotations.mutates === false;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

isProvablyReadOnly uses || — contradictory annotations survive the max-stale drop.

A tool with { readOnlyHint: true, mutates: true } passes as "provably read-only" because true || false === true, yet isMutating also flags it as mutating. Similarly, { readOnlyHint: false, mutates: false } passes via false || true === true despite readOnlyHint: false explicitly asserting non-read-only. In a fail-closed model, a compromised backend could exploit this by setting readOnlyHint: true alongside mutates: true to keep write tools alive past the stale horizon.

The test at line 112-140 covers individual annotation cases but not contradictory combinations.

🔒 Proposed fix — veto any mutation-suggesting annotation first
   isProvablyReadOnly(descriptor: McpToolDescriptor): boolean {
     const annotations = descriptor.annotations;
     if (!annotations) return false;
-    return annotations.readOnlyHint === true || annotations.mutates === false;
+    // Veto: any annotation suggesting mutation disqualifies provably read-only status.
+    if (
+      annotations.mutates === true ||
+      annotations.readOnlyHint === false ||
+      annotations.requires_confirm === true
+    ) {
+      return false;
+    }
+    return annotations.readOnlyHint === true || annotations.mutates === false;
   }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
isProvablyReadOnly(descriptor: McpToolDescriptor): boolean {
const annotations = descriptor.annotations;
if (!annotations) return false;
return annotations.readOnlyHint === true || annotations.mutates === false;
}
isProvablyReadOnly(descriptor: McpToolDescriptor): boolean {
const annotations = descriptor.annotations;
if (!annotations) return false;
// Veto: any annotation suggesting mutation disqualifies provably read-only status.
if (
annotations.mutates === true ||
annotations.readOnlyHint === false ||
annotations.requires_confirm === true
) {
return false;
}
return annotations.readOnlyHint === true || annotations.mutates === false;
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@extensions/syntropy-mcp/src/catalog.ts` around lines 182 - 186, Update
isProvablyReadOnly to fail closed on contradictory annotations: return false
whenever annotations.mutates is true or annotations.readOnlyHint is explicitly
false, and only return true when the available annotations contain no mutation
indication and at least one affirmative read-only indication. Add tests covering
contradictory combinations such as readOnlyHint true with mutates true and
readOnlyHint false with mutates false.

Comment on lines +126 to +133
const maxStaleSecondsRaw = raw?.maxStaleSeconds;
if (maxStaleSecondsRaw !== undefined && typeof maxStaleSecondsRaw !== "number") {
throw new Error("maxStaleSeconds must be a number");
}
const maxStaleSeconds =
typeof maxStaleSecondsRaw === "number" && maxStaleSecondsRaw > 0
? maxStaleSecondsRaw
: 3 * refreshSeconds;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Validate maxStaleSeconds >= refreshSeconds to prevent surprising tool drops.

If maxStaleSeconds < refreshSeconds, tools can be simultaneously "fresh" (age ≤ refreshSeconds) and "past max stale" (age > maxStaleSeconds). The fail-closed drop at getToolDescriptors line 159 would drop mutating tools while they're still tagged "fresh" — likely not the operator's intent. A one-line guard prevents this.

🛡️ Proposed validation
   const maxStaleSeconds =
     typeof maxStaleSecondsRaw === "number" && maxStaleSecondsRaw > 0
       ? maxStaleSecondsRaw
       : 3 * refreshSeconds;
 
+  if (maxStaleSeconds < refreshSeconds) {
+    throw new Error("maxStaleSeconds must be >= refreshSeconds");
+  }
+
   return { servers, refreshSeconds, maxStaleSeconds };
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const maxStaleSecondsRaw = raw?.maxStaleSeconds;
if (maxStaleSecondsRaw !== undefined && typeof maxStaleSecondsRaw !== "number") {
throw new Error("maxStaleSeconds must be a number");
}
const maxStaleSeconds =
typeof maxStaleSecondsRaw === "number" && maxStaleSecondsRaw > 0
? maxStaleSecondsRaw
: 3 * refreshSeconds;
const maxStaleSecondsRaw = raw?.maxStaleSeconds;
if (maxStaleSecondsRaw !== undefined && typeof maxStaleSecondsRaw !== "number") {
throw new Error("maxStaleSeconds must be a number");
}
const maxStaleSeconds =
typeof maxStaleSecondsRaw === "number" && maxStaleSecondsRaw > 0
? maxStaleSecondsRaw
: 3 * refreshSeconds;
if (maxStaleSeconds < refreshSeconds) {
throw new Error("maxStaleSeconds must be >= refreshSeconds");
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@extensions/syntropy-mcp/src/index.ts` around lines 126 - 133, Validate that a
positive maxStaleSeconds is at least refreshSeconds before assigning it in the
configuration parsing logic. Update the existing validation around
maxStaleSecondsRaw and throw a clear error when maxStaleSecondsRaw is less than
refreshSeconds, preventing inconsistent freshness and staleness behavior in
getToolDescriptors.

Comment on lines +240 to +242
const wireName = surfacedName.startsWith(`${server.id}:`)
? surfacedName.slice(server.id.length + 1)
: surfacedName;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

wireName prefix inference can produce the wrong wire name.

When a tool's natural name starts with serverId: (e.g., server "kg" exposes tool "kg:search") and no collision occurs, surfacedName is "kg:search" (unprefixed by the catalog). The startsWith check then strips "kg:" → wire name becomes "search" instead of "kg:search". The MCP server receives the wrong tool name.

The root cause is that the catalog overwrites descriptor.name with the prefixed name but doesn't preserve the original. Adding a wireName field to CatalogEntry eliminates the inference entirely.

🐛 Proposed fix — track original name in CatalogEntry

In catalog.ts, add wireName to the type and populate it:

 export type CatalogEntry = {
   serverId: string;
   descriptor: McpToolDescriptor;
   staleness: "fresh" | "stale";
+  wireName: string;
 };
         seenNames.add(surfaced.name);
-        out.push({ serverId: entry.config.id, descriptor: surfaced, staleness });
+        out.push({ serverId: entry.config.id, descriptor: surfaced, staleness, wireName: descriptor.name });

Then in index.ts, replace the inference:

-  const wireName = surfacedName.startsWith(`${server.id}:`)
-    ? surfacedName.slice(server.id.length + 1)
-    : surfacedName;
+  const wireName = entry.wireName;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const wireName = surfacedName.startsWith(`${server.id}:`)
? surfacedName.slice(server.id.length + 1)
: surfacedName;
const wireName = entry.wireName;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@extensions/syntropy-mcp/src/index.ts` around lines 240 - 242, Track the
original tool name explicitly instead of inferring it from surfacedName. Add a
wireName field to CatalogEntry and populate it with the tool’s original
descriptor name when catalog entries are created; then update the wire-name
resolution in the relevant request-handling logic to use the catalog entry’s
wireName directly, removing the server.id prefix check and slicing logic.

supmo668 and others added 3 commits July 10, 2026 03:38
…he version token from either bare or banner-style ('OpenClaw X (sha)') --version output instead of exact line match (false-negative fix; format change pre-existing on main, not B1)

Generated-With: Claude Code
Co-Authored-By: openclaw <[email protected]>
Co-Authored-By: Claude <[email protected]>
…t-reconcile

Generated-With: Claude Code
Co-Authored-By: openclaw <[email protected]>
Co-Authored-By: Claude <[email protected]>
@github-actions

Copy link
Copy Markdown

⚠️ Formal models conformance drift detected

The formal models extracted constants (generated/*) do not match this openclaw PR.

This check is informational (not blocking merges yet).
See the formal-models-conformance-drift artifact for the diff.

If this change is intentional, follow up by updating the formal models repo or regenerating the extracted artifacts there.

@supmo668
supmo668 merged commit da9ed7f into main Jul 10, 2026
8 of 13 checks passed
@supmo668
supmo668 deleted the mangyinm/syntropy-mcp-b1 branch July 10, 2026 10:47
supmo668 added a commit that referenced this pull request Jul 14, 2026
…sProvablyReadOnly, maxStale>=refresh guard, explicit wireName (#67)

Addresses the 3 CodeRabbit change-requests on the merged PR #56 (B1). Verified each against current main (a2df2c4) — all 3 still valid; fixed red-first.

(1) SECURITY (Major) — isProvablyReadOnly fail-closed veto (catalog.ts): the old  returned true on CONTRADICTORY annotations — {readOnlyHint:true, mutates:true} passed as provably-read-only, letting a compromised backend keep a WRITE tool alive past the max-stale fail-closed drop (S6). Fix: veto via isMutating() FIRST, then require an affirmative read-only assertion — which also guarantees the documented invariant (isProvablyReadOnly ⟹ !isMutating, now test-enforced). Strictly-more-restrictive: it only DROPS more tools past the horizon, cannot create exposure.

(2) DATA-INTEGRITY (Minor) — maxStaleSeconds>=refreshSeconds guard (index.ts): reject at config-parse time; otherwise a tool could be both 'fresh' and 'past max-stale', firing the drop on still-fresh tools.

(3) CORRECTNESS (Minor) — explicit wireName (catalog.ts + index.ts): the wire name was inferred by stripping a '<serverId>:' prefix from surfacedName — wrong when a tool's natural name legitimately starts with '<serverId>:' (e.g. server 'kg' exposing 'kg:search' → mis-stripped to 'search', hitting the wrong tool). Added a wireName field to CatalogEntry preserving the ORIGINAL descriptor name; index.ts uses it directly (no inference).

Red-first tests added for all 3 (contradictory-annotation combos + the RO⟹!mutating invariant; maxStale<refresh throws; wireName preserves a 'kg:search' name). 120 tests pass (catalog+index+governor), tsgo clean, oxfmt clean. Off fresh main a2df2c4.

Generated-With: Claude Code

Co-authored-by: cto <[email protected]>
Co-authored-by: Claude <[email protected]>
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