fix(fetch-mcp-metadata): count registry stubs as unmatched in coverage
matched_tools claimed every surface tool matched even when entries were registry stubs with no live MCP metadata, and unmatched_tools was hardcoded to 0. Coverage now excludes stubs from matched_tools, reports them as unmatched, and a registry JSON parse failure warns instead of silently producing a stub-only snapshot. The schema catalog policy invariant is relaxed to match the honest accounting.
This commit is contained in:
@@ -47,7 +47,8 @@ if ! jq -e '
|
||||
.coverage.source_services == (.coverage.snapshot_services + (.coverage.missing_services | length)) and
|
||||
.coverage.surface_tools == (.coverage.matched_tools + .coverage.unmatched_tools) and
|
||||
.coverage.source_tools >= .coverage.surface_tools and
|
||||
.coverage.matched_tools == (.tools | length) and
|
||||
.coverage.matched_tools <= (.tools | length) and
|
||||
(.tools | length) <= .coverage.surface_tools and
|
||||
.coverage.aliased_tools <= .coverage.matched_tools
|
||||
' internal/cli/schema_mcp_metadata.json >/dev/null; then
|
||||
printf 'MCP source-revision snapshot coverage is inconsistent: snapshot_registry=%s\n' \
|
||||
|
||||
Reference in New Issue
Block a user