Skip to content

test(windows): build_watch_parses uses the long temp path - #38

Merged
t3dotgg merged 1 commit into
mainfrom
fix/win-build-watch-scratch
Oct 11, 2026
Merged

t3dotgg merged 1 commit into
mainfrom
fix/win-build-watch-scratch

Conversation

@t3dotgg

@t3dotgg t3dotgg commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

main CI is red on Windows since R189. build_watch_keeps_the_first_json_parse_of_a_cycle times out with goport_watch: build 2 did not end (2 of 2 runs, also on #37).

Cause: on Windows the test's scratch dir keeps the short temp name (C:\Users\RUNNER~1\...). tsc names its watches by the real path, which is the long name. So the goport_watch edit under the short path reached no watch, and build 2 never started. This only affects the test. Real watches get OS events.

Fix: canonicalize the scratch dir on Windows too, and strip the \\?\ verbatim prefix (the reason for the old Windows skip). This is the same as multi_program.rs, whose sibling .d.ts test passes on Windows. Linux and macOS behavior does not change.

Made by Claude Opus 5.5 in Claude Code (T3 Code).

🤖 Generated with Claude Code

Note

Fix scratch_dir test helper to return canonical, non-verbatim Windows paths

The scratch_dir helper in build_watch_parses.rs now canonicalizes the scratch directory on every platform. On Windows, a new helper converts the canonical verbatim path (drive-letter or UNC) back to ordinary form so it matches the path form used by the TypeScript watcher.

Macroscope summarized 7d8638f.

Summary by CodeRabbit

  • Bug Fixes
    • Improved consistency of temporary directory paths across platforms, including Windows drive and network paths.

On Windows the temp dir can be a short name (C:\Users\RUNNER~1). tsc
names its watches by the real (long) path, so the goport_watch edit under
the short path reached no watch and build 2 never started. The scratch
dir is now canonical without the verbatim prefix, as in multi_program.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Team
  • Run ID: 56ac12f7-eee7-40e6-ad5b-c0d1889c2cff

📥 Commits

Reviewing files that changed from the base of the PR and between 8c8ccc0 and 7d8638f.


📒 Files selected for processing (1)
  • crates/ts_goport/tests/build_watch_parses.rs

Included review availability: This review used your included allowance. 1 included review remains after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.



Walkthrough

The scratch directory helper now canonicalizes its path on all platforms. On Windows, it also removes the verbatim path prefix, including for UNC paths.

Changes

Scratch directory paths

Layer / File(s) Summary
Canonicalize scratch paths
crates/ts_goport/tests/build_watch_parses.rs
scratch_dir_in canonicalizes the created directory and removes the Windows verbatim prefix. The Windows-only unverbatim helper handles drive paths and UNC paths.

Priority: ⬇️ Low

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

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 7d863

The change targets Windows scratch paths; Linux and macOS retain the prior canonicalization behavior. No actionable merge risk is established.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the Windows test change and the use of the long temporary path. It matches the main purpose of the pull request.
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.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR


🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@t3dotgg
t3dotgg merged commit 1c8eaf0 into main Oct 11, 2026
7 checks passed
t3dotgg added a commit that referenced this pull request Oct 11, 2026
Plain merge: the merge base 8c224ef already holds a413812, and int4
holds its revert e72046e, so the bump D program changes stay.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant