Skip to content

chore: build wheel to wheel-out/ + bump to v0.2.2 — fix Phase-6 publish#10

Merged
rafael5 merged 1 commit into
mainfrom
chore/release-publish-dir-fix-v0.2.2
May 11, 2026
Merged

chore: build wheel to wheel-out/ + bump to v0.2.2 — fix Phase-6 publish#10
rafael5 merged 1 commit into
mainfrom
chore/release-publish-dir-fix-v0.2.2

Conversation

@rafael5
Copy link
Copy Markdown
Contributor

@rafael5 rafael5 commented May 11, 2026

Summary

v0.2.1's release.yml run revealed a Phase-0-contract collision. pypa/gh-action-pypi-publish uploads every file in dist/, but dist/ is reserved by the org-wide Phase-0 convention for tracked catalog artifactsdist/repo.meta.json + dist/mcp-tools.json. twine rejected dist/mcp-tools.json with:

InvalidDistribution: Unknown distribution format: 'mcp-tools.json'

Root-cause fix: build the wheel into its own directory (wheel-out/) so the publish step uploads only the .whl file. PyPI versions are immutable so v0.2.1 can't be retried — bump to v0.2.2.

Changes

  • Makefile:
    • build: python -m build --wheel --outdir wheel-out
    • clean: drops wheel-out + (belt-and-suspenders) any stale dist/*.whl / dist/*.tar.gz from forgotten builds
  • .gitignore: ignores wheel-out/; comment block rewritten to explain dist/ is the catalog dir and wheel-out/ is the build dir
  • .github/workflows/release.yml:
    • Build step: python -m build --wheel --outdir wheel-out
    • GH Release step: gh release create ... wheel-out/*.whl
    • PyPI publish step: explicit packages-dir: wheel-out/
  • Versions bumped to 0.2.2 across pyproject.toml, __init__.py, server.json, dist/mcp-tools.json regen.

Verified locally

  • make check — ruff + mypy + 41/41 pytest + manifest + check-agents drift gates all clean
  • make buildwheel-out/m_dev_tools_mcp-0.2.2-py3-none-any.whl
  • make clean → wipes wheel-out + any stale dist/ wheel; dist/ retains only the tracked Phase-0 manifests

After merge

Push v0.2.2 tag. release.yml fires; expected outcome — all four publish steps succeed:

  1. ✅ build wheel to wheel-out/
  2. gh release create v0.2.2 wheel-out/*.whl
  3. ✅ PyPI publish from wheel-out/ (Trusted Publisher confirmed configured)
  4. mcp-publisher publish (no longer skipped)

Test plan

  • Local gates green
  • Wheel builds to wheel-out/ only; dist/ stays clean
  • CI green
  • After merge: push v0.2.2 tag → release.yml fires end-to-end → m-dev-tools-mcp v0.2.2 live on PyPI + MCP registry.

v0.2.1's release.yml run revealed a Phase-0-contract collision: the
PyPI publish step (twine via pypa/gh-action-pypi-publish) uploads
every file in `dist/`, but `dist/` is reserved by the org-wide
Phase-0 convention for *tracked* catalog artifacts —
`dist/repo.meta.json` + `dist/mcp-tools.json`. twine rejected
`dist/mcp-tools.json` with:

  InvalidDistribution: Unknown distribution format: 'mcp-tools.json'

Root-cause fix: build the wheel into its own directory.

* Makefile `build`: `python -m build --wheel --outdir wheel-out`
* Makefile `clean`: drops `wheel-out` + (belt-and-suspenders)
  any stale `dist/*.whl` / `dist/*.tar.gz` from forgotten builds
* .gitignore: ignores `wheel-out/`; comment block rewritten to
  explain that `dist/` is the catalog dir and `wheel-out/` is the
  build dir
* .github/workflows/release.yml: `python -m build --wheel
  --outdir wheel-out`; `gh release create ... wheel-out/*.whl`;
  `pypa/gh-action-pypi-publish` gets explicit `packages-dir:
  wheel-out/`

PyPI versions are immutable so v0.2.1 can't be retried — bump
to v0.2.2 across all four version-bearing surfaces:

* pyproject.toml: version 0.2.1 → 0.2.2
* src/m_dev_tools_mcp/__init__.py: __version__ → "0.2.2"
* server.json: top-level version + packages[0].version → "0.2.2"
* dist/mcp-tools.json regen

### Verified locally

* make check — ruff + mypy + 41/41 pytest + manifest +
  check-agents drift gates all clean
* make build → `wheel-out/m_dev_tools_mcp-0.2.2-py3-none-any.whl`
* make clean → wipes wheel-out + any stale dist/ wheel; dist/
  retains the tracked manifests only

### After merge

Push v0.2.2 tag. release.yml fires:
1. build wheel to wheel-out/ ✅ (was failing before due to dist/)
2. gh release create with wheel-out/*.whl
3. PyPI publish from wheel-out/ (should pass — Trusted Publisher
   confirmed configured)
4. mcp-publisher publish (no longer skipped)
@rafael5 rafael5 merged commit c88de5f into main May 11, 2026
1 check passed
rafael5 added a commit that referenced this pull request May 11, 2026
…y publish (#11)

v0.2.2 published successfully to PyPI (m-dev-tools-mcp 0.2.2 live)
but the MCP registry rejected the server.json with HTTP 422:

  validation failed: expected length <= 100
  body.description: "MCP server for the m-dev-tools org catalog —
  exposes route_intent, describe, and verify as first-class agent
  tools." (116 chars)

The official registry caps `description` at 100 characters; ours was
116. Easy fix: shorten to a 76-char form that keeps the same gist.

Description rewritten everywhere it appears:

* server.json description: now 76 chars
* pyproject.toml description: same, kept in sync (no length limit on
  PyPI side, but the two should match — registry consumers read both)

Bump to v0.2.3 (PyPI 0.2.2 is live + immutable):

* pyproject.toml: version 0.2.2 → 0.2.3
* src/m_dev_tools_mcp/__init__.py: __version__ → "0.2.3"
* server.json: top-level version + packages[0].version → "0.2.3"
* dist/mcp-tools.json regen

Also lands the belt-and-suspenders cleanup line in Makefile's
clean target that didn't make it into PR #10 — adds `rm -f
dist/*.whl dist/*.tar.gz` so a forgotten `python -m build` without
--outdir doesn't leak through to a future PyPI upload.

### Verified locally

* make check — ruff + mypy + 41/41 pytest + manifest + check-agents
  drift gates all clean
* make build → wheel-out/m_dev_tools_mcp-0.2.3-py3-none-any.whl
* description-length sanity: server.json description is 76 chars
  (well under the 100-char registry cap)

### After merge

Push v0.2.3 tag. release.yml fires; expected: 4-of-4 steps pass
(build / GH-Release / PyPI / MCP registry), m-dev-tools-mcp 0.2.3
live on both PyPI and registry.modelcontextprotocol.io.
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.

1 participant