Context
test/playwright/e2e/core/DistEsmWorkspaceBoot.spec.mjs fails in a working tree since #19223 (merged 09-25). In #17844's census at dev a9abb6c1dc, its beforeAll dies at :140:
npm pack --json --ignore-scripts --loglevel=error --pack-destination …
npm error code ERR_OUT_OF_RANGE
npm error data is too long (ssri fromData → Hash.update: the tarball outgrows one hash update)
CI stays green at the same head (run 36230911025, e2e-engine (1/3)), because a CI checkout holds almost nothing that git ignores.
The Problem
#19223 moved the .gitignore copy out of the committed .npmignore (177 → 40 lines) into prepack. --ignore-scripts skips prepack, so the spec's pack reads the header alone and packs everything the working tree holds and git ignores. After a full census that includes test/playwright/test-results/ (3.7 GiB), tmp/ (135 MiB) and .env. The tarball overflows, and when it doesn't, the spec boots a package a publish would never ship.
The Architectural Reality
#19223 added withComposedNpmIgnore(root, fn) (buildScripts/util/npmIgnoreComposition.mjs) for exactly this case, "a pack that passes --ignore-scripts", and migrated buildScripts/util/check-consumer-runtime-build.mjs:343. This spec is the one --ignore-scripts pack it did not migrate. Keeping --ignore-scripts is right: prepare runs the skills materializer, which a test must not run.
The Fix
Wrap the spec's execFileSync('npm', ['pack', …]) in withComposedNpmIgnore(engineRoot, () => …). Measured on the census tree: the wrapped pack is 5,805 entries and 26.8 MiB, with no test-results, no .env, and dist/parse5.mjs present, and .npmignore is restored afterwards.
Acceptance Criteria
Out of Scope
npmIgnoreComposition.mjs itself: it already has the seam.
- The rest of #17844's census, refreshed on #17844.
Related
#17844 (the census that surfaced it) · #19222 / #19223 (the composition) · #17931 / #18718 (the spec)
Origin Session ID: 81d1894c-d8fd-4192-8350-42e32eb0101e
Retrieval Hint: "DistEsmWorkspaceBoot npm pack ignore-scripts withComposedNpmIgnore ERR_OUT_OF_RANGE data is too long"
Context
test/playwright/e2e/core/DistEsmWorkspaceBoot.spec.mjsfails in a working tree since #19223 (merged 09-25). In #17844's census at deva9abb6c1dc, itsbeforeAlldies at:140:CI stays green at the same head (run 36230911025,
e2e-engine (1/3)), because a CI checkout holds almost nothing that git ignores.The Problem
#19223 moved the
.gitignorecopy out of the committed.npmignore(177 → 40 lines) intoprepack.--ignore-scriptsskipsprepack, so the spec's pack reads the header alone and packs everything the working tree holds and git ignores. After a full census that includestest/playwright/test-results/(3.7 GiB),tmp/(135 MiB) and.env. The tarball overflows, and when it doesn't, the spec boots a package a publish would never ship.The Architectural Reality
#19223 added
withComposedNpmIgnore(root, fn)(buildScripts/util/npmIgnoreComposition.mjs) for exactly this case, "a pack that passes--ignore-scripts", and migratedbuildScripts/util/check-consumer-runtime-build.mjs:343. This spec is the one--ignore-scriptspack it did not migrate. Keeping--ignore-scriptsis right:prepareruns the skills materializer, which a test must not run.The Fix
Wrap the spec's
execFileSync('npm', ['pack', …])inwithComposedNpmIgnore(engineRoot, () => …). Measured on the census tree: the wrapped pack is 5,805 entries and 26.8 MiB, with notest-results, no.env, anddist/parse5.mjspresent, and.npmignoreis restored afterwards.Acceptance Criteria
test-results/, the spec's four arms pass (headless,--workers=1).beforeAllwithERR_OUT_OF_RANGE.git statusshows.npmignoreunchanged after the run.Out of Scope
npmIgnoreComposition.mjsitself: it already has the seam.Related
#17844 (the census that surfaced it) · #19222 / #19223 (the composition) · #17931 / #18718 (the spec)
Origin Session ID: 81d1894c-d8fd-4192-8350-42e32eb0101e Retrieval Hint: "DistEsmWorkspaceBoot npm pack ignore-scripts withComposedNpmIgnore ERR_OUT_OF_RANGE data is too long"