Repository navigation
Conversation
ymichael
deleted the
bb/post-merge-fix-preserve-source-tarball-chunk-cle-thr_i8e66i688a
branch
August 25, 2026 17:51
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.
What was wrong
Removing bb-app's source-only
prepackcleanup in #2373 made an installed package self-repackable, but also removed the cleanup that ran immediately before source packaging. When Turbo restores bb-app output from cache, unreachable CLI chunks from an older generation can remain on disk and enter the next tarball as dead package weight.What changed
The bb-app build now bundles the existing chunk-pruning implementation into a self-contained script that ships in
dist, and the restoredprepackcommand runs that script before npm creates an archive. This preserves both source cleanup after a cache hit and ordinarynpm packfrom an installed copy. The tarball smoke now injects a stale chunk immediately before real packaging and rejects an archive that contains it; the publish workflow comment now describes the restored behavior.No host-daemon wire contract, CLI/config surface, SDK API, database, migration, or generated committed file changed.
HOST_DAEMON_PROTOCOL_VERSIONis unchanged.How you verified
npm pack --dry-run --json.npm pack; it succeeded and ran the included cleanup.pnpm exec turbo run build --filter=bb-app --output-logs=new-onlypnpm exec turbo run test --filter=bb-app -- test/index.test.ts— 67 tests passed.pnpm exec turbo run test --filter=@bb/server -- test/app/bb-app-artifact.test.ts— 12 tests passed.pnpm exec turbo run typecheck --filter=bb-app --filter=@bb/server --output-logs=new-onlypnpm exec turbo run smoke:tarball --filter=bb-app --force --output-logs=new-only— 12/12 tasks passed.git diff --checkFixes: no issue filed; follow-up to #2373.