Repository navigation
test(cli): the packed gather-cache fixture keeps one guard against the background Core download [skip ci] - #13153
josephfarina wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Requesting changes: the registry redirect fixes the kept/fresh mismatch, but the fixture's fetch-limit settings never take effect.
packed-gather-cache-fixture.mjslines 108-109 and the description say npm is asked once with a short limit, but the CLI passes--fetch-retries=1 --fetch-timeout=30000on npm's command line (BOUNDED_FETCHinfoundation/release/cache.mjs), which outranks thenpm_config_fetch_retriesandnpm_config_fetch_timeoutvariables, so drop lines 118-119 and correct the comment and the description (port 9 on loopback refuses at once, which is what keeps the runs fast).
With a stand-in registry that serves 0.7.17, the base fails the kept/fresh comparison on meta.answeredBy.core and this head passes 6/6 without contacting that registry. CI has not run on this head because its commit message carries [skip ci].
Claims and files checked
Review mode: full; reason: no-earlier-review
Claims:
- Two npm-packed cases fail on main wherever the registry is reachable, because kept and fresh runs name different Core versions: verified (reproduced against a stand-in registry serving 0.7.17; the base reports
coreas"0.7.17"againstnull). - Each packed run starts the background release install, and since 0.7.17 was published it fills only the kept folder's release cache: verified (
foundation/release/handoff.mjs:241-243,global-state.mjs:325-358,run-context.mjs:161-168). NO_UPDATE_NOTIFIERdoes not turn that install off: verified (global-state.mjs:332checks onlyCIand Windows; the fixture removesCIon purpose).run()andrunAsync()point npm and the@astryxdesignscope at a registry no request can reach: verified (fixture lines 115-117, 153 and 200).- They do so with one try and a short limit: false (the CLI's own
--fetch-retries=1 --fetch-timeout=30000override lines 118-119, so npm tries twice with a 30 s limit). - The door-conformance runs already use these settings: verified (
test-utils/door-conformance.mjs:192-194). - A case that sets its own registry still wins: verified (
...envcomes last, fixture lines 166 and 204). - The
answeredBycomparison stays: verified (the test file is unchanged and compares whole answers). - Test support only, with no product code or record changes: verified (one file under
packages/cli/test-utils/, outside the publishedfileslist). - Main fails 2 of 6 cases with the registry reachable, and this change passes 6/6: verified in substance (against the stand-in, the base fails 4 of 6, the two named among them, and the head passes 6/6).
Files:
packages/cli/test-utils/packed-gather-cache-fixture.mjs: one finding (the inert fetch limits and the comment that describes them).
8e58582 to
9a1453d
Compare
There was a problem hiding this comment.
Requesting changes: the registry redirect fixes the kept/fresh mismatch and the earlier fetch-limit finding is fixed, but one sentence in the new comment is wrong.
- The comment in
packages/cli/test-utils/packed-gather-cache-fixture.mjs(lines 110-112) and the description say these runs clearCIbecause a CI run keeps no catalogs, but aCI: '1'run through this fixture keeps a catalog and reads it back (aspacked-gather-cache.changes.test.mjs:166already expects), so please state the actual reason for clearingCIin both places.
Against a stand-in registry that serves 0.7.17, the base fixture fails the kept/fresh comparison on meta.answeredBy.core and this head passes 6 of 6 without contacting it, and all 15 test files that import the fixture pass. CI has not run on this head because its commit message carries [skip ci].
Claims and files checked
Review mode: full; reason: history
Claims:
- Two npm-packed cases fail on main wherever the registry is reachable, because kept and fresh runs name different Core versions: verified (against a stand-in registry serving 0.7.17, the base fails the two named cases and two more, with
core"0.7.17"againstnull). - The packed CLI is a global copy whose exit-time background step installs its own release into the release cache beside the kept catalogs: verified (
foundation/release/handoff.mjs:238-246,foundation/release/global-state.mjs:325-358; a fixture run leaves a failed-install record in its temp release cache). - Once the release is published, that install fills only the kept folder's release cache, so the two runs name different versions: verified (
foundation/release/run-context.mjs:161-168and the red-first run). - Only
CIturns that download off: verified as an environment switch (global-state.mjs:332;NO_UPDATE_NOTIFIERdoes not). - These runs clear
CIbecause a CI run keeps no catalogs: false (aCI: '1'run keeps a catalog and reads it back;packed-gather-cache.changes.test.mjs:166). run()andrunAsync()point npm and the@astryxdesignscope at a registry no request can reach: verified (fixture lines 117-120, spread at 153 and 200).- A case that sets its own registry keys still wins: verified (
...envcomes last, lines 166 and 204). - The
answeredBycomparison stays: verified (no test file changes). - Test support only, with no product code or record changes: verified (one file under
packages/cli/test-utils/, outside the publishedfileslist). - The fixture is shared by 15 test files: verified (15 importers).
- The repository's Node tests pass with it: verified for the 15 files the change can affect (111 passed, 1 skipped); the rest do not import the fixture.
- With the registry reachable main fails 2 of 6 and this change passes 6 of 6, and with it unreachable this change passes 6 of 6: verified in substance (against the stand-in the base fails 4 of 6, the two named among them, and the head passes 6 of 6; offline, the head passes 6 of 6).
Files:
packages/cli/test-utils/packed-gather-cache-fixture.mjs: one finding (the reason its comment gives for clearingCI).
…e background Core download, the removed core step [skip ci]
9a1453d to
35a2e38
Compare
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet.
Removing the registry redirect leaves the core-worker.mjs deletion as a complete guard: against a registry that serves 0.7.17, packed-gather-cache.npm-packed.test.mjs passes 6 of 6 at this head without a single registry request, while the fixture with neither guard fails 4 of 6 on meta.answeredBy.core. All 15 test files that import the fixture pass with no registry reachable. Both earlier findings went with the lines they were on.
- Suggestion (non-blocking):
packed-gather-cache.records.test.mjslines 215-218 override onlynpm_config_registry, so for a contributor whose npm config sets an@astryxdesignscope registry, the "keeps no catalog gathered while Core could not be had" case now installs Core; adding'npm_config_@astryxdesign:registry': 'http://127.0.0.1:9/'there (and dropping the inertnpm_config_fetch_retries) keeps it offline.
Claims and files checked
Review mode: full; reason: history
Claims:
- No user impact, test support only: verified (one file under
packages/cli/test-utils/, outside the publishedfileslist). - Once a release is published, the packed CLI's background Core install filled only the kept temp folder's release cache, so kept and fresh runs named different versions in
meta.answeredBy: verified (foundation/release/handoff.mjs:241-247,global-state.mjs:325-359; the fixture with neither guard fails 4 of 6 withcore"0.7.17"againstnull). - Main guards twice: the fixture deletes
core-worker.mjs, so the install cannot start and a renamed step fails at once, and its runs also point npm at an unreachable registry: verified (fixture line 564 withoutforce;global-state.mjs:357returns when the worker is missing; the redirect and its two spreads at the base). - One guard is enough, and the removed step is the precise one: verified for the background install (the head passes
npm-packed6 of 6 against a registry serving 0.7.17 with no request). - The change drops
OFFLINE_REGISTRYand its two uses: verified (the diff). - The removed comment called the install a release check with a retry limit that never reached that npm call: verified (the CLI passes
--fetch-retries=1 --fetch-timeout=30000on npm's command line,foundation/release/cache.mjs:586-592and:1366, which outranksnpm_config_*variables). - The
answeredBycomparison stays: verified (no test file changes;expectSameAsFreshcompares whole answers). - 17 lines removed, no product code or record changes, no new public API: verified.
- Public text carries no internal context: verified (title, body, branch and commit message).
npm-packedpasses 6 of 6 with the registry reachable and 6 of 6 with it unreachable: verified (against a local registry serving the published 0.7.17 packages, and offline).
Files:
packages/cli/test-utils/packed-gather-cache-fixture.mjs: clear (one non-blocking note on a test that relied on the removed scope key).
- #13153 test(cli): the packed gather-cache fixture keeps one guard against the background Core download Author: @josephfarina
|
Landed in #13165. |
User impact
None for users. Test support only.
Problem and solution fit
meta.answeredBy.core-worker.mjs, so the download cannot start and a renamed step fails at once, and the fixture's runs also point npm at an unreachable registry.OFFLINE_REGISTRY) and their two uses. Their comment also described the download as a "release check" with a retry limit that never reached that npm call.answeredBycomparison stays.Smallest restoration
packages/cli/test-utils/packed-gather-cache-fixture.mjs: 17 lines removed. No product code or record changes.Scope
Components: none (test support only).
Testing
packed-gather-cache.npm-packed.test.mjson this head: 6/6 with the npm registry reachable (the case that failed before the core step was removed) and 6/6 with it unreachable.preflight: pass 35a2e38