Skip to content

MCP get: the /area/ route keeps an id that contains ':' (#6815) - #6819

Merged
rbuergi merged 3 commits into
mainfrom
fix/6815-area-route-colon-id
Oct 15, 2026
Merged

rbuergi merged 3 commits into
mainfrom
fix/6815-area-route-colon-id

Conversation

@rbuergi

@rbuergi rbuergi commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Closes #6815

Root cause

MeshOperations.TryParseAreaRoute returned false for ANY path containing ':', to leave the legacy {path}/area:Name form to the unified resolver. A reference id is free text (url=https://github.com/x), so get {node}/area/{Name}/{Id} with such an id fell through to TryResolveUnifiedPath, which split at the colon and answered No node found at '{node}/area/{Name}'.

Fix

The /area/ route now wins whenever its area segment lies wholly before the first colon; everything after {Name}/ is the id, verbatim. A colon at or before the marker ({path}/area:Name, area:content:file, {path}/data:…) is still the legacy form and keeps flowing through the unified resolver unchanged.

The portal URL route is a different code path (it does not go through TryParseAreaRoute); not changed here.

Tests

test/Memex.Portal.Shared.Test/AreaRouteIdWithColonTest.cs — parse-level (colon id keeps the route; four legacy colon shapes are left to the unified resolver) and end-to-end MeshOperations.Get: the colon id renders ECHO[url=https://github.com/Systemorph/MeshWeaver], and the legacy @node/area:Echo/legacy-id still resolves. 7/7 pass; UngrantedGetIsNotFoundTest 5/5.

Negative control (old early return restored): 2 fail, quoting the issue's exact symptom —
Expected "Error: No node found at 'AreaRouteColonProbe/area/Echo'. Closest ancestor is 'AreaRouteColonProbe' (remainder='area/Echo')…" to contain "ECHO[url=https://github.com/Systemorph/MeshWeaver]".

Release -warnaserror: MeshWeaver.Mesh.Operations and Memex.Portal.Shared.Test, 0 warnings / 0 errors.

Doc: Doc/AI/Tools/MeshPlugin → Get → "Layout areas".

Pairs-with: none — TryParseAreaRoute was private and is now internal; no public surface removed.

🤖 Generated with Claude Code

TryParseAreaRoute refused any path containing a colon so the legacy
{path}/area:Name form reached the unified resolver; an id like
url=https://github.com/x therefore fell through and was split at the
colon. The route now wins when its area segment lies wholly before the
first colon; a colon at or before the marker is still the legacy form.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 15, 2026 09:58
@rbuergi
rbuergi enabled auto-merge October 15, 2026 09:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Legacy colon references are misrouted when their node path contains an interior area segment.

1 open finding
What changed in this PR

Updates MCP Get routing to support layout-area ids containing colons, addressing #6815.

Changes:

  • Recognizes /area/ markers before the first colon.
  • Adds parser and end-to-end regression tests.
  • Documents layout-area routes and reference ids.
File Description
test/​Memex.Portal.Shared.Test/​AreaRouteIdWithColonTest.cs Tests colon-containing ids and legacy references.
src/​MeshWeaver.Mesh.Operations/​MeshOperations.cs Adjusts area-route parsing and exposes it internally for tests.
src/​MeshWeaver.Documentation/​Data/​AI/​Tools/​MeshPlugin.md Documents area reads and colon handling.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/MeshWeaver.Mesh.Operations/MeshOperations.cs
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

   11 files   -    15     11 suites   - 15   38m 58s ⏱️ - 20m 59s
9 158 tests  - 3 567  9 158 ✅  - 3 374  0 💤  - 193  0 ❌ ±0 
9 173 runs   - 3 568  9 173 ✅  - 3 375  0 💤  - 193  0 ❌ ±0 

Results for commit 71b5a98. ± Comparison against base commit cab0ae9.

This pull request removes 3614 and adds 21 tests. Note that renamed tests count towards both.

   --- End of inner exception stack trace ---
   --- End of inner exception stack trace ---)
   --- End of inner exception stack trace ---, expected: True)
   --- End of inner exception stack trace ---, isDenial: True)
 ---> (Inner Exception #1) MeshWeaver.Mesh.QueryProviderStalledException: Query provider(s) [pg] did not emit an Initial within the query fan-in's 16s bound for query 'nodeType:NodeType' (user 'system'). The merged Initial gates on EVERY provider, so this query has NO snapshot to answer with — it is reported as unavailable (retryable) rather than left hanging with no error. This is an availability failure, never a permission verdict: a consumer deciding access must fail CLOSED and say it could not establish the answer. Fix the stalled provider; never bump the consumer's timeout.<---
 ---> (Inner Exception #1) MeshWeaver.Messaging.Hub.Test.InfrastructureFaultTest+ProviderException (0x80004005): Failed to connect to 10.42.18.4:5432<---
 ---> (Inner Exception #1) System.ArgumentException: Value does not fall within the expected range.<---
 ---> (Inner Exception #1) System.InvalidOperationException: boom<---
 ---> (Inner Exception #1) System.InvalidOperationException: source B is misconfigured<---
…
Memex.Portal.Shared.Test.AreaRouteIdWithColonTest ‑ Get_AreaRoute_WithColonInId_RendersThatId
Memex.Portal.Shared.Test.AreaRouteIdWithColonTest ‑ Get_LegacyColonForm_StillResolves
Memex.Portal.Shared.Test.AreaRouteIdWithColonTest ‑ Parse_IdWithColon_KeepsTheAreaRoute
Memex.Portal.Shared.Test.AreaRouteIdWithColonTest ‑ Parse_InteriorAreaSegment_WithColonId_SplitsAtTheDeepestMarker
Memex.Portal.Shared.Test.AreaRouteIdWithColonTest ‑ Parse_LegacyColonForm_IsLeftToTheUnifiedResolver(path: "AreaRouteColonProbe/area:Echo")
Memex.Portal.Shared.Test.AreaRouteIdWithColonTest ‑ Parse_LegacyColonForm_IsLeftToTheUnifiedResolver(path: "AreaRouteColonProbe/area:Echo/legacy-id")
Memex.Portal.Shared.Test.AreaRouteIdWithColonTest ‑ Parse_LegacyColonForm_IsLeftToTheUnifiedResolver(path: "AreaRouteColonProbe/area:content:logo.svg")
Memex.Portal.Shared.Test.AreaRouteIdWithColonTest ‑ Parse_LegacyColonForm_IsLeftToTheUnifiedResolver(path: "AreaRouteColonProbe/data:Collection/area/x")
Memex.Portal.Shared.Test.AreaRouteIdWithColonTest ‑ Parse_LegacyColonForm_IsLeftToTheUnifiedResolver(path: "Root/area/Child/area:Echo")
Memex.Portal.Shared.Test.AreaRouteIdWithColonTest ‑ Parse_LegacyColonForm_IsLeftToTheUnifiedResolver(path: "Root/area/Child/area:Echo/legacy-id")
…

♻️ This comment has been updated with latest results.

rbuergi and others added 2 commits October 15, 2026 21:24
…d an interior 'area' segment (#6815)

Root/area/Child/area:Echo/legacy-id addressed Echo on Root/area/Child before the
colon-id change; the marker search then took the interior 'area' segment and
rendered area Child on Root. A colon that cuts 'area' or a UCR prefix is the
legacy colon form wherever an 'area' segment precedes it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 15, 2026 19:26
@meshweaver-cloud
meshweaver-cloud Bot disabled auto-merge October 15, 2026 19:26
@rbuergi
rbuergi enabled auto-merge October 15, 2026 19:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Legacy-route compatibility needs human confirmation before approval.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

@rbuergi
rbuergi merged commit b36263a into main Oct 15, 2026
80 of 83 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.

MCP get cannot address a layout area whose id contains ':' via {node}/area/{Name}/{Id}

2 participants