Skip to content

The binary tells the truth about its version#22

Merged
hiranofficial merged 1 commit into
mainfrom
fix/version-drift
Jul 25, 2026
Merged

The binary tells the truth about its version#22
hiranofficial merged 1 commit into
mainfrom
fix/version-drift

Conversation

@hiranofficial

Copy link
Copy Markdown
Contributor

Found by the 0.1.1 cold-install smoke test: the freshly published CLI introduced itself as 0.1.0.

Both membook --version and the MCP server's SERVER_VERSION were hardcoded strings — changesets bumps package.json, and a constant nobody remembers is wrong by the second release, forever. Both now read the manifest at runtime (createRequire; src/ and dist/ sit at the same depth, so one relative path serves tests and the published tarball alike).

Drift guards added: a test runs the built binary and pins --version to package.json; another pins SERVER_VERSION the same way. Any future hardcoding fails on the first version bump instead of in a user's terminal.

Changesets for both packages are in the PR — same commit as the fix, per the lesson from #20. Merging starts the 0.1.2 train for membook + @membook/mcp; core and spec are untouched. 463 tests green; built artifact verified answering 0.1.1 pre-bump.

The published 0.1.1 introduced itself as 0.1.0. Both the CLI's
--version and the MCP server's SERVER_VERSION were hardcoded strings —
changesets bumps the manifest, and a constant nobody remembers is wrong
by the second release, forever.

Both now read package.json at runtime via createRequire; src/ and dist/
sit at the same depth, so the one relative path holds in tests and in
the published tarball alike. Drift-guard tests pin the running binary's
answer and the server's constant to their manifests, so any future
hardcoding fails on the first bump rather than in a user's terminal.

Changesets included in the same commit as the fix this time.
@hiranofficial
hiranofficial merged commit c12907d into main Jul 25, 2026
8 checks passed
@hiranofficial
hiranofficial deleted the fix/version-drift branch July 25, 2026 01:13
@github-actions github-actions Bot mentioned this pull request Jul 25, 2026
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