Repository navigation
test(cli): the kept-store search catalog case skips on a Node without module.registerHooks - #11835
Conversation
… module.registerHooks Re-cut of #11832, byte for byte. The CLI keeps a gather only through module.registerHooks (Node 22.15 and 23.5 on); on its oldest supported Node it gathers fresh each run and keeps no entry, so the case that reads a kept entry skips there, as the other kept-entry cases do.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
Changes requested. The skip is right: on Node 22.13 the file runs 10 cases and skips the kept-reference case, and on Node 24 all 11 pass. Two points remain, and one change fixes both.
packages/cli/test/packed-search-catalog.test.mjslines 13 and 31-36 declarehasModuleHooksagain, thoughpackages/cli/test-utils/packed-gather-cache-fixture.mjsalready exports it for the other kept-entry tests: import it (import {hasModuleHooks} from '../test-utils/packed-gather-cache-fixture.mjs';) and drop the local guard, its comment and thenode:moduleimport.- The description calls this a byte-for-byte re-cut of #11832, but the file matches only #11832's first commit, and #11832's current head already imports the shared guard: take that version (which makes the claim true) or correct the description.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: the scheduled minimum-Node CLI run fails this case on Node 22.13. Verified: its failure annotation at line 261 of the base file.
- Claim: this is #11832 re-cut byte for byte, with an identical file. False: it matches #11832's first commit, not its head, which imports the shared guard.
- Claim: the case skips through
it.skipIf(!hasModuleHooks), atypeof module.registerHookscheck. Verified: lines 35-36 and 259. - Claim: the CLI keeps gathers only through those hooks, and otherwise gathers fresh and keeps no entry. Verified:
foundation/fs/gather-cache.mjslines 335 and 1222. - Claim: Node has the hooks from 22.15 and 23.5. Verified: absent on 22.13.0, 22.14.0 and 23.4.0; present on 22.15.0, 23.5.0 and 24.20.0.
- Claim: the CLI's oldest supported Node is 22.13. Verified: the
enginesfield inpackages/cli/package.json. - Claim: the guard tests the feature, as the other kept-entry cases do. Verified for the feature check; those cases import the shared export that this file copies.
- Claim: on a Node with the hooks, the case is unchanged. Verified: the body is only re-indented, and Node 24.20.0 passes all 11 cases.
- Claim: the records test already covers the fresh gather on an older Node. Verified:
packed-gather-cache.records.test.mjslines 633-646. - Claim: Node 22.13.0 gives 10 passed, 1 skipped. Verified by running the file.
- Claim: on macOS the CLI caches under
~/Library/Caches/astryxand ignoresXDG_CACHE_HOME. Verified:foundation/env/user-dirs.mjsline 60. - Claim: no CI job, runner or timing change. Verified: only one test file changes.
- Claim: #11834 is a separate macOS fix in the same case. Verified from its diff.
- File
packages/cli/test/packed-search-catalog.test.mjs: the two findings above; otherwise consistent with the shared fixture and the CLI code it tests.
Takes #11832's head: the case uses hasModuleHooks from the gather-cache test fixture, as the other kept-entry tests do, instead of a local copy.
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet, because the pull request is a draft, and it runs once the pull request is marked ready for review. Both points from the last review are fixed: the case imports the shared hasModuleHooks guard, and the file is byte-identical to #11832's head. On Node 22.13.0 the file gives 10 passed and 1 skipped, and on Node 24.20.0 all 11 pass. #11834 edits the same lines, so whichever lands second needs a merge.
Claims and files checked
Review mode: incremental; reason: none
- Claim: on Node 22.13 the scheduled minimum-Node CLI run fails this case. Verified: that run's fourth leg reports
expected [] to have a length of 1at line 261 of the base file. - Claim: this re-cuts #11832 byte for byte, and the file is identical to #11832's head. Verified: the two files are byte-identical.
- Claim: the case skips through
it.skipIf(!hasModuleHooks). Verified: line 252. - Claim:
hasModuleHooksis the sharedtypeof module.registerHooks === 'function'guard that the other kept-entry tests import. Verified:test-utils/packed-gather-cache-fixture.mjslines 482-483, imported by thepacked-gather-cache.*suites and here at line 25. - Claim: the CLI keeps gathers only through those hooks, and on an older Node gathers fresh and keeps no entry. Verified:
foundation/fs/gather-cache.mjslines 335 and 1222. - Claim: Node has the hooks from 22.15 and 23.5. Verified: absent on 22.13.0, 22.14.0 and 23.4.0; present on 22.15.0, 23.5.0 and 24.20.0.
- Claim: the guard tests the feature, not a version number, as the other kept-entry cases do. Verified: those suites and
gather-cache.test.mjsline 21 checktypeof registerHooks. - Claim: on a Node with the hooks, the case and its assertions are unchanged. Verified: the body is only re-indented, and Node 24.20.0 passes all 11 cases.
- Claim: the records test already covers the fresh gather on an older Node. Verified:
packed-gather-cache.records.test.mjslines 633-646, on Linux. - Claim: Node 22.13.0 gives 10 passed, 1 skipped. Verified by running the file.
- Claim: a Node with the hooks runs the case on Linux, while on macOS the CLI caches under
~/Library/Caches/astryxand ignoresXDG_CACHE_HOME. Verified:foundation/env/user-dirs.mjsline 60, and the case passes on Linux with Node 24.20.0. - Claim: no CI job, runner or time-to-green change, and only Node 22.13 skips. Verified: only one test file changes, and the minimum-Node legs are the only CI runs on a Node without the hooks.
- Claim: #11834 is a separate fix for the macOS cache folder in the same case. Verified from its diff.
- File
packages/cli/test/packed-search-catalog.test.mjs: clear. It is consistent with the shared fixture and the CLI code it tests.
There was a problem hiding this comment.
Changes requested: one description fix; the code needs no change. On Node 22.13.0 the base file fails the kept-reference case and the head skips it (11 passed, 1 skipped), and on Node 24.20.0 all 12 cases pass. The earlier point about the shared guard stays fixed.
- The description says the file is identical to #11832's head, but after the merge of
mainit has 44 more lines (main's unready-template case and twoASKSrows) and its Node 22.13.0 tally of 10 passed, 1 skipped predates them, so please say instead that this re-cuts #11832's change line for line on currentmainand that the file now gives 11 passed, 1 skipped.
#11834 edits the same case, so whichever lands second needs a merge.
Claims and files checked
Review mode: full; reason: merge-touches-pr-files
- Claim: on Node 22.13.0 the scheduled minimum-Node CLI run fails this one case with
expected [] to have a length of 1. Verified: that run's fourth leg reports it, and the base file fails the same way on Node 22.13.0. - Claim: this re-cuts #11832 byte for byte, and the file is identical to #11832's head. False at this head: the patch is #11832's line for line, but the merge of
mainadded 44 lines to the file. - Claim: the case skips through
it.skipIf(!hasModuleHooks). Verified: line 296. - Claim:
hasModuleHooksis the sharedtypeof module.registerHooks === 'function'guard that the other kept-entry tests import. Verified:test-utils/packed-gather-cache-fixture.mjslines 522-523, imported here at line 25 and by 17 other test files. - Claim: the CLI keeps gathers only through those hooks, and on an older Node gathers fresh and keeps no entry. Verified:
foundation/fs/gather-cache.mjslines 369-370 and 1058. - Claim: Node has the hooks from 22.15 and 23.5. Verified: absent on 22.13.0, 22.14.0 and 23.4.0, present on 22.15.0, 23.5.0 and 24.20.0.
- Claim: the guard tests the feature, not a version number, as the other kept-entry cases do. Verified: the
packed-gather-cache.*suites andgather-cache.test.mjsline 21 checktypeof registerHooks. - Claim: on a Node with the hooks, the case and its assertions are unchanged. Verified: a whitespace-insensitive diff leaves only the wrapper lines, and Node 24.20.0 passes all 12 cases.
- Claim: the records test already covers the fresh gather on an older Node. Verified:
packed-gather-cache.records.test.mjslines 658-670, on Linux. - Claim: Node 22.13.0 gives 10 passed, 1 skipped. Outdated at this head: the file now has 12 cases and gives 11 passed, 1 skipped.
- Claim: the case needs Linux, because on macOS the CLI caches under
~/Library/Caches/astryxand ignoresXDG_CACHE_HOME. Verified:foundation/env/user-dirs.mjsline 60. - Claim: no CI job, runner or time-to-green change, and in CI only Node 22.13 skips. Verified: only one test file changes, CI's regular Node 24.22.1 has the hooks, and only the minimum-Node run uses 22.13.0.
- Claim: #11832 is the same change, and #11834 is a separate macOS cache-folder fix in the same lines. Verified from both diffs.
- File
packages/cli/test/packed-search-catalog.test.mjs: clear in code; consistent with the shared fixture and the CLI code it tests. The description claim above is the one finding.
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet because the pull request is a draft, and it runs once the pull request is marked ready for review. The description now matches the head: it re-cuts #11832's change line for line on current main, and on Node 22.13.0 the file gives 11 passed and 1 skipped, while on Node 24.20.0 all 12 cases pass. #11834 edits the same case, so whichever lands second needs a merge.
Claims and files checked
Review mode: same-head; reason: none
- Claim: on Node 22.13.0 the scheduled minimum-Node CLI run fails this one case with
expected [] to have a length of 1. Verified: that run's fourth CLI test leg failed, and the base file fails the same case on Node 22.13.0. - Claim: this re-cuts #11832's change line for line on current
main. Verified: the added and removed lines equal #11832's against its own merge base. - Claim: the file also carries what
mainadded since #11832's head, the unready-template case and twoASKSrows. Verified: those are the only lines that differ from the file at #11832's head (lines 219-220 and 240-280). - Claim: the case skips through
it.skipIf(!hasModuleHooks). Verified: line 296. - Claim:
hasModuleHooksis the sharedtypeof module.registerHooks === 'function'guard that the other kept-entry tests import. Verified:test-utils/packed-gather-cache-fixture.mjslines 522-523, imported here at line 25 and by thepacked-gather-cache.*suites. - Claim: the CLI keeps gathers only through those hooks, and on an older Node gathers fresh and keeps no entry. Verified:
foundation/fs/gather-cache.mjslines 369-370 and 1058. - Claim: Node has the hooks from 22.15 and 23.5. Verified: absent on 22.13.0, 22.14.0 and 23.4.0, present on 22.15.0, 23.5.0 and 24.20.0.
- Claim: the guard tests the feature, not a version number, as the other kept-entry cases do. Verified: the
packed-gather-cache.*suites import it andgather-cache.test.mjslines 20-21 checktypeof registerHooks. - Claim: on a Node with the hooks, the case and its assertions are unchanged. Verified: the patch changes only the wrapper lines and indentation, and Node 24.20.0 passes all 12 cases.
- Claim: the records test already covers the fresh gather on an older Node. Verified:
packed-gather-cache.records.test.mjslines 658-670, on Linux. - Claim: on Node 22.13.0 the file gives 11 passed, 1 skipped. Verified: 11 passed, 1 skipped of 12.
- Claim: the case needs Linux, because on macOS the CLI caches under
~/Library/Caches/astryxand ignoresXDG_CACHE_HOME. Verified:foundation/env/user-dirs.mjsline 60. - Claim: this pull request's own CI run is the check on a Node with the hooks. Pending: CI is skipped while the pull request is a draft; the review's own Node 24.20.0 run passes all 12 cases.
- Claim: no CI job, runner or time-to-green change, and only Node 22.13 skips. Verified: only one test file changes, CI's regular Node 24.22.1 has the hooks, and only the minimum-Node run uses 22.13.0.
- Claim: #11832 is the same change, which this supersedes, and #11834 is a separate macOS cache-folder fix in the same case. Verified from both diffs.
- Claim: the ownership and land-path note. Process information, not checkable against the code.
- File
packages/cli/test/packed-search-catalog.test.mjs: clear; consistent with the shared fixture and the CLI code it tests.
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet because the pull request is a draft; it runs once the pull request is marked ready for review. The newest merge of main leaves the change line for line as before, and on Node 22.13.0 the file gives 11 passed and 1 skipped, while on Node 24.20.0 all 12 cases pass. #11834 edits the same case, so whichever lands second needs a merge.
Claims and files checked
Review mode: incremental; reason: none
- changed rules (0): none
- Claim: on the oldest supported Node (22.13.0) the scheduled minimum-Node run fails this one case with
expected [] to have a length of 1. Verified: that run's fourth CLI test leg failed on exactly this case and assertion, and the base file fails it the same way on Node 22.13.0. - Claim: this re-cuts #11832's change line for line on current
main. Verified: the added and removed lines equal #11832's against its own merge base. - Claim: the file also carries what
mainadded since #11832's head, the unready-template case and twoASKSrows. Verified: those are the only lines that differ from the file at #11832's head (lines 219-220 and 240-288, the case now inmain's latest form). - Claim: the case skips through
it.skipIf(!hasModuleHooks). Verified: line 303. - Claim:
hasModuleHooksis the sharedtypeof module.registerHooks === 'function'guard that the other kept-entry tests import. Verified:test-utils/packed-gather-cache-fixture.mjslines 522-523, imported here at line 25 and by thepacked-gather-cache.*suites. - Claim: the CLI keeps gathers only through those hooks, and on an older Node gathers fresh and keeps no entry. Verified:
foundation/fs/gather-cache.mjslines 370-371 and 1072-1073, still so after the newestmainmerge. - Claim: Node has the hooks from 22.15 and 23.5. Verified: absent on 22.13.0, 22.14.0 and 23.4.0, present on 22.15.0, 23.5.0 and 24.20.0.
- Claim: the guard tests the feature, not a version number, as the other kept-entry cases do. Verified: the
packed-gather-cache.*suites import it andfoundation/fs/gather-cache.test.mjslines 20-21 checktypeof registerHooks. - Claim: on a Node with the hooks, the case and its assertions are unchanged. Verified: a whitespace-insensitive diff shows only the import and wrapper lines, and Node 24.20.0 passes the case.
- Claim: the records test already covers the fresh gather on an older Node. Verified:
packed-gather-cache.records.test.mjslines 658-659, on Linux. - Claim: on Node 22.13.0 the file alone gives 11 passed, 1 skipped. Verified: 11 passed, 1 skipped of 12 at this head.
- Claim: the case needs Linux, because on macOS the CLI caches under
~/Library/Caches/astryxand ignoresXDG_CACHE_HOME. Verified:foundation/env/user-dirs.mjsline 60. - Claim: this pull request's own CI run is the check on a Node with the hooks. Pending: CI is skipped while the pull request is a draft; the review's own Node 24.20.0 run passes all 12 cases.
- Claim: no CI job, runner or time-to-green change, and only Node 22.13 skips. Verified: only one test file changes, only the minimum-Node workflow runs Node 22.13.0, and the rest of CI uses Node 24.22.1, which has the hooks.
- Claim: #11832 is the same change, which this supersedes, and #11834 is a separate macOS cache-folder fix in the same case. Verified: both are open, and their diffs show it.
- Claim: the ownership and land-path note. Process information, not checkable against the code.
- File
packages/cli/test/packed-search-catalog.test.mjs: clear; consistent with the shared fixture and the CLI code it tests.
There was a problem hiding this comment.
Changes requested: one description fix; the code needs no change. On Node 22.13.0 the base file fails the kept-reference case and the head skips it, and on Node 24.20.0 all 12 cases pass. #11834 edits the same case, so whichever lands second needs a merge.
- The Evidence bullet says the file gives "12 of 12 skipped" on Node 22.13.0 with the other cases skipped "by main's own guards", but
it.skipIf(!hasModuleHooks)at line 303 is the file's only skip and the head gives 11 passed and 1 skipped there, so please change it to "11 passed, 1 skipped (the kept-entry case, skipped by this change)".
Claims and files checked
Review mode: incremental; reason: none
- changed rules (0): none
- Claim: on the oldest supported Node (22.13.0) the scheduled minimum-Node run fails this one case with
expected [] to have a length of 1. Verified: the cited run's fourth CLI test leg failed on exactly this case and assertion, and the base file fails it the same way on Node 22.13.0. - Claim: this re-cuts #11832's change line for line on current
main. Verified: the added and removed lines equal #11832's. - Claim: the file also carries what
mainadded since #11832's head, the unready-template case and twoASKSrows. Verified: those are the only lines that differ from the file at #11832's head (lines 219-220 and 240-288). - Claim: the case skips through
it.skipIf(!hasModuleHooks). Verified: line 303. - Claim:
hasModuleHooksis the sharedtypeof module.registerHooks === 'function'guard that the other kept-entry tests import. Verified:test-utils/packed-gather-cache-fixture.mjslines 522-523, imported here at line 25 and by thepacked-gather-cache.*suites. - Claim: the CLI keeps gathers only through those hooks, and on an older Node gathers fresh and keeps no entry. Verified:
foundation/fs/gather-cache.mjslines 374-375, 1077 and 1145, still so after the newestmainmerge. - Claim: Node has the hooks from 22.15 and 23.5. Verified: absent on 22.13.0, 22.14.0 and 23.4.0, present on 22.15.0, 23.5.0 and 24.20.0.
- Claim: the guard tests the feature, not a version number, as the other kept-entry cases do. Verified: the
packed-gather-cache.*suites import it andfoundation/fs/gather-cache.test.mjslines 17-21 checktypeof registerHooks. - Claim: on a Node with the hooks, the case and its assertions are unchanged. Verified: a whitespace-insensitive diff shows only the import and wrapper lines, and Node 24.20.0 passes the case.
- Claim: the records test already covers the fresh gather on an older Node. Verified:
packed-gather-cache.records.test.mjslines 658-671, on Linux. - Claim: on Node 22.13.0 the file alone, with current
mainmerged in, gives 12 of 12 skipped, the other cases bymain's own guards. False: line 303 is the file's only skip, and the head gives 11 passed and 1 skipped of 12. - Claim: the cited run's fourth leg failed the case on the same Node before the change. Verified: its annotation names this case and assertion.
- Claim: the case needs Linux, because on macOS the CLI caches under
~/Library/Caches/astryxand ignoresXDG_CACHE_HOME. Verified:foundation/env/user-dirs.mjsline 60. - Claim: this pull request's own CI run is the check on a Node with the hooks. Pending: CI is skipped while the pull request is a draft; Node 24.20.0 passes all 12 cases at this head.
- Claim: no CI job, runner or time-to-green change, and only Node 22.13 skips. Verified: only one test file changes, only the minimum-Node workflow runs Node 22.13.0, and the rest of CI uses Node 24.22.1, which has the hooks.
- Claim: #11832 is the same change, which this supersedes, and #11834 is a separate macOS cache-folder fix in the same case. Verified: both are open, and their diffs show it.
- Claim: the ownership and land-path note. Process information, not checkable against the code.
- File
packages/cli/test/packed-search-catalog.test.mjs: clear; consistent with the shared fixture and the CLI code it tests.
… the CLI keeps it on macOS macOS keeps the user cache under HOME and ignores XDG_CACHE_HOME, so the case gives its run a home of its own and reads the kept folder through userCacheDir. The same change as #11834, folded in here so the case passes on macOS too.
There was a problem hiding this comment.
Changes requested: one description fix; the code needs no change. On Node 22.13.0 the scheduled run failed the kept-reference case and this head skips it (11 passed, 1 skipped); on Node 24.20.0 all 12 cases pass, and the new macOS commit reads the kept folder where the CLI keeps it on macOS.
- The Evidence bullet says the file gives "12 of 12 skipped" on Node 22.13.0 with the other cases skipped "by main's own guards", but
it.skipIf(!hasModuleHooks)at line 304 is the file's only skip and the head gives 11 passed and 1 skipped there, so please change it to "11 passed, 1 skipped (the kept-entry case, skipped by this change)".
Claims and files checked
Review mode: incremental; reason: none
- changed rules (0): none
- Claim: on the CLI's oldest supported Node (22.13.0) the scheduled minimum-Node run fails this one case with
expected [] to have a length of 1. Verified: the cited run's fourth CLI test leg failed on exactly this case and assertion, and the CLI'senginesfield names Node 22.13.0 as its minimum. - Claim: this re-cuts #11832's change line for line on current
main, and the file also carries whatmainadded since #11832's head (the unready-template case and twoASKSrows). Verified: against #11832's head the file differs only by those lines (219-220 and 241-288) and the macOS commit's lines. - Claim: the case skips through
it.skipIf(!hasModuleHooks). Verified: line 304. - Claim:
hasModuleHooksis the sharedtypeof module.registerHooks === 'function'guard that the other kept-entry tests import. Verified:test-utils/packed-gather-cache-fixture.mjslines 522-523, imported here at line 26 and by thepacked-gather-cache.*suites. - Claim: the CLI keeps gathers only through those hooks, which Node has from 22.15 and 23.5, and on an older Node gathers fresh and keeps no entry. Verified:
foundation/fs/gather-cache.mjslines 374-375; the hooks are absent on Node 22.13.0 and 22.14.0 and present on 22.15.0 and 24.20.0. - Claim: the guard tests the feature, not a version number, as the other kept-entry cases do. Verified: the
packed-gather-cache.*suites import it andfoundation/fs/gather-cache.test.mjslines 20-21 checktypeof registerHooks. - Claim: macOS keeps the user cache under
HOMEand ignoresXDG_CACHE_HOME, so the case gives its run a home of its own and reads the kept folder throughuserCacheDir; without it the case fails on every Mac with ENOENT. Verified from the code:foundation/env/user-dirs.mjsline 60, and the CLI keeps catalogs underuserCacheDir()(gather-cache.mjsline 270); not run on macOS here. - Claim: on a Node with the hooks, the case and its assertions are unchanged. Verified: the assertions are identical, the setup differs only by the macOS lines the previous claim describes, and Node 24.20.0 passes the case.
- Claim: the records test already covers the fresh gather on an older Node. Verified:
packed-gather-cache.records.test.mjslines 658-671, on Linux. - Claim: on Node 22.13.0 the file alone gives 12 of 12 skipped, the other cases by
main's own guards. False: line 304 is the file's only skip, and the head gives 11 passed and 1 skipped of 12. - Claim: the cited run's fourth leg failed the case on the same Node before the change. Verified: its annotation names this case and assertion.
- Claim: on macOS the whole file passes on Node 26.7.0 (one ENOENT failure before the macOS commit), and the changed case passes on Node 24.22.1. Not checkable here: no macOS run; consistent with
user-dirs.mjsline 60, and on Linux Node 24.20.0 all 12 cases pass. - Claim: on Linux CI the case reads the same folder it read before. Verified: with an absolute
XDG_CACHE_HOME,userCacheDirreturns<cache>/astryx(user-dirs.mjslines 61-64), the folder the base read. - Claim: no CI job, runner or time-to-green change, and only Node 22.13 skips. Verified: only one test file changes; only the minimum-Node workflow runs Node 22.13.0, and the rest of CI runs Node 24.22.1, which has the hooks.
- Claim: #11832 (the same skip change) and #11834 (the macOS change) are both superseded, and whichever lands second merges the other. Verified: both are open, the skip equals #11832's lines and the macOS commit equals #11834's patch apart from indentation; whether any other open pull request touches the file was not enumerated.
- Claim: the ownership and land-path note. Process information, not checkable against the code.
- File
packages/cli/test/packed-search-catalog.test.mjs: one finding (the description's evidence claim above); the code is consistent with the shared fixture,user-dirs.mjsand the CLI's keep condition.
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet because the pull request is a draft; it runs once the pull request is marked ready for review.
The kept-reference case now skips only where the CLI keeps no gather (a Node without module.registerHooks) and reads the kept folder through the CLI's own userCacheDir. The corrected Evidence bullet (11 passed, 1 skipped on Node 22.13.0) matches the head, and on Node 24.20.0 all 12 cases pass. Nothing else needs to change.
Claims and files checked
Review mode: same-head; reason: none
- changed rules (0): none
- Claim: on the CLI's oldest supported Node (22.13.0) the minimum-Node workflow fails this one case with
expected [] to have a length of 1. Verified: the cited run's fourth CLI test leg failed on exactly this case and assertion, and the CLI'senginesfield names Node 22.13.0 as its minimum. - Claim: this re-cuts #11832's change line for line on current
main, and the file also carries whatmainadded since #11832's head (the unready-template case and twoASKSrows). Verified: against #11832's head the file differs only by those lines (220-221 and 241-288) and the macOS commit's lines. - Claim: the case skips through
it.skipIf(!hasModuleHooks). Verified: line 304, the file's only skip. - Claim:
hasModuleHooksis the sharedtypeof module.registerHooks === 'function'guard that the other kept-entry tests import, so a change to the keep condition is fixed in one place. Verified:test-utils/packed-gather-cache-fixture.mjslines 522-523, imported here at line 26 and by thepacked-gather-cache.*suites. - Claim: the CLI keeps gathers only through those hooks, which Node has from 22.15 and 23.5, and on an older Node gathers fresh and keeps no entry. Verified:
foundation/fs/gather-cache.mjslines 374-375; the hooks are absent on Node 22.13.0 and present on Node 24.20.0. - Claim: the guard tests the feature, not a version number, as the other kept-entry cases do. Verified: the
packed-gather-cache.*suites import it, andfoundation/fs/gather-cache.test.mjslines 17-23 checktypeof registerHooks. - Claim: macOS keeps the user cache under
HOMEand ignoresXDG_CACHE_HOME, so the case gives its run a home of its own and reads the kept folder throughuserCacheDir; without it the case fails on every Mac with ENOENT. Verified from the code:foundation/env/user-dirs.mjsline 60, and the CLI keeps catalogs underuserCacheDir()(gather-cache.mjsline 270); not run on macOS here. - Claim: the macOS change is #11834's change, folded in as a separate commit. Verified: the last commit's patch equals #11834's apart from indentation.
- Claim: on a Node with the hooks, the case and its assertions are unchanged. Verified: the assertions are identical, the setup differs only by the macOS lines, and Node 24.20.0 passes the case.
- Claim: the records test already covers the fresh gather on an older Node. Verified:
packed-gather-cache.records.test.mjslines 658-671, on Linux. - Claim: on Node 22.13.0 the file alone gives 11 passed and 1 skipped, the skip being the kept-entry case, and the cited run failed that case on the same Node before the change. Verified: 11 passed and 1 skipped of 12 on Node 22.13.0, and the run's annotation names this case.
- Claim: on macOS the whole file passes on Node 26.7.0 (one ENOENT failure before the macOS commit), and the changed case passes on Node 24.22.1. Not checkable here: no macOS run; consistent with
user-dirs.mjsline 60, and on Linux Node 24.20.0 all 12 cases pass. - Claim: on Linux CI the case reads the same folder it read before. Verified: with an absolute
XDG_CACHE_HOME,userCacheDirreturns<cache>/astryx(user-dirs.mjslines 61-64), the folder the base read. - Claim: no CI job, runner or time-to-green change, and only Node 22.13 skips. Verified: only one test file changes; only the minimum-Node workflow runs Node 22.13.0, and the rest of CI runs Node 24.22.1, which has the hooks.
- Claim: #11832 and #11834 are both superseded, and whichever lands second merges the other. Verified: both are open, the skip equals #11832's lines and the macOS commit equals #11834's patch apart from indentation.
- Claim: the ownership and land-path note. Process information, not checkable against the code.
- File
packages/cli/test/packed-search-catalog.test.mjs: clear; consistent with the shared fixture,user-dirs.mjsand the CLI's keep condition.
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet because the pull request is a draft; it runs once the pull request is marked ready for review.
This head only merges main, which touches none of this pull request's files, so the change is the one already reviewed: the kept-reference case skips only where the CLI keeps no gather (a Node without module.registerHooks) and reads the kept folder through the CLI's own userCacheDir. Nothing else needs to change.
Claims and files checked
Review mode: carry-forward; reason: none
- changed rules (0): none
- Claim: on the CLI's oldest supported Node (22.13.0) the minimum-Node workflow fails this one case with
expected [] to have a length of 1. Verified: the cited run's fourth CLI test leg failed on exactly this case and assertion, and the CLI'senginesfield names Node 22.13.0 as its minimum. - Claim: this re-cuts #11832's change line for line on current
main, and the file also carries whatmainadded since #11832's head (the unready-template case and twoASKSrows). Verified: against #11832's head the file differs only by those lines (220-221 and 241-288) and the macOS commit's lines, and this head sits on the tip ofmain. - Claim: the case skips through
it.skipIf(!hasModuleHooks). Verified: line 304, the only skip among the file's 12 cases. - Claim:
hasModuleHooksis the sharedtypeof module.registerHooks === 'function'guard that the other kept-entry tests import, so a change to the keep condition is fixed in one place. Verified:test-utils/packed-gather-cache-fixture.mjslines 522-523, imported here at line 26 and by thepacked-gather-cache.*suites. - Claim: the CLI keeps gathers only through those hooks, which Node has from 22.15 and 23.5, and on an older Node gathers fresh and keeps no entry. Verified:
foundation/fs/gather-cache.mjslines 374-375; the hooks are absent on Node 22.13.0 and present on Node 24.20.0. - Claim: the guard tests the feature, not a version number, as the other kept-entry cases do. Verified: the
packed-gather-cache.*suites import it, andfoundation/fs/gather-cache.test.mjslines 17-23 checktypeof registerHooks. - Claim: macOS keeps the user cache under
HOMEand ignoresXDG_CACHE_HOME, so the case gives its run a home of its own and reads the kept folder throughuserCacheDir; without it the case fails on every Mac with ENOENT. Verified from the code:foundation/env/user-dirs.mjsline 60, and the CLI keeps catalogs underuserCacheDir()(gather-cache.mjsline 270); not run on macOS. - Claim: the macOS change is #11834's change, folded in as a separate commit. Verified: that commit's patch equals #11834's apart from indentation.
- Claim: on a Node with the hooks, the case and its assertions are unchanged. Verified: the assertions are identical, the setup differs only by the macOS lines, and Node 24.20.0 passes the case on this patch.
- Claim: the records test already covers the fresh gather on an older Node. Verified:
packed-gather-cache.records.test.mjslines 658-671, on Linux. - Claim: on Node 22.13.0, with current
mainmerged in, the file alone gives 11 passed and 1 skipped, the skip being the kept-entry case, and the cited run failed that case on the same Node before the change. Verified on this patch: 11 passed and 1 skipped of 12 on Node 22.13.0; the latest merge ofmainchanges none of the files this pull request changes or the test imports, and the run's annotation names this case. - Claim: on macOS the whole file passes on Node 26.7.0 (one ENOENT failure before the macOS commit), and the changed case passes on Node 24.22.1. Not checkable here: no macOS run; consistent with
user-dirs.mjsline 60, and on Linux Node 24.20.0 all 12 cases pass on this patch. - Claim: on Linux CI the case reads the same folder it read before. Verified: with an absolute
XDG_CACHE_HOME,userCacheDirreturns<cache>/astryx(user-dirs.mjslines 61-64), the folder the base read. - Claim: no CI job, runner or time-to-green change, and only Node 22.13 skips. Verified: only one test file changes; only the minimum-Node workflow runs Node 22.13.0, and the rest of CI runs Node 24.22.1 (
.nvmrc), which has the hooks. - Claim: #11832 and #11834 are both superseded, and whichever lands second merges the other. Verified: both are open, the skip equals #11832's lines and the macOS commit equals #11834's patch apart from indentation.
- Claim: the ownership and land-path note. Process information, not checkable against the code.
- File
packages/cli/test/packed-search-catalog.test.mjs: clear; consistent with the shared fixture,user-dirs.mjsand the CLI's keep condition.
Who this helps
Anyone reading the daily "CLI on minimum Node" run. On the CLI's oldest supported Node (22.13.0), one case in
packages/cli/test/packed-search-catalog.test.mjsfails, so the run reports the CLI as failing on that Node although the CLI works there as designed (run 43675632186, jobcli-tests (4/4)):What changes
This re-cuts #11832's change (thanks to that change for the diagnosis and the fix) line for line on current
main. The file also carries whatmainadded since #11832's head (2d86ad8): the unready-template case and twoASKSrows.packages/cli/test/packed-search-catalog.test.mjs: the case that reads a kept gather entry skips on a Node withoutmodule.registerHooks(it.skipIf(!hasModuleHooks)).hasModuleHooksis the shared guard frompackages/cli/test-utils/packed-gather-cache-fixture.mjs(typeof module.registerHooks === 'function'), which the other kept-entry tests import, so a change to the CLI's keep condition is fixed in one place. The CLI keeps gathers only through those hooks, which Node has from 22.15 and 23.5. On an older Node it gathers fresh each run and writes no kept entry, by design.packed-gather-cache.*.test.mjs,gather-cache.test.mjs).userCacheDir, because macOS keeps the user cache underHOMEand ignoresXDG_CACHE_HOME. Without it the case fails on every Mac with ENOENT on$XDG_CACHE_HOME/astryx/catalogs.packed-gather-cache.records.test.mjs("a Node without module.registerHooks").Evidence
module.registerHooks), the file alone in thenodeproject, with currentmainmerged in: 11 passed, 1 skipped (the kept-entry case, skipped by this change). Run 43675632186'scli-tests (4/4)failed that case on the same Node before the change.CI impact: none: one test file's case skips on Node 22.13 only. No job, runner or time-to-green change.
Overlap check
Searched open pull requests for
packages/cli/test/packed-search-catalog.test.mjs: #11832, which this re-cut supersedes, and #11834, a separate fix in the same case (it reads the kept folder where the CLI keeps it on macOS). The two meet in the same lines: this change wraps the case init.skipIf, so whichever lands second merges the other.Overlap checked: #11832, #11834 (#11832: the same skip change, re-cut line for line on current main, which this one supersedes; #11834: its macOS cache-folder change is folded in here as a separate commit, so this one supersedes it too)
Owning session: noopbot (a61f66c2), under CI & Release (ca77f950). Land path: the shipper, through merge-guard.