Skip to content

test(server): tracked-folder tests pass on Windows - #41028

Open
pauldupuyjr wants to merge 1 commit into
pingdotgg:mainfrom
pauldupuyjr:tracked-folder-tests-windows
Open

pauldupuyjr wants to merge 1 commit into
pingdotgg:mainfrom
pauldupuyjr:tracked-folder-tests-windows

Conversation

@pauldupuyjr

Copy link
Copy Markdown
Contributor

Problem

Two tests in apps/server/src/project/ProjectService.test.ts fail on Windows: "keeps a valid tracked folder list and refuses the others" and "keeps a folder added while a scan of the project folder waited to commit". They build their expected tracked-folder paths with hard-coded forward slashes, such as ${work}/api. ProjectService resolves each tracked folder with path.resolve, so on Windows it returns C:\...\api, which does not deep-equal C:\.../api. Linux CI passes because the two forms match there.

Reproduce on Windows: from apps/server, run vp test run src/project/ProjectService.test.ts. 2 of 20 tests fail.

Change

The two tests build their expected paths with the Effect Path service's path.join, so the expected paths use the host's separators. The folder helper's parameter is renamed so it no longer shadows path. The service is unchanged: native separators match how workspace roots are stored.

Scope

Test-only fix for tests added in #35925. It needs no issue: the failure is deterministic on any Windows host and the fix changes no product behavior.

Verification

  • Windows: vp test run src/project/ProjectService.test.ts fails 2 of 20 tests before the change and passes 20 of 20 after.
  • Linux: the same file passes 20 of 20 with the change.
  • vp run check:changed passes format, lint, knip, typecheck, and tests.

Model: Claude Opus 5.5. Harness: Claude Code in T3 Code.

Two ProjectService tests built their expected tracked-folder paths
with hard-coded forward slashes. The service resolves each folder to
native separators, so on Windows the paths it returns did not
deep-equal the expected ones. Build the expected paths with
Path.join instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Nov 22, 2026
@coderabbitai

coderabbitai Bot commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The project service tests now use Effect’s Path service to construct tracked-folder fixture paths and expected discovered-folder paths.

Changes: Project service test paths

Layer / File(s) Summary
Use Path in folder tests
apps/server/src/project/ProjectService.test.ts
The tracked-folder and folder-sync race tests use Effect’s Path service and path.join to build fixture and expected paths. The tracked-folder helper parameter is renamed to avoid shadowing the service.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Suggested reviewers: juliusmarminge, macroscopeapp

Merge Risk: Minimal · up to 99b5c

This is a test-only change that makes tracked-folder tests build paths with native separators. It does not change product behavior and carries no identified merge risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "test(server): tracked-folder tests pass on Windows" matches the main change. The PR switches two ProjectService tests from hard-coded forward-slash paths to Effect Path.join so they pass on…
Description check Passed The description follows the template. It has Problem, Change, Scope, and Verification sections. The Problem section explains the Windows failure and gives reproduction steps. The Change section explai…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "test(server): tracked-folder tests pass on Windows" matches the main change. The PR switches two ProjectService tests from hard-coded forward-slash paths to Effect Path.join so they pass on Windows. The title is concise, uses a conventional commit prefix, and names the affected area and platform.

Full details: Description check

Explanation

The description follows the template. It has Problem, Change, Scope, and Verification sections. The Problem section explains the Windows failure and gives reproduction steps. The Change section explains the switch to path.join and the parameter rename. The Scope section links the related tests (#35925) and explains why no issue is needed. The Verification section reports Windows and Linux test results before and after the change, and the commands run. The description does not include a line that identifies the agent model, but it does: 'Model: Claude Opus 5.5. Harness: Claude Code in T3 Code.' The template calls for this line, so it is covered.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 25440f5 and 99b5c1a.

Files selected for processing: 1

  • apps/server/src/project/ProjectService.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant