Skip to content

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

Merged
juliusmarminge merged 2 commits into
pingdotgg:mainfrom
pauldupuyjr:tracked-folder-tests-windows
Nov 24, 2026
Merged

juliusmarminge merged 2 commits 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 →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

Commits

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

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

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 · previous review 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.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 24, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

Evidence

Exercised tracked-folder validation, creation, rename, snapshot reads, tracking/untracking, reordering, missing-folder retention, clearing, workspace moves, repository discovery, and deletion through each commit's running server. Each side used fresh isolated data and identical synthetic fixtures. All 28 captured responses match between commits on each OS, excluding the commit header. Windows returns native backslash paths; Linux returns forward-slash paths.

Environment Before After
Commit d0689976cd ac112603b7
Windows Server 2025, Node v26.13.1 Server response capture Server response capture
Linux, Node v26.13.1 Server response capture Server response capture

Driver and synthetic fixture setup. Fixture roots and tracing identifiers are redacted.

Supplementary check, separate from runtime evidence: the reported Windows test command produced 18 passes and 2 separator assertion failures on base, then 20 passes on head.

Not shown:

  • The exact lock-controlled scan/update interleaving in the second changed unit test was not forced through the real server API. Captures show discovery retaining a manually added folder on both commits; deterministic interleaving was covered only by the supplementary test run.

@juliusmarminge juliusmarminge added takeover:ready Takeover done; auto-lands when gates pass and removed takeover:in-progress A takeover lead is working on this PR labels Nov 24, 2026
@juliusmarminge
juliusmarminge merged commit 3555296 into pingdotgg:main Nov 24, 2026
55 checks passed
@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Nov 24, 2026
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.

2 participants