Your baseline checks the label, not the bytes. That is the claim, and the republish below is the evidence for it.
The November 30 piece showed the shipped baseline checker catching an added tool and a widened input, and printing "No changes" when a server entry's command was swapped. The December 3 piece showed pinning the integrity hash in a lockfile catching a republished package while a version pin does not. Vlad Zoff put the two together in the comments: the baseline should also record the resolved tarball's integrity hash, so the check verifies what actually gets executed, not just the package label. I extended the checker and ran the republish.
The fixture is a small MCP server, mcp-test-pkg@1.0.0, served from a local registry, with one dependency, mcp-test-dep@1.0.0, and a config entry that installs it through npx. Two tarballs of the same version, A and B, differing only in a marker string printed at startup. After the swap the registry advertises the new tarball's integrity and serves the new bytes, exactly like a real republish. The baseline file is the only thing still pinning the old hash.
The extended checker keeps everything the November 30 checker does, the command-line comparison and the hash of local files named in the arguments, then adds the tarball step: it reads the package spec out of the entry's arguments, resolves it against the registry and records the resolved tarball's integrity and URL, then walks the dependency tree from the packuments, depth cap 3, and records every resolved package's integrity. It never launches the server. Exit 0 means unchanged, 1 means something changed, 2 is a usage error, same contract as before.
The two checkers were run against the same republish, one after the other.
| Tarball | sha512 integrity |
|---|---|
A, mcp-test-pkg@1.0.0
|
sha512-fJL3cdxhUoMuRUNDcbJvA3gdWrjvtO1DcvR0zby7YlKFlLifhlwt59yASFA2ChRdQIGZbS5y9jdUyVbtFdDSOw== |
B, mcp-test-pkg@1.0.0
|
sha512-MDJPhlVnise61f8SGpTA7G8fDX6Chvr2MRqmYUr/V7EIle1qFJPBvHf630MDtyQrxY0k7wtegQhw1C9Wh7nDtw== |
A, mcp-test-dep@1.0.0
|
sha512-QoYp0cgffj1c5t3Fa2rskSI51ffb1wTWuI/RDUIHNLKFLXLTpiairx6m/Hsx8LGhIcXRuOxcAYeWkWWuTI/K/A== |
B, mcp-test-dep@1.0.0
|
sha512-dxCQJVl68MfGZ13oPg2x8jkk+KrkgGJTzKYoxJyN7MCavd2lelxvxRVPnJFrOy64PDO8RH9qLQ9C/xc55AlPYQ== |
After the registry swapped A for B at the same version, the extended checker exited 1: CHANGED for server "test-pkg": tarball integrity changed: mcp-test-pkg@1.0.0. The November 30 checker on the same republish exited 0: No command change for server "test-pkg": npx -y mcp-test-pkg@1.0.0. Same config, same version, same command line. One sees the change, the other does not, because the command never changed. Only the bytes did.
And the bytes really did change, not just the record of them. A live npx run before the swap printed MCP-PKG-VERSION-A-MARKER at startup; a fresh-cache run after it printed MCP-PKG-VERSION-B-MARKER. The executed code was different. Meanwhile the server's tools/list reply stayed byte-identical, one tool, read_file, so a check that diffs the tool list would have seen nothing either. The version, the command and the tool list all agree. Only the hash disagrees.
Republishing the dependency too is caught the same way. With the dep swapped to its B tarball as well, the extended checker exited 1 again, naming both packages: CHANGED ... tarball integrity changed: mcp-test-pkg@1.0.0, mcp-test-dep@1.0.0. The tree capture earns its keep there. A version-only baseline would miss both.
Three limits, stated plainly. The tree is resolved from the registry's packuments, what the registry says the package needs, not from an actual install or a lockfile, so npm may dedupe differently and peer dependencies are not walked. The checker trusts the registry's advertised integrity: it compares the packument's hash then versus now, so a registry that lied in its metadata while serving different bytes would not be caught by this check, though npm itself verifies the downloaded tarball against the advertised hash and fails the install instead. And the version-range matching is a small built-in matcher for exact, caret, tilde, latest and star; the fixture uses an exact 1.0.0 pin. Nothing here touched the real npm registry either. The local registry is the whole test bed.
One honest correction from inside the run: the first driver run's live npx steps failed because the registry's packument omitted the package's bin field, so npx could not determine the executable. One fix, and the smoke runs passed on the re-run. The checker steps were unaffected, the hashes come from tarball bytes, not from the packument, and all three runs agree on the checker results.
So the baseline must verify what actually gets executed, not just the package label. A version pin says which release you asked for. A command check says how you launch it. Neither says what bytes run. The integrity hash is the only part of the baseline that does, and it costs one registry read per server to record.
Do you pin hashes for the tools your agents run, or do you trust the version string? If you have ever been bitten by a same-version change, what gave it away?
The full numbers behind this one are in the AheadKit guides. Everything I write here stays free, that part doesn't change. — Salam
More from AheadKit: programming books, packs and AI tools. Each page lists exactly what's inside before you pay.
Top comments (0)