Repository navigation
test(cli): packed-search-catalog's kept-store case starts no background Core download - #13639
Conversation
…nd Core download The case runs an installed copy, a global copy, without CI set, so outside CI its run starts the background Core step. Run alone, that step wrote releases/.failed-0.7.18.json into the case's cache 2.7 s after the test run ended, while the run folder was being removed: the race #13634 fixed in packed-docs-routes. CI: '1' in the case's env keeps the step from starting; the case does not test it. The case that does ('starts the global copy's background Core step ... with CI unset') is unchanged and waits for the step's outcome.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 5cd0dd8 |
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet.
Setting CI: '1' keeps the kept-store case's installed CLI from starting the background Core install when the suite runs without CI. With CI unset, the base's case left that step's release lock in its own cache and the head's left nothing, and all 14 cases in the file pass on the head. Nothing needs to change.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: the kept-store case ran an installed copy, which is a global copy, without
CI. Verified:packed-search-catalog.test.mjs:359-385on the base,pack-published-cli.mjs:35-43,choose.mjs:385. - Claim: outside CI, a global copy starts the background Core step as it exits. Verified:
handoff.mjs:238-244,global-state.mjs:325-358, and reproduced withCIunset, empty and0. - Claim: the step can still write into the case's cache while the run removes its folders, the race #13634 fixed in
packed-docs-routes.test.mjs. Verified: the write lands after the command returns, in the case's cache under the suite's work folder (:87-92); #13634 addsCI: '1'there. - Claim: only this test file changes, and the case now runs with
CI: '1'beside its own cache and home. Verified: one file, 4 lines added and 1 deleted;:371. - Claim: the case does not test the step, and the case that does is unchanged, sets
CI: ''and waits for the outcome. Verified::362-382,:425-452. - Claim: before the change the case started the step, which wrote into its cache; after it, no step starts and the case still passes. Verified by a red-first run with
CIunset: a release lock in the case's cache on the base, none on the head, and the case passes on both. - Claim: the quick preflight passes. Verified in substance: eslint on the file and the whole test file pass on the head; the preflight wrapper itself was not rerun.
- Claim: the listed sibling tests need no change. Spot-checked: copies without the step (
global-local-fixtures.mjs:521,packed-gather-cache-fixture.mjs:564), a seeded cache (:387-423), the stand-in step in G55 (global-local.rows-40-59.test.mjs:841-878), removal with retries (release-fixtures.mjs:43-53), andCIalready set inpacked-docs-routes.test.mjs:109-111. - Claim: no CI impact, since CI already sets
CI=trueand the case inherits it. Verified:run()spreadsprocess.envfirst (:100-107), and'1'and'true'both count as set (update-notice-env.mjs:21-28). - Claim: no changeset is needed. Verified: the package's
filesexclude**/*.test.*(packages/cli/package.json:95). - File:
packages/cli/test/packed-search-catalog.test.mjs: clear.
Who this helps
Anyone who runs the CLI's packed tests outside CI: a contributor running one case, or a lab machine without
CIset. One case inpacked-search-catalog.test.mjsruns an installed copy of the CLI, which is a global copy, withoutCIset. Outside CI, a global copy's run starts the background Core step as it exits. That step can still be writing into the case's cache while the test run removes its folders. This is the race #13634 fixed inpacked-docs-routes.test.mjs, where it showed as ENOTEMPTY.What changes
packages/cli/test/packed-search-catalog.test.mjsonly. The case "keeps a reference to the store, not a copy, and reads it back byte for byte" now runs withCI: '1', beside its own cache and home. The case does not test the background step.The case that does test it is unchanged: "starts the global copy's background Core step from the offline registry, never npm, with CI unset". It sets
CI: ''on purpose and waits for the step's outcome.Tests
Red-first, on a Linux build box after
pnpm build, withCIunset. The CLI's background Core step was instrumented locally, not in this change, to log each start.releases/.failed-0.7.18.jsoninto the case's cache 2.7 s after the test run ended.Siblings checked, with no change needed
The same instrumented run covered the other tests that run a packed or installed CLI: packed-command-list, packed-manifest, packed-self-audit, packed-stored-docs, packed-template-components, the three global-local files, packed-gather-cache (discovery, hosted, records), build.global-copy, build.packed-old-core, doctor theme-checks, render hosted-packages, jiti-cache, build-theme.transpile-cache and test-home. packed-docs-routes ran as a control.
CIis already set (test(cli): packed-docs-routes starts no background Core download #13634), and no step starts.CI impact
CI impact: none. CI already sets
CI=true, which this case inherits; the change matters only whenCIis unset. Repository tooling only: no Changeset.Owning session: noopbot (a61f66c2), under CI & Release (ca77f950). Land path: the drain's serial merge loop, on green, CodeBunny approval and Specs' exact-head
/approve-spec.