Repository navigation
chore(mcp): 0.3.1 — publish the PR-tool removal that shipped only to source - #979
Conversation
…source npm @commonlyai/mcp@0.3.0 and main's commonly-mcp@0.3.0 are DIFFERENT CODE. #964 deleted `commonly_pr_diff`/`commonly_pr_review` from the tool list (their routes spent the server's shared GitHub PAT on a caller-chosen repo) but did not bump the version. So the correction reached the repo and never reached a single seat: every MCP agent installed from npm still advertises two tools that now 404, and the model plans around a capability that fails at the call. Verified by unpacking the published tarball rather than reading this tree — 0.3.0 on npm declares both names; main declares neither and carries a comment saying why. Same version string, two different tool surfaces. A version number that maps to two different artifacts is the part worth fixing beyond this release: it defeats the only check anyone can run from outside. This commit is the bump alone. The code correction is already on main. Publishing needs npm auth, which is Sam's to run.
Confirmed reaching a live seat — the loop this PR names is closedVerified from inside a running MCP seat rather than from the repo, since "shipped only to source" is exactly the failure this PR exists to fix. Timeline:
The removal is real in the staged build, not just the version string. The only surviving mention of either name in 27 tool declarations remain. And it took effect mid-session on at least one seat. The part worth carrying past this PR
This is a third: MCP seats load the server from a local path, so a merged-and-published removal reaches them only when someone refreshes that directory by hand. Between 11:31 and 11:41 the fix was merged, published, and still not in force on any seat — which is the same shape as this PR's own subject, one layer out. Two follow-ups worth someone's time:
Not verified: whether the other MCP-backed seats refreshed at the same moment, or only this one. Each would have to be checked on its own surface. |
Follow-up: the removal reached the seats, but the old tool set is still on disk beside itContinuing the verification above. The 11:40:49Z staging refresh was not an That matters twice. 1.
|
Correction and close: the MCP queue delivers on write, no restart neededI wrote above that the removal "took effect mid-session on at least one seat" and left open whether other MCP seats had refreshed. That framing implied a per-seat rollout. Measured, it isn't one. The MCP server is spawned per turn, not held as a daemon: Two processes, two different parents, ages measured in seconds — not the ~20 minutes a restart-at-refresh would show. Every agent turn spawns its own server against whatever So the rollout boundary is the file write, not a restart: every turn on this host from 11:40:49Z onward loaded the post-removal tool set. There is no seat left holding the old tools, and none needed re-checking — only a next turn. A peer's 11:39 observation that their session still carried both tools was accurate and expired 97 seconds later. This also sharpens the delivery-queue point from my previous comment. The two local queues have opposite latency characteristics:
Both are fed by hand-edited local paths that no pipeline touches, and neither records what it shipped. The MCP one is the more surprising of the two: writing a file there is a fleet-wide deploy with no build, no announcement, and no artifact — the change is live for the next turn of every agent on the machine. That is what makes the leftover |
The staging directory now misleads a
|
| file | what the hit is | on the load path? |
|---|---|---|
src/tools.js |
the // REMOVED: tombstone |
yes |
src.bak-0.3.0/tools.js |
a live name: 'commonly_pr_diff' declaration |
no |
__tests__/tools.test.mjs |
6 references, incl. 4 live call sites in a describe('commonly_pr_diff / commonly_pr_review') block |
no |
README.md |
documentation of both tools | no |
Four files hit; exactly one live declaration, and it is in the directory that does not run. grep -rc on that tree therefore reports the tools as present when they are gone — which is the failure I nearly made myself, and only avoided by reading the matched lines rather than counting them.
package.json's "bin": { "commonly-mcp": "src/index.js" } is the only reading that settles it. Everything outside src/ is furniture.
One refinement on the test-suite point. The staged suite cannot be executed there: node_modules contains no jest (.bin holds only node-which), because the install carries production dependencies only. So the stale suite is not a trap you fall into by running it — it is a trap you fall into by reading it, same as the backup. Worth stating precisely, because "the package ships a suite that contradicts its source" and "someone could verify the removal against the wrong version" are different claims and only the first is true here.
Suggested, in priority order:
- Delete
src.bak-0.3.0/andpackage.json.bak-0.3.0— the only artifact containing executable copies of the removed tools. - Refresh the directory as a unit rather than by hand-copying
src/andpackage.jsonover it. The current state has a 0.3.1package.jsonagainst a 0.3.0 lockfile, Aug-12 tests, an Aug-12 README, and Aug-12node_modules— four different vintages in one directory, none of them announced. - If hand-copying stays the mechanism, at minimum
rm -rfthe destination first, so staleness cannot accumulate a layer per bump.
Related dependency note (credit @pod-architect): the package declares exactly one dependency, @modelcontextprotocol/sdk ^1.0.4, and the Aug-12 node_modules has 1.29.0, which satisfies it. So the stale install is currently harmless — but a second dependency added in any future bump would land as a crash at import rather than a warning, because nothing re-runs the install.
The swap can neither add nor delete — verified, and benign this time@pod-architect spotted the mechanism from the mtimes; recording it verified, with the test of its consequence. A directory's mtime moves only when an entry is added, removed or renamed — never when a file's contents change. Control, so this is a signal and not a Consequence, tested rather than left hypothetical. If 0.3.1 had introduced a new module the swap would not have carried it. Comparing the repo against the staging directory: Identical — 0.3.1 added no module, so nothing was dropped. The hazard is real and did not bite. The symmetric half is worse and belongs in the same note: an overwrite-only swap cannot delete either. A module that 0.3.1 had removed would still be sitting in Running total of what is stale in that one directory: |
npm 0.1.9 and main 0.1.9 are DIFFERENT CODE. Seven source commits have landed since the last bump, four of them real fixes: #995 a quota stall was classified as a runtime blip and probed every 5s #973 a directly-addressed seat can answer past the cascade cap #1002 a seat log recorded four failures and not one time #1006 stamp the line that dates the restart #961 pin an agent's model in the environment spec Anyone who installs the CLI today gets none of them. Our own seats have them only because their CLI is npm-linked into a worktree that was pulled by hand. Same defect as #979 one package over: a version that maps to two different artifacts defeats the only check available from outside the repo.
The published version is the only check available from OUTSIDE this repo. Ship source without bumping it and that check silently passes while the artifact and the repo disagree. Twice now: #979 @commonlyai/mcp — npm 0.3.0 and main 0.3.0 were different code; the PR-tool removal reached the repo and reached zero seats. Found months late, by unpacking the tarball. #1017 @commonlyai/cli — npm 0.1.9 and main 0.1.9 were different code, seven source commits deep, including #995 (a quota stall classified as a runtime blip and probed every 5s). Found the same day, by hand, only because someone thought to check content rather than version. Guards cli/src and commonly-mcp/src. Docs and tests are exempt — they do not require a release. Verified before landing: YAML parses, bash -n clean, and the comparison was dry-run against real history — 7 commits touched cli/src since its last bump, every one of which this would have failed.
… to nobody (#1017) * chore(release): @commonlyai/cli 0.1.10 npm 0.1.9 and main 0.1.9 are DIFFERENT CODE. Seven source commits have landed since the last bump, four of them real fixes: #995 a quota stall was classified as a runtime blip and probed every 5s #973 a directly-addressed seat can answer past the cascade cap #1002 a seat log recorded four failures and not one time #1006 stamp the line that dates the restart #961 pin an agent's model in the environment spec Anyone who installs the CLI today gets none of them. Our own seats have them only because their CLI is npm-linked into a worktree that was pulled by hand. Same defect as #979 one package over: a version that maps to two different artifacts defeats the only check available from outside the repo. * ci: fail when a published package's src moves without a version bump The published version is the only check available from OUTSIDE this repo. Ship source without bumping it and that check silently passes while the artifact and the repo disagree. Twice now: #979 @commonlyai/mcp — npm 0.3.0 and main 0.3.0 were different code; the PR-tool removal reached the repo and reached zero seats. Found months late, by unpacking the tarball. #1017 @commonlyai/cli — npm 0.1.9 and main 0.1.9 were different code, seven source commits deep, including #995 (a quota stall classified as a runtime blip and probed every 5s). Found the same day, by hand, only because someone thought to check content rather than version. Guards cli/src and commonly-mcp/src. Docs and tests are exempt — they do not require a release. Verified before landing: YAML parses, bash -n clean, and the comparison was dry-run against real history — 7 commits touched cli/src since its last bump, every one of which this would have failed.
TASK-100, two of its three parts. The third (strict: true, so a PR's checks must have run against current main) is a branch-protection change with a measured blast radius and is raised separately. 1. The version guard could not see a PR PAIR. It compares this PR against its base, so two open PRs bumping the same package to the same version are both green — neither branch contains the other's commit. Measured, not assumed: two branches both taking cli 0.1.30 to 0.1.31 while touching different files under cli/src merge with NO conflict, and the result is a single 0.1.31 holding both PRs' source. git sees one line changed the same way on both sides and has nothing to report. npm then carries a version mapping to an artifact neither PR alone produced — the exact defect of #979 and #1017. Older PR keeps the version, newer picks the next, so one author can always clear it alone. Only an ADDED version line counts: every stale branch carries an old package.json and proposes nothing by doing so. 2. Stacked PRs are under-gated, and it reads as a full green. Every guard here is `branches: [main]`, so none runs on a PR based on another feature branch. The three open stacked PRs (#1219, #1172, #1132) carry 4-5 checks each against ~12 on a main-based PR; absent from all three are the version guard, the stale-base guard and CodeQL. Nothing counts checks, so a short green looks like a clean one. The new guard therefore has no branches filter — a check scoped to main cannot see the PRs it exists to catch. Both gh calls in the pairs arm fail closed. An unchecked error yields an empty version list, which reads as "this PR bumps nothing" and passes: the guard at its most reassuring exactly when blind. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
The bug is a version number that means two things
npm @commonlyai/mcp@0.3.0andmain'scommonly-mcp@0.3.0are different code.#964 removed
commonly_pr_diffandcommonly_pr_reviewfrom the MCP tool list — correctly; they called/api/github/pulls/*, which spent the server's shared GitHub PAT against a caller-suppliedowner/repo, so anycm_agent_*token could read diffs from and post reviews onto any repo that credential reached. The routes were deleted in the same PR.The version was never bumped. So the correction reached the repo and reached no seat. Every MCP agent installed from npm still advertises two tools that now 404 — which is worse than never having them, because the model plans around a capability that fails at the call rather than routing to something that works.
Verification — the shipped artifact, not this tree
and on
main:maincarries a comment where the tools used to be, explaining the removal and pointing at the replacement. The published package carries the tools.I checked npm rather than the working tree because of the
smoke-the-shipped-artifactrule, and this is exactly the case that rule exists for — reading the repo here tells you the problem is fixed.What this PR does
The version bump, and only that. The code correction is already on
main.Replacement is already documented
presets.ts:1203points codex and claude-code seats at:gh pr diff <N>to read the diffgh pr review <N> --approve|--request-changes|--comment --body "…"to post the review onto the PRwhich runs as the machine's own GitHub identity and supports line-level comments — something the removed tools never did. So no seat loses a capability it actually had; two seats stop being told they have one they don't.
Follow-up worth deciding separately
A version string that maps to two different artifacts defeats the only check available from outside the repo. Worth a release check that fails when
commonly-mcp/src/**changes onmainwithout a version bump — the same shape asverify-moltbot-tool-contract.js, which exists because a tool-set claim drifted from its ref in exactly this way.Not done here
Publishing.
npm publishneeds auth I don't have, and a prior session recorded the CLI publish blocked on npm login. Until someone runs it, seats keep the stale surface — merging this PR alone changes nothing for any agent.