Repository navigation
Conversation
… the CLI keeps it on macOS
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
AI review status for this pull request.
|
Contributor
PR Analysis Report
Generated by PR Enrichment workflow | View current CI run |
Contributor
There was a problem hiding this comment.
Changes requested on the description only: the test change itself is right and passes on Linux at this head.
- The description says
mainkeeps the catalog under the real home folder on macOS and that this change stops writes to the real user cache, but the node test project's global setup already pointsHOMEat a temporary folder of the run on macOS (vitest.global-setup.node.mjs, lines 84-87), so please reword those two sentences, for example: "onmainthe run keeps its catalog under the run's temporary home, and the case's ownHOMEgives it a folder only its two runs write."
No code change is needed. CI has not run on this head yet (draft).
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: on macOS the case fails on
mainbecause it reads$XDG_CACHE_HOME/astryx/catalogswhile the CLI's macOS cache folder is under the home folder and ignoresXDG_CACHE_HOME: verified (user-dirs.mjs:60,gather-cache.mjs:249). - Claim: on
mainthe run keeps its catalog under the real home folder: false (vitest.global-setup.node.mjs:84-87movesHOMEto a run folder on macOS;packed-search-catalog.test.mjs:79passes it to the CLI). - Claim: a linked temp root is not the cause, since
isPrivateDirchecks only the final folder withlstat: verified (private-dir.mjs:28-38). - Claim: the run gets its own
HOMEand the case readsuserCacheDir({home, env}), the XDG folder on Linux and the home folder's cache on macOS: verified (packed-search-catalog.test.mjs:258-263,user-dirs.mjs:60-64). - Claim: the macOS run stops writing into the real user cache: false, for the same reason as above.
- Claim: test only, no changeset: verified (one test file changed).
- Claim: fails before and passes after on macOS: not reproducible in this review; consistent with the code.
- Claim: Linux CI runs it at the head: not yet, every CI job at this head was skipped; the file passes on Linux in this review.
- Claim: #11832 edits the same lines: verified.
- File
packages/cli/test/packed-search-catalog.test.mjs: clear.
cixzhang
added a commit
that referenced
this pull request
Nov 17, 2026
… 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.
cixzhang
added a commit
that referenced
this pull request
Nov 17, 2026
… module.registerHooks (#11835) * test(cli): the kept-store search catalog case skips on a Node without 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. * test(cli): the search catalog case imports the shared module-hooks guard 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. * Merge remote-tracking branch 'origin/main' into test/search-catalog-skip-no-hooks * Merge remote-tracking branch 'origin/main' into test/search-catalog-skip-no-hooks * Merge remote-tracking branch 'origin/main' into test/search-catalog-skip-no-hooks * test(cli): the packed search catalog case reads the kept folder where 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. * Merge remote-tracking branch 'origin/main' into test/search-catalog-skip-no-hooks
Contributor
Author
|
(Posted by Cindy's agent.) Superseded by #11835, which merged the packed search catalog fix. |
This branch was successfully deployed
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.
Maintainer impact
On macOS,
packages/cli/test/packed-search-catalog.test.mjs› "keeps a reference to the store, not a copy, and reads it back byte for byte" fails onmain, so a local CLI test run on a Mac shows a red that Linux CI never shows. The failing check looks for the kept catalog under$XDG_CACHE_HOME/astryx/catalogs, but on macOS the CLI's user cache folder is~/Library/Caches/astryxand it does not readXDG_CACHE_HOME(userCacheDirinpackages/cli/foundation/env/user-dirs.mjs, as its doc comment says). Onmainthe run keeps its catalog under the run's temporary home (the node test project's global setup pointsHOMEthere on macOS), and the test's own cache folder stays empty (ENOENTon itscatalogsfolder, or an empty list where it exists).It is not a linked temp folder (
/var→/private/var):isPrivateDirreads only the final folder withlstat, and with the fix the same temp root passes.Intended invariant
The CLI's per-user cache folder stays as
userCacheDirdefines it on each platform. The test reads the kept catalog from the folder the CLI uses.Change
Test only. The run gets a
HOMEof its own beside itsXDG_CACHE_HOME, and the test finds the kept folder with the CLI's ownuserCacheDir({home, env}):$XDG_CACHE_HOME/astryx/catalogson Linux, as before, and$HOME/Library/Caches/astryx/catalogson macOS. The case's ownHOMEgives it a folder only its two runs write, so the one-entry check does not depend on other cases. No changeset: test-only.Evidence
× keeps a reference to the store…withENOENT: no such file or directory, scandir '…/packed-search-catalog-…/cache-…/astryx/catalogs'; 1 failed, 10 skipped.Scope
Components: cli (test only)
Testing
pnpm exec vitest run packages/cli/test/packed-search-catalog.test.mjson macOS, before and after; Linux CI runs it at the head.Overlap checked: #11832 (it skips the same case on a Node without module.registerHooks, a different cause; this change fixes where the case looks on macOS with a Node that has the hooks. Both edit the same lines, so whichever merges second rebases.)