fix(release): report the patched provider version prepack actually bundled#355
Merged
Conversation
added 2 commits
July 26, 2026 13:24
…on in prepack prepack.js logs which patched `@earendil-works/pi-ai` it bundled, and that line is the record used to confirm what a published tarball actually carries. The version was a string literal, so it went stale the moment the pin moved: the script announces 0.80.10 while the workspace pins, patches and bundles 0.82.1. Fails on the current tree naming the literal it found.
…ndled The bundle step announced a hard-coded `@earendil-works/pi-ai@0.80.10` while the workspace pins, patches and bundles 0.82.1, so the one line an operator reads to confirm what a published tarball carries named a version that is not in it. Derive it from the bundled package's own manifest instead, via the `readManifest` helper this script already uses for the same package three lines earlier. The source path is realpath-resolved through the patched pnpm store entry, so the reported version is the patched copy that ships.
anconina
force-pushed
the
fix/prepack-pi-ai-version-drift
branch
from
July 26, 2026 10:24
3fa4eed to
0341f85
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
prepack.jsbundles the patched@earendil-works/pi-aiinto the published tarball and logs which version it bundled. That version was a string literal, so it went stale the moment the pin moved:The workspace pins, patches and bundles 0.82.1. So the one line an operator reads to confirm what a published tarball actually carries names a version that is not in it.
prepack.jsruns insidenpm-publish.yml, so this is the release-time record, not console decoration — and a misreport is worse than no report, because it reads as confirmation.The fix derives the version from the bundled package's own manifest, using the
readManifesthelper this script already imports and already calls for this exact package three lines earlier:patchedProviderSourceis realpath-resolved, so it lands on the patched pnpm store entry and the reported version is the patched copy that ships:The guard is added as a new dimension in
umbrella-bundling.test.ts, alongside the existing "prepack.js must deriveWORKSPACE_PACKAGESfrombundledDependencies, not a literal array" assertion — same drift class, same file, so the two stay together. Any reintroducedpi-ai@<semver>literal inprepack.jsfails it.Related Issue
N/A: single-line correctness fix to a release script's log output, plus the architecture guard that makes the drift class fail locally instead of silently misreporting at publish time. No runtime behavior changes.
Type of Change
Checklist
pnpm validate)CLAUDE.mdreferenceprepack.js's bundling role, which is unchangedN/AreasonRED Test Proof
The guard was committed first (
885526b87) so the failing state reproduces from that commit alone, against the unmodifiedprepack.js:Green with the fix applied (
3fa4eed71), whole file:Evidence and Residual Risk
0.82.1store entryprepack.jsend to end — that step rewritespackage.jsonand bundles intonode_modules, so it is left to thetarballCI job and the real publish.pi-ai@<semver>literal inprepack.js. It does not prove the derived value is correct on every future tree, only that the value is derived rather than frozen.pnpm.patchedDependencies, thepatches/*.patchfilename, the manifest pins) are already moved together by the upgrade flow and are unaffected here.