fix(T12011): publish pipeline stages studio-dist; tarball gate asserts files[] entries#1098
Merged
Conversation
… asserts files[] entries exist Root cause: packages/cleo/package.json declares "studio-dist" in files[] but the release CI pipeline never built @cleocode/studio before pnpm publish. npm silently omits files[] entries that do not exist at publish time, so every @cleocode/cleo tarball shipped without studio-dist from v2026.6.13 onward — cleo web served a blank Studio (E_STUDIO_BUNDLE_ABSENT) from every npm install. Changes: - .github/workflows/release.yml: add "Build Studio bundle and stage into packages/cleo" step (builds @cleocode/brain + @cleocode/studio, invokes copy-studio-dist.mjs); add "Verify @cleocode/cleo tarball contents (T12011)" step running the new gate script. - scripts/assert-cleo-tarball.mjs: new loud gate — every files[] entry must exist on disk (::error:: annotation + exit 1 on missing); studio-dist/client/_app/ must be present. - packages/studio/package.json: add @cleocode/cant, @cleocode/caamp, jsonc-parser as explicit deps so pnpm links them for the SvelteKit adapter-node SSR server transitive resolution. - docs/plan/dogfood-harness-question-ledger.md: append DHQ-098 entry (FIXED). - .changeset/t12011-studio-dist-publish.md: changeset for @cleocode/cleo + @cleocode/studio. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1f8c192 to
ee567a5
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.
Summary
packages/cleo/package.jsondeclaresstudio-distinfiles[]but the release CI pipeline never built@cleocode/studiobeforepnpm publish. npm silently omitsfiles[]entries that do not exist at publish time — so every@cleocode/cleotarball has shipped withoutstudio-distsince v2026.6.13.cleo webboots the gateway but/studioreturnsE_STUDIO_BUNDLE_ABSENTfrom every npm install..github/workflows/release.yml): new "Build Studio bundle and stage into packages/cleo" step runs afterpnpm run build, builds@cleocode/brain+@cleocode/studio, then invokespackages/cleo/scripts/copy-studio-dist.mjs(the T11979 staging mechanism). Adds a guard that fails the step ifstudio-dist/client/is absent after staging.scripts/assert-cleo-tarball.mjs): new loud gate run by a CI step before publish — asserts everyfiles[]entry exists on disk with::error::annotations + exit 1 on any missing entry; also assertsstudio-dist/client/_app/is present. A silently-thinner tarball can never ship again.packages/studio/package.json): add@cleocode/cant,@cleocode/caamp,jsonc-parseras explicit workspace deps so pnpm links them into studio'snode_modulesfor the SvelteKit adapter-node SSR server transitive resolution.docs/plan/dogfood-harness-question-ledger.md(status: FIXED).Local pack-listing proof
After
CLEO_STUDIO_BUILD_DIR=/tmp/studio-build-T12011 node packages/cleo/scripts/copy-studio-dist.mjs:studio-distfiles appear in the tarball listing. Before the fix,npm pack --dry-runshowed zerostudio-distentries.Gate fail-mode proof
Gate pass-mode proof
Template parity lint (Gate 7)
Gate 7 (
scripts/lint-deployed-template-parity.mjs) covers onlyrelease-prepare.yml—release.ymlhas no template. Gate 7 is unaffected by this PR.Post-publish proof
Full post-publish proof (
cleo webserving a non-blank Studio from a freshnpm install -g @cleocode/cleo) lands with the next release after the Studio build resolves remaining runtime dep-chain issues. The gate in this PR ensures the tarball never ships withoutstudio-distagain.Staging mechanism
packages/cleo/scripts/copy-studio-dist.mjs(line 55:await cp(srcDir, destDir, { recursive: true })) is the T11979 staging mechanism invoked by thepostbuildlifecycle hook. The CI step now invokes it explicitly after building Studio.🤖 Generated with Claude Code