Skip to content

AI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary

fix(release): bring mcp/manifest.json into the version lockstep (#1122)

Ilia Alshanetsky4cecd4ea3261
diff --git a/.github/scripts/prepare_release.py b/.github/scripts/prepare_release.py
index 5f2095eb..417412d6 100755
--- a/.github/scripts/prepare_release.py
+++ b/.github/scripts/prepare_release.py
@@ -30,6 +30,7 @@ JSON_VERSION_FILES = (
ROOT / ".codex-plugin" / "plugin.json",
ROOT / ".grok-plugin" / "plugin.json",
ROOT / "gemini-extension.json",
+ ROOT / "mcp" / "manifest.json",
)
MARKETPLACE_FILES = (
diff --git a/.github/workflows/changelog-guard.yml b/.github/workflows/changelog-guard.yml
index 0d240a16..6ef4329e 100644
--- a/.github/workflows/changelog-guard.yml
+++ b/.github/workflows/changelog-guard.yml
@@ -98,6 +98,7 @@ jobs:
.grok-plugin/plugin.json
.grok-plugin/marketplace.json
gemini-extension.json
+ mcp/manifest.json
)
bumps=()
diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml
index 0b2a89ef..2e0f2b6b 100644
--- a/.github/workflows/prepare-release.yml
+++ b/.github/workflows/prepare-release.yml
@@ -91,7 +91,8 @@ jobs:
.codex-plugin/plugin.json \
.grok-plugin/plugin.json \
.grok-plugin/marketplace.json \
- gemini-extension.json
+ gemini-extension.json \
+ mcp/manifest.json
git status --short
if git diff --cached --quiet; then
echo "No release changes staged (empty changelog.d?)."
diff --git a/changelog.d/+mcp-manifest-version-lockstep.fixed.md b/changelog.d/+mcp-manifest-version-lockstep.fixed.md
new file mode 100644
index 00000000..b1bc4809
--- /dev/null
+++ b/changelog.d/+mcp-manifest-version-lockstep.fixed.md
@@ -0,0 +1 @@
+Add `mcp/manifest.json` to the lockstep version set so the `.mcpb` manifest is bumped by release prep and guarded against drift in feature PRs.
diff --git a/tests/test_changelog_workflow.py b/tests/test_changelog_workflow.py
index a3015b65..2ffcf310 100644
--- a/tests/test_changelog_workflow.py
+++ b/tests/test_changelog_workflow.py
@@ -221,6 +221,13 @@ class TestChangelogWorkflow(unittest.TestCase):
),
"3.18.1",
)
+ self.assertEqual(
+ mod.version_from(
+ "mcp/manifest.json",
+ json.dumps({"manifest_version": "0.3", "version": "3.18.1"}),
+ ),
+ "3.18.1",
+ )
with self.assertRaises(SystemExit):
mod.version_from(".claude-plugin/plugin.json", "{not-json")
@@ -254,6 +261,62 @@ class TestChangelogWorkflow(unittest.TestCase):
mod.main(["--version", "3.18.1"])
self.assertIn("Refusing to re-release", str(ctx.exception))
+ def test_prepare_release_bumps_mcp_manifest(self) -> None:
+ mod = _load_prepare_release()
+ self.assertIn(ROOT / "mcp" / "manifest.json", mod.JSON_VERSION_FILES)
+
+ def test_changelog_guard_version_paths_match_release_bump_set(self) -> None:
+ """Every path prepare_release.py bumps must be guarded, and vice versa."""
+ mod = _load_prepare_release()
+ bump_set = {
+ str(path.relative_to(ROOT))
+ for path in (
+ mod.PYPROJECT,
+ mod.UV_LOCK,
+ mod.SKILL_MD,
+ *mod.JSON_VERSION_FILES,
+ *mod.MARKETPLACE_FILES,
+ )
+ }
+ text = (ROOT / ".github" / "workflows" / "changelog-guard.yml").read_text(
+ encoding="utf-8"
+ )
+ match = re.search(r"VERSION_PATHS=\(\n(.*?)\n\s*\)", text, re.DOTALL)
+ if not match:
+ raise AssertionError("VERSION_PATHS=( ... ) not found in changelog-guard.yml")
+ guarded = {line.strip() for line in match.group(1).splitlines() if line.strip()}
+ self.assertIn("mcp/manifest.json", guarded)
+ self.assertEqual(bump_set, guarded)
+
+ def test_prepare_release_workflow_stages_every_bumped_file(self) -> None:
+ """A file prepare_release.py rewrites but the workflow never stages is
+ silently dropped from the release commit, so the bump is lost and any
+ test waiting on the new value keeps skipping."""
+ mod = _load_prepare_release()
+ bump_set = {
+ str(path.relative_to(ROOT))
+ for path in (
+ mod.PYPROJECT,
+ mod.UV_LOCK,
+ mod.SKILL_MD,
+ *mod.JSON_VERSION_FILES,
+ *mod.MARKETPLACE_FILES,
+ )
+ }
+ text = (ROOT / ".github" / "workflows" / "prepare-release.yml").read_text(
+ encoding="utf-8"
+ )
+ match = re.search(r"\n\s*git add \\\n(.*?)\n\s*git status", text, re.DOTALL)
+ if not match:
+ raise AssertionError("git add ... block not found in prepare-release.yml")
+ staged = {
+ line.strip().rstrip("\\").strip()
+ for line in match.group(1).splitlines()
+ if line.strip()
+ }
+ self.assertIn("mcp/manifest.json", staged)
+ self.assertEqual(set(), bump_set - staged)
+
def test_bump_all_updates_lockstep_surfaces(self) -> None:
mod = _load_prepare_release()
with tempfile.TemporaryDirectory() as tmp:
@@ -263,6 +326,7 @@ class TestChangelogWorkflow(unittest.TestCase):
(tmp_path / ".claude-plugin").mkdir()
(tmp_path / ".codex-plugin").mkdir()
(tmp_path / ".grok-plugin").mkdir()
+ (tmp_path / "mcp").mkdir()
(tmp_path / "pyproject.toml").write_text(
'[project]\nname = "last30days-skill"\nversion = "3.18.1"\n',
@@ -277,6 +341,7 @@ class TestChangelogWorkflow(unittest.TestCase):
".codex-plugin/plugin.json",
".grok-plugin/plugin.json",
"gemini-extension.json",
+ "mcp/manifest.json",
):
(tmp_path / rel).write_text(
json.dumps({"name": "last30days", "version": "3.18.1"}, indent=2)
@@ -314,6 +379,7 @@ class TestChangelogWorkflow(unittest.TestCase):
tmp_path / ".codex-plugin" / "plugin.json",
tmp_path / ".grok-plugin" / "plugin.json",
tmp_path / "gemini-extension.json",
+ tmp_path / "mcp" / "manifest.json",
)
mod.MARKETPLACE_FILES = (
tmp_path / ".claude-plugin" / "marketplace.json",
@@ -321,7 +387,7 @@ class TestChangelogWorkflow(unittest.TestCase):
)
touched = mod.bump_all("9.9.9")
- self.assertEqual(len(touched), 9)
+ self.assertEqual(len(touched), 10)
pyproject = (tmp_path / "pyproject.toml").read_text(encoding="utf-8")
self.assertIn('version = "9.9.9"', pyproject)
@@ -337,6 +403,7 @@ class TestChangelogWorkflow(unittest.TestCase):
".codex-plugin/plugin.json",
".grok-plugin/plugin.json",
"gemini-extension.json",
+ "mcp/manifest.json",
):
data = json.loads((tmp_path / rel).read_text(encoding="utf-8"))
self.assertEqual(data["version"], "9.9.9", msg=rel)
diff --git a/tests/test_plugin_contract.py b/tests/test_plugin_contract.py
index 171a7fc5..237661e7 100644
--- a/tests/test_plugin_contract.py
+++ b/tests/test_plugin_contract.py
@@ -87,6 +87,23 @@ class TestPluginContract(unittest.TestCase):
self.assertEqual(1, len(grok_plugins))
self.assertEqual(version, grok_plugins[0]["version"])
+ def test_mcp_manifest_version_matches_lockstep(self) -> None:
+ pyproject = tomllib.loads((ROOT / "pyproject.toml").read_text(encoding="utf-8"))
+ version = pyproject["project"]["version"]
+ mcp_version = _json(ROOT / "mcp" / "manifest.json")["version"]
+
+ # mcp/manifest.json joined the lockstep set after it had already
+ # stalled at 3.6.0. Feature PRs may not bump it; only the next release
+ # PR (prepare_release.py) moves it off 3.6.0, at which point this
+ # branch is dead and the equality below is enforced unconditionally.
+ # Any other mismatch is fresh drift and fails.
+ if mcp_version == "3.6.0" and version != "3.6.0":
+ self.skipTest(
+ "mcp/manifest.json is at pre-lockstep 3.6.0; the next release PR "
+ "bumps it via prepare_release.py"
+ )
+ self.assertEqual(version, mcp_version)
+
def test_claude_marketplace_has_current_schema_shape(self) -> None:
marketplace = _json(ROOT / ".claude-plugin" / "marketplace.json")