Skip to content

fix: pin generated MCP uvx package spec (fix #186)#221

Open
koriyoshi2041 wants to merge 2 commits into
MinishLab:mainfrom
koriyoshi2041:fix-pin-uvx-mcp-spec
Open

fix: pin generated MCP uvx package spec (fix #186)#221
koriyoshi2041 wants to merge 2 commits into
MinishLab:mainfrom
koriyoshi2041:fix-pin-uvx-mcp-spec

Conversation

@koriyoshi2041

Copy link
Copy Markdown

Problem

Generated MCP configs and agent instructions currently use uvx --from "semble[mcp]" semble, which resolves the latest published package each time uv refreshes its cache. That can make installed agent configs drift away from the Semble version that generated them, and it leaves the setup exposed to unexpected or compromised future releases.

Closes #186.

Fix

  • Build MCP config entries from the current Semble package version, e.g. semble[mcp]@0.4.2.
  • Reuse the same package spec for the Codex TOML installer block.
  • Update manual install docs and packaged agent instruction templates to show pinned uvx commands.
  • Add an installer regression test that checks every generated MCP config pins the current package version.

Tests

  • uv run --extra dev pytest tests/test_installer.py
  • uv run --extra dev ruff check src/semble/installer/agents.py src/semble/installer/config.py tests/test_installer.py
  • uv run --extra dev mypy src/semble/installer/agents.py src/semble/installer/config.py
  • git diff --check

Risk

Low. This only changes generated/manual uvx --from package specs; users can still upgrade Semble deliberately with uv tool upgrade semble and then reinstall/regenerate configs.

@greptile-apps

greptile-apps Bot commented Jul 8, 2026

Copy link
Copy Markdown

Confidence Score: 4/5

The generated MCP config path looks safe, but the shipped instruction templates can still drift on the next release.

  • Generated JSON and TOML MCP configs now use the runtime package version.
  • Static agent templates embed 0.4.2 and are copied verbatim during instruction installs.
  • Public docs also embed the current version without a visible generation or validation path.

src/semble/agents/*, README.md, docs/installation.md

Reviews (1): Last reviewed commit: "fix installer mcp package pin" | Re-trigger Greptile

Comment thread src/semble/agents/claude.md Outdated
`path` defaults to the current directory when omitted; git URLs are accepted.

If `semble` is not on `$PATH`, use `uvx --from "semble[mcp]" semble` in its place.
If `semble` is not on `$PATH`, use `uvx --from "semble[mcp]@0.4.2" semble` in its place.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Static Template Pin Drifts

When a later Semble package is released, the installer still copies these packaged agent templates verbatim, so fresh instruction installs can tell users or agents to run uvx --from "semble[mcp]@0.4.2" semble instead of the installed package version. That reintroduces the version drift this change fixes for generated MCP configs; the same static pin appears across the sibling files in src/semble/agents/.

Comment thread README.md
```

`--content` accepts `code` (default), `docs`, `config`, or `all`. `path` defaults to the current directory when omitted; git URLs are accepted. If `semble` is not on `$PATH`, use `uvx --from "semble[mcp]" semble` in its place.
`--content` accepts `code` (default), `docs`, `config`, or `all`. `path` defaults to the current directory when omitted; git URLs are accepted. If `semble` is not on `$PATH`, use `uvx --from "semble[mcp]@0.4.2" semble` in its place.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Manual Docs Pin Goes Stale

This public install command is tied to the current literal version, so a later release or checkout can still instruct users to install semble[mcp]@0.4.2. Users following the README would get an older MCP package than the Semble version whose docs they are reading unless the docs pin is generated or checked against semble.version.__version__.

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.

[suggestion] semble install should set exact versions for uvx commands

1 participant