Repository navigation
fix(ui): keep saved trails inside the project - #1667
danusha2345 wants to merge 8 commits into
Conversation
|
Merged current |
|
Merged current |
|
Merged current |
|
Merged current |
|
Merged current |
|
Merged current |
|
Merged current |
|
Merged current |
|
Merged current |
|
Merged current |
|
Merged current |
|
Merged current |
|
Merged current |
|
Merged current |
|
Merged current |
|
Merged |
|
One more Vitest 4 adaptation: #1883 passes |
…cbac0a; content already in integration
|
Merged current 🤖 Generated with Claude Code |
devEngines and the ui package's engines keep their Node 22.12 floor for the Vite 7 toolchain under Vitest 4, but drop the upper bound: it would stop npm itself on a newer Node, where contributors are meant to be able to run the suite (the test config sets CODEGRAPH_ALLOW_UNSAFE_NODE, colbymchenry#478). This commit used to add an isolated median timing gate for the viewer's busiest symbol, and a test:perf script to run it. On this base the regular test already times that request as the best of five (colbymchenry#2208), so both are left out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The O_NOFOLLOW open introduced in 746e774 runs before the isFile() check that used to reject non-regular entries. A named pipe with no writer in .codegraph/ui/trails/ therefore parked the synchronous open, and with it the whole UI server, on every list or read. Open with O_NONBLOCK as well: a regular file ignores it, a FIFO returns at once and fstat skips it as before. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…uiltin Under Vitest 4 `vi.spyOn(cp, 'execFileSync')` on the module this file already mocks returns the same `vi.fn`, so the "real" function a test captured is the spy itself and the injected implementation recurses until the stack overflows; `vi.restoreAllMocks()` also stops resetting a `vi.fn`'s implementation, so the injection leaked into the six tests that follow. Route both injections through the module mocks' own `vi.fn`s, fall through to `vi.importActual`, and reinstate the real functions explicitly. 13/13 under Vitest 2.1.9 and 4.1.11. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The Vitest 4 bump in this branch drops `poolOptions`, so the `poolOptions.forks.execArgv` fix from colbymchenry#1883 is silently ignored here and a pool worker still compiles tree-sitter grammars on the turboshaft tier — the `Fatal process out of memory: Zone` worker death from colbymchenry#1779 came back in a full run on this branch. Vitest 4 reads `test.execArgv`; the engine project inherits it through `extends`. A probe test confirms the fork's `process.execArgv` now carries `--liftoff-only`, and the 655-test extraction file passes where it died before. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
e35c791 to
111bfa4
Compare
Summary
Rebased onto v1.6.2 (6560052). The wall-clock replacement for the busiest-symbol test that this PR used to carry is dropped: #2208 did it on
main. Changelog lines live indocs/viewer-launch-changelog.md.O_NOFOLLOW | O_NONBLOCKtest.projects, align the Vite toolchain, and preserve Node >=25 contributor testingnpm auditfinding, devalue, is the same version as onmain)Reproductions fixed
.codegraph/ui -> outsidewith missingtrails/previously createdoutside/trails/<id>.json; the write is now refused..codegraph/ui/trails/leak.json -> outside/secret.jsonpreviously exposed a trail-shaped external JSON through the list endpoint; it is now skipped.two repositories with different local Git user names in one process previously reused the first author; they now resolve independently.
a FIFO with no writer in
.codegraph/ui/trails/(a regression of theO_NOFOLLOWopen in this PR, caught in review) blocked the synchronous open, and with it the whole UI server, on every list or read; it is now skipped like any other non-regular entry.Positive controls keep projects opened through a safe root symlink and ordinary unversioned hand-written v1 trails working.
Verification
npm ci,npm run build,npx tsc --noEmit -p .ui-packagein theuiproject,child-process-windows-hide: 1,034 passed, 4 skippedbundle-launcherWindows-archive listings, which hit Vitest's 5 s default timeout on this machine; the other timeouts seen under a loaded machine pass when re-run🤖 Generated with Claude Code