Skip to content

Conversation

@tadasant
Copy link
Member

@tadasant tadasant commented Nov 28, 2025

Drafted by Claude Code, reviewed by me.

Summary

This PR adds a data migration to fix 17 server entries that were published with empty $schema fields.

This is a pure data migration - no code changes are needed because:

  • Validation for the $schema field was already added in commit 6d2001b on 2025-10-07
  • That validation was deployed to production on 2025-10-14 with v1.3.0 (PR #668)
  • All 17 affected entries were published before deployment (see dates below)

Affected Entries (17 total)

Server Version Published
io.github.ruvnet/claude-flow 2.0.0-alpha.104 2025-09-10
io.github.ruvnet/claude-flow 2.0.0-alpha.105 2025-09-10
io.github.ruvnet/ruv-swarm 1.0.18 2025-09-10
io.github.ruvnet/ruv-swarm 1.0.19 2025-09-10
travel.kismet/mcp-server 0.0.0 2025-09-10
io.github.jkakar/cookwith-mcp 1.0.0 2025-09-11
io.github.jkakar/cookwith-mcp 1.0.1 2025-09-12
io.github.jkakar/cookwith-mcp 1.0.2 2025-09-12
io.github.OtherVibes/mcp-as-a-judge 0.3.12 2025-09-18
io.github.OtherVibes/mcp-as-a-judge 0.3.13 2025-09-18
io.github.OtherVibes/mcp-as-a-judge 0.3.14 2025-09-18
io.github.OtherVibes/mcp-as-a-judge 0.3.20 2025-09-20
io.github.Skills03/scrimba-teaching 1.0.1 2025-09-21
io.github.Skills03/scrimba-teaching 1.1.0 2025-09-21
io.github.Skills03/scrimba-teaching 1.2.0 2025-09-21
io.github.toby/mirror-mcp 0.0.4 2025-10-01
io.github.antuelle78/weather-mcp 1.0.0 2025-10-09 ⚠️

Note on outlier: io.github.antuelle78/weather-mcp was published on 2025-10-09, which is after the validation code was committed (2025-10-07) but before it was deployed (2025-10-14). This confirms the entries slipped through due to the gap between merge and deployment.

Dry Run SQL

To verify affected rows before running the migration:

SELECT server_name, version, value->>'$schema' as schema_value
FROM servers
WHERE (server_name, version) IN (
    ('io.github.OtherVibes/mcp-as-a-judge', '0.3.12'),
    ('io.github.OtherVibes/mcp-as-a-judge', '0.3.13'),
    ('io.github.OtherVibes/mcp-as-a-judge', '0.3.14'),
    ('io.github.OtherVibes/mcp-as-a-judge', '0.3.20'),
    ('io.github.Skills03/scrimba-teaching', '1.0.1'),
    ('io.github.Skills03/scrimba-teaching', '1.1.0'),
    ('io.github.Skills03/scrimba-teaching', '1.2.0'),
    ('io.github.antuelle78/weather-mcp', '1.0.0'),
    ('io.github.jkakar/cookwith-mcp', '1.0.0'),
    ('io.github.jkakar/cookwith-mcp', '1.0.1'),
    ('io.github.jkakar/cookwith-mcp', '1.0.2'),
    ('io.github.ruvnet/claude-flow', '2.0.0-alpha.104'),
    ('io.github.ruvnet/claude-flow', '2.0.0-alpha.105'),
    ('io.github.ruvnet/ruv-swarm', '1.0.18'),
    ('io.github.ruvnet/ruv-swarm', '1.0.19'),
    ('io.github.toby/mirror-mcp', '0.0.4'),
    ('travel.kismet/mcp-server', '0.0.0')
)
AND (value->>'$schema' = '' OR value->>'$schema' IS NULL);

Result against prod:

app=> SELECT server_name, version, value->>'$schema' as schema_value
FROM servers
WHERE (server_name, version) IN (
    ('io.github.OtherVibes/mcp-as-a-judge', '0.3.12'),
    ('io.github.OtherVibes/mcp-as-a-judge', '0.3.13'),
    ('io.github.OtherVibes/mcp-as-a-judge', '0.3.14'),
    ('io.github.OtherVibes/mcp-as-a-judge', '0.3.20'),
    ('io.github.Skills03/scrimba-teaching', '1.0.1'),
    ('io.github.Skills03/scrimba-teaching', '1.1.0'),
    ('io.github.Skills03/scrimba-teaching', '1.2.0'),
    ('io.github.antuelle78/weather-mcp', '1.0.0'),
    ('io.github.jkakar/cookwith-mcp', '1.0.0'),
    ('io.github.jkakar/cookwith-mcp', '1.0.1'),
    ('io.github.jkakar/cookwith-mcp', '1.0.2'),
    ('io.github.ruvnet/claude-flow', '2.0.0-alpha.104'),
    ('io.github.ruvnet/claude-flow', '2.0.0-alpha.105'),
    ('io.github.ruvnet/ruv-swarm', '1.0.18'),
    ('io.github.ruvnet/ruv-swarm', '1.0.19'),
    ('io.github.toby/mirror-mcp', '0.0.4'),
    ('travel.kismet/mcp-server', '0.0.0')
)
AND (value->>'$schema' = '' OR value->>'$schema' IS NULL);
             server_name             |     version     | schema_value 
-------------------------------------+-----------------+--------------
 io.github.toby/mirror-mcp           | 0.0.4           | 
 io.github.jkakar/cookwith-mcp       | 1.0.0           | 
 io.github.ruvnet/ruv-swarm          | 1.0.19          | 
 io.github.jkakar/cookwith-mcp       | 1.0.1           | 
 io.github.ruvnet/ruv-swarm          | 1.0.18          | 
 io.github.antuelle78/weather-mcp    | 1.0.0           | 
 io.github.jkakar/cookwith-mcp       | 1.0.2           | 
 io.github.OtherVibes/mcp-as-a-judge | 0.3.12          | 
 travel.kismet/mcp-server            | 0.0.0           | 
 io.github.Skills03/scrimba-teaching | 1.0.1           | 
 io.github.OtherVibes/mcp-as-a-judge | 0.3.20          | 
 io.github.Skills03/scrimba-teaching | 1.2.0           | 
 io.github.ruvnet/claude-flow        | 2.0.0-alpha.105 | 
 io.github.ruvnet/claude-flow        | 2.0.0-alpha.104 | 
 io.github.Skills03/scrimba-teaching | 1.1.0           | 
 io.github.OtherVibes/mcp-as-a-judge | 0.3.14          | 
 io.github.OtherVibes/mcp-as-a-judge | 0.3.13          | 

This change enforces that all server.json files must have a valid
$schema URL. Empty or invalid schema URLs are now rejected by both
the API validator and the mcp-publisher CLI.

Changes:
- Add ValidSchemaVersions constant listing all accepted schema versions
- Add IsValidSchemaURL() helper function for validation
- Update API validator to require exact match of valid schema URLs
- Update mcp-publisher to reject empty or invalid $schema fields
- Add migration 011 to fix 17 existing entries with empty $schema
- Add comprehensive tests for schema validation

Fixes #805
@tadasant tadasant changed the title Prepare migration for 17 registry entries Fix missing $schema entries - data migration, API and mcp-publisher prevention Nov 28, 2025
Remove unnecessary code changes since schema validation was already
deployed. This PR now only contains the migration to fix historical
entries that were published before schema validation was enforced.
@tadasant tadasant marked this pull request as ready for review November 28, 2025 19:38
@tadasant tadasant requested a review from a team November 28, 2025 19:38
@tadasant tadasant changed the title Fix missing $schema entries - data migration, API and mcp-publisher prevention Fix missing $schema entries - data migration Nov 28, 2025
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