Repository navigation
test: resolve temp roots to the long path on native Windows - #870
Conversation
|
No findings. The PR is tests-only, and the description documents sufficient Windows test evidence plus type-check and lint results. A real-CLI end-to-end record is not required under the repository’s review rules. |
|
No findings. The previous review remains valid: the diff is tests-only, changes are consistently scoped to Windows path canonicalization, and the PR description provides sufficient native Windows test evidence plus type-check and lint results. A real-CLI end-to-end record is not required. |
|
Added one commit: Measured: with the first commit the native-Windows suite was at 192 failing assertions across 48 files (down from 284 / 55 on Those two are the separate Windows problem, not a path problem: they assert
|
Tencent#1504) The Windows job runs the gate's e2e file now, and the file failed there: Windows hands out a short 8.3 temp path, and a path the CLI resolves later does not match that spelling, so the project scope was not found at all. Every other temp root takes the long path (Tencent#870); this one now does too.
Tencent#1504) The Windows job runs the gate's e2e file now, and the file failed there: Windows hands out a short 8.3 temp path, and a path the CLI resolves later does not match that spelling, so the project scope was not found at all. Every other temp root takes the long path (Tencent#870); this one now does too.
Tencent#1504) The Windows job runs the gate's e2e file now, and the file failed there: Windows hands out a short 8.3 temp path, and a path the CLI resolves later does not match that spelling, so the project scope was not found at all. Every other temp root takes the long path (Tencent#870); this one now does too.
Tencent#1504) The Windows job runs the gate's e2e file now, and the file failed there: Windows hands out a short 8.3 temp path, and a path the CLI resolves later does not match that spelling, so the project scope was not found at all. Every other temp root takes the long path (Tencent#870); this one now does too.
…y gate on Windows (#1504) (#1521) * test(ci): forget a pid the runner cannot signal, and run the CodeBuddy gate on Windows (#1504) Two parts of #1504, both test-side: - `detached-processes.ts` rethrew every error but `ESRCH` from the pid probe. On macOS a pid the kernel recycled to another user's process answers `EPERM`, and the teardown failed the whole file. `EPERM` means the pid is not teamai's child any more, so it is forgotten like `ESRCH`. - The Windows job ran only the unit list, so the CodeBuddy project gate (#1494) was verified only on contributors' machines. Its e2e file already carries the `cmd.exe` branch, so the job runs it now. * test(ci): give the CodeBuddy gate e2e the long temp path Windows needs (#1504) The Windows job runs the gate's e2e file now, and the file failed there: Windows hands out a short 8.3 temp path, and a path the CLI resolves later does not match that spelling, so the project scope was not found at all. Every other temp root takes the long path (#870); this one now does too. --------- Co-authored-by: wangchongfei <[email protected]>
Tencent#1504) The Windows job runs the gate's e2e file now, and the file failed there: Windows hands out a short 8.3 temp path, and a path the CLI resolves later does not match that spelling, so the project scope was not found at all. Every other temp root takes the long path (Tencent#870); this one now does too.
) * test: resolve temp roots to the long path on native Windows * test: canonicalize the local-agent temp root as well --------- Co-authored-by: Jay0130-a <[email protected]>
…y gate on Windows (Tencent#1504) (Tencent#1521) * test(ci): forget a pid the runner cannot signal, and run the CodeBuddy gate on Windows (Tencent#1504) Two parts of Tencent#1504, both test-side: - `detached-processes.ts` rethrew every error but `ESRCH` from the pid probe. On macOS a pid the kernel recycled to another user's process answers `EPERM`, and the teardown failed the whole file. `EPERM` means the pid is not teamai's child any more, so it is forgotten like `ESRCH`. - The Windows job ran only the unit list, so the CodeBuddy project gate (Tencent#1494) was verified only on contributors' machines. Its e2e file already carries the `cmd.exe` branch, so the job runs it now. * test(ci): give the CodeBuddy gate e2e the long temp path Windows needs (Tencent#1504) The Windows job runs the gate's e2e file now, and the file failed there: Windows hands out a short 8.3 temp path, and a path the CLI resolves later does not match that spelling, so the project scope was not found at all. Every other temp root takes the long path (Tencent#870); this one now does too. --------- Co-authored-by: wangchongfei <[email protected]>
Summary
43 test files build their temp root with
realpathSync(mkdtempSync(join(os.tmpdir(), …)))so that macOS's/tmp → /private/tmpaliasing matches the realpath the code under test takes. On native Windows that intent breaks:os.tmpdir()yields the 8.3 short form (C:\Users\ADMINI~1\AppData\Local\Temp), andrealpathSynchands it back unchanged, while the code under test returns the long path — so every equality between the two fails.Switching those call sites to
realpathSync.nativeresolves the short name to the long one on Windows. On Linux and macOS.nativeis the platform's realpath, so nothing changes there.No production code is touched.
Type of Change
Test Plan
Measured on native Windows 10, Node v24.18.0, with the full
npx vitest runsuite:8 files go from red to fully green —
anchors,config-not-initialized,detect-subdir,dry-run-load-path,migrate,p3-functionize,self-worktree-rebind,viz-foreign-checkout— and no file regresses from green to failing.npx tsc --noEmitpassesnpm run lintpasses (681 files, 96 rules)npx vitest runpasses — not on this platform: 192 failures remain, and they have two other causes that this change deliberately leaves alone (see Notes)Added/updated tests for the change — no new tests; the change is to the existing test harness itself
This PR does not involve the above items
Related Issues
None filed yet. Happy to open one covering the whole "native Windows" gap if maintainers prefer that sequencing.
Notes for Reviewers
windows-latestjob (the matrix isubuntu-latest+macos-latest), which is why this class of failure stays invisible upstream.api-key.test.ts,config-atomic-save.test.tsandscope.test.tsassert POSIX modes (0o600/0o644) and observe0o666. On Windowschmodcannot restrict an ACL, so this is a product-level question about how the API key file gets protected there — not something to paper over by loosening an assertion.votes-scope.test.tshas cases that hit the 15s test timeout, which looks like a separate subprocess-behavior difference.AGENTS.md, this is a tests-only change, so no real-CLI end-to-end record is attached.