Skip to content

test(git): compare the linked worktree config with native canonical paths - #8690

Merged
lidge-jun merged 1 commit into
devfrom
fix/dev-red3-git-guard-native-path
Nov 13, 2026
Merged

lidge-jun merged 1 commit into
devfrom
fix/dev-red3-git-guard-native-path

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

Summary

windows 9/14 of dev batch run 43413601225 failed tests/ci-workflows/test-git-isolation.test.ts:169, "git config guard > resolves the common config for a checkout and for a linked worktree" (added by #8652, b35c7544dc):

Expected: "C:\Users\RUNNER~1\AppData\Local\Temp\…\ocx-git-guard-dZvZeH\.git\config"
Received: "C:\Users\runneradmin\AppData\Local\Temp\…\ocx-git-guard-dZvZeH\.git\config"

The guard found the right file. Git records the linked worktree's gitdir with Windows' long name, while the fixture root keeps the 8.3 short spelling that JS realpathSync leaves in place, so the two paths differ only in spelling. The assertion now canonicalizes both sides with realpathSync.native, which expands short names. This is the same Windows short-name issue #8672 fixed for the pnpm fixtures. Test-only.

Verification

  • The CI log above shows the mismatch is spelling-only (same directory, RUNNER~1 vs runneradmin).
  • bun test tests/ci-workflows/test-git-isolation.test.ts: 11 pass, 0 fail. bun run typecheck: exit 0.
  • NOT RUN: a local reproduction (my 8.3-name emulation on Linux could not stand in for the JS realpathSync binding the test imports), a native Windows runner (next dev batch), and the full suite.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Summary by CodeRabbit

  • Tests
    • Improved cross-platform path comparison in linked-worktree configuration tests, including clearer comments about Windows path handling.

… paths

windows 9/14 of dev batch 43413601225: git records the linked worktree gitdir with the Windows long name (runneradmin) while the fixture root keeps the 8.3 short spelling (RUNNER~1) that JS realpathSync leaves in place, so the paths differed only by spelling. #8652's guard resolves the right file; compare with realpathSync.native on both sides.
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner November 13, 2026 12:07
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T12:08:59.352486Z 6015de2 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature). label Nov 13, 2026
@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The linked-worktree config-path test now compares both paths after realpathSync.native canonicalization. It also adds comments about differing Windows path spellings.

Changes: Git Isolation Test

Layer / File(s) Summary
Linked-worktree config path comparison
tests/ci-workflows/test-git-isolation.test.ts:169-172
The test uses realpathSync.native to canonicalize the linked-worktree common-config path and fixture config path before comparison. Comments describe differing Windows path spellings.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Merge Risk: Minimal · up to 6015d

This is a test-only change that makes a path comparison tolerant of Windows short-name versus long-name spellings. It has no production impact, and the merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "test(git): compare the linked worktree config with native canonical paths" matches the main change. The raw summary and objectives both say the linked-worktree config test now compares both…
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(git): compare the linked worktree config with native canonical paths" matches the main change. The raw summary and objectives both say the linked-worktree config test now compares both paths with realpathSync.native to fix a Windows short-name (RUNNER~1) versus long-name mismatch. The title is specific, concise, and single-sentence. It names the test scope and the core technique, and it does not rely on file lists or vague terms.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 63c7da7 and 6015de2.

Files selected for processing: 1

  • tests/ci-workflows/test-git-isolation.test.ts

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

@Ingwannu Ingwannu left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved for exact head 6015de2189b67a93fca5e635474562cf59b9fed6 targeting dev (trusted policy snapshot 8f6d9b64e9, live dev 8f6d9b64e9 at review).

The complete diff changes only the linked-worktree assertion to canonicalize both actual and expected paths with realpathSync.native. It still compares the resolved common config path; no production guard, fixture ownership, expected-file check or deadline is removed. The preceding check for the ordinary checkout remains intact.

I inspected the actual hosted test changed log in run43422595796: the linked-worktree/common-config case executed and passed, together with inherited-GIT_DIR isolation and preload guards. The gates job131876124800 has a successful Typecheck step, and the selected PR checks/aggregate ci are green. Fresh Ready/head/review/thread state has no blocker. The run's display title contains lane=all, but its event is pull_request and native platform jobs were skipped; this is selected Ubuntu evidence, not full cross-platform acceptance.

Other Cargo workloads already occupy the local host, so I deferred local execution under the shared-host resource policy rather than overlap them. Neither I nor this hosted PR run reproduced the native Windows 8.3 spelling behavior; that platform check remains with the normal batched dev lane, not a new per-PR dispatch. No live config, service, scan, merge or release was touched.

@lidge-jun

Copy link
Copy Markdown
Owner Author

Maintainer judgment (dev integration, MAINTAINERS.md maintainer-integration exception): merging without a second maintainer approval, as part of the DEV-RED repair for dev batch run 43413601225 (windows 9/14).

  • Exact head: 6015de2189b67a93fca5e635474562cf59b9fed6. Every required PR check on this head passed.
  • Fresh independent review on this exact head (gpt-6.1-terra, high): VERDICT: PASS, no findings. It confirmed the guard compares config contents, not path strings, so only the test's comparison needed native canonicalization. Its fresh runs: test-git-isolation 11 pass / 0 fail; typecheck, layout, ratchet and structure:check pass.
  • Classification: test-assumption bug from fix(test): keep test git off the developer's repository when GIT_DIR is inherited #8652 (Windows 8.3 short vs long spelling). Test-only.
  • No outstanding change requests.

@lidge-jun
lidge-jun merged commit 3b6b6ce into dev Nov 13, 2026
31 checks passed
@lidge-jun
lidge-jun deleted the fix/dev-red3-git-guard-native-path branch November 13, 2026 13:13
lidge-jun added a commit that referenced this pull request Nov 13, 2026
…ound the cold ocx-child build apart from its conformance run (#8711)

* test: compare the release-gate binary by native canonical path, and bound the cold ocx-child build apart from its conformance run

windows 4/14 of dev batch 43483630535: link-gate-codex-binary compared the
child's reported path (runneradmin) with a fixture path from tmpdir() that kept
the 8.3 short spelling (RUNNER~1), which the JS realpathSync leaves in place.
Both sides now use realpathSync.native, as #8690 did. The gate helper itself
spawns the hashed copy by absolute path and compares no path strings.

windows 3/14: the Rust conformance runner, the only Cargo run of ocx-child on
Windows, built the crate cold inside one 90 s bound (29 s and 41 s in earlier
batches) and was cut while still compiling. The build (--no-run) now has its own
180 s bound, the run keeps 90 s, and the file runs alone like the two other
ocx-child Cargo files.

* test(runner): give the ocx-child conformance lane both Cargo bounds

Review of #8711: bun run test runs serial files under a 180 s default lane, so a
cold build that used its 180 s bound left the 90 s run no time. The two bounds
now live in scripts/test.ts, the conformance test reads them, and the file's
serial lane is their sum plus 30 s. The runner test asserts the lane outlasts
both bounds; removing the lane entry makes it fail (180000, expected > 270000).

* ci(release-evidence): approve the scripts/test.ts revision with the conformance lane

The gates job pins the CI harness files a dev run must match to count as release
evidence (.github/scripts/release-evidence-policy.json); scripts/test.ts changed
here, so the latest ci policy no longer matched and the evidence test failed.
Following the procedure in release-evidence.cjs, a new ci entry repeats the last
one with the new blob ID of scripts/test.ts (git hash-object --no-filters); every
older entry is kept. policy-check matches the working tree and the evidence tests
pass (69/69).

---------

Co-authored-by: lidge-jun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants