Repository navigation
fix(discovery): resolve declaration site paths at manifest load - #73
Merged
Merged
Conversation
Thirteen of the twenty-nine MCP rows name a declaration site and a launch form but carry no path of their own: the M-PIN entries reuse the sites the fourteen M-SITE rows enumerate, and M-SP-02 deliberately spans two of them. Left unresolved, those rows have no location at all, so a runner cannot write them and a scorer cannot match them -- for reasons that have nothing to do with the collector under test. On Linux that is the difference between 51 and 64 executable entries. Resolution happens once at load rather than in each consumer, so the runner, the scorer and anything else reading the manifest cannot disagree about where a declaration lives. It fills gaps only: a row stating its own path keeps it.
pengyuzhang
force-pushed
the
fix/discovery-site-resolution
branch
from
August 23, 2026 18:21
116c7a7 to
76b447e
Compare
lghupan
approved these changes
Aug 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Thirteen MCP rows name a declaration site and a launch form but carry no path of their own.
manifest.load()now fills that path in from the row that does declare one.Why
The fourteen
M-SITE-*rows enumerate the declaration sites and where each lives per OS. TheM-PIN-*rows reuse those sites by name, andM-SP-02deliberately spans two of them viasitesrather thansite.Left unresolved, those rows have no location at all — so a runner cannot write them and a scorer cannot match them, for reasons that have nothing to do with the collector under test. On Linux that is the difference between 51 and 64 executable entries.
How
_resolve_sites()builds a site → per-OS path map from the rows that declare one, then fills it into rows that name a site and lack a path. It runs beforevalidate(), so invariant checks see resolved rows.Two deliberate choices:
M-SITE-01still resolves to~/.claude.json.Tests
Five added to
test_manifest.py, covering the gap this change opened: every declaration resolves a path somewhere, a pinned row inherits its site's path, a row with its own path keeps it, a multi-site row resolves, and resolution stays per-platform.Additive only — no existing line changed, and no dependency beyond the standard library.