Skip to content

test(update): spell expected mise owner paths the way the detector reports them - #5685

Merged
lidge-jun merged 1 commit into
devfrom
codex/260923-bundle-g-mise-windows-fix
Sep 23, 2026
Merged

lidge-jun merged 1 commit into
devfrom
codex/260923-bundle-g-mise-windows-fix

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

Two tests/update/update-mise.test.ts cases from #5682 failed on Windows in a lane=all run (run 35857034366, job windows 7/9): recognises a custom data directory, local alias, and nested aube package and uses the resolved exact version behind a floating link.

The defect was in the fixture, not in detection. src/update/install-detection.mjs reports installPath and toolRoot for a drive-letter or UNC path with forward slashes, so lexical and resolved candidates compare in one spelling; the fixture built its expectations with native path.join (backslashes). In the failing job, installer, tool, backend and install boundary all matched; only the separators differed, and the 8.3 RUNNER~1 prefix was identical on both sides. installPath/toolRoot have no consumer outside the detector.

  • The two tests spell their expected owner paths through reportedPath, the detector's own convention.
  • A new platform-independent test pins that reported spelling for backslash and forward-slash Windows inputs, so a change to it now fails on every OS rather than only on the Windows shards.

No source change. A proposed normalisation of realpath results in sameDirectory was dropped after review: case-folding there could equate distinct directories on case-sensitive volumes, and this failure does not need it. Two pre-existing detector limits were noted in review and are not changed here: an 8.3 spelling inside the mise tool directory name itself, and slash-form UNC paths (//server/share).

Refs #5682

Verification

  • bun test tests/update/update-mise.test.ts tests/update/update-pnpm.test.ts — 47 pass, 0 fail (macOS)
  • bun run typecheck, bun run structure:check, git diff --check — pass
  • gh workflow run ci.yml --ref codex/260923-bundle-g-mise-windows-fix -F lane=all — Windows shards 1/9 to 9/9 are the proof for this change; result in the comments below once complete.

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
    • Added coverage for Windows install paths with mixed separator styles.
    • Updated path expectations to account for Windows drive-letter and UNC paths while preserving POSIX path formatting.

…ports them

On Windows two update-mise tests failed in a lane=all run (windows 7/9):
the detector reports installPath and toolRoot for a drive-letter or UNC
path with forward slashes, so the lexical and resolved candidates compare
in one spelling, while the fixture built its expectations with native
path.join (backslashes). Detection itself was correct: installer, tool,
backend and install boundary all matched, and the 8.3 RUNNER~1 prefix was
identical on both sides.

The fixture now spells its expected owner paths through reportedPath, and a
platform-independent test pins the reported spelling for backslash and
forward-slash Windows inputs, so a change to it fails on every OS instead
of only on the Windows shards.
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner September 23, 2026 12:28
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-23T12:30:03.479205Z b07d56c 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 Sep 23, 2026
@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: lidge-jun/opencodex/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: ed91a688-01b0-4fac-bb55-5e8dcafacdd2

📥 Commits

Reviewing files that changed from the base of the PR and between aa2406b and b07d56c.

📒 Files selected for processing (1)
  • tests/update/update-mise.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The update adds Windows path normalization to install ownership test expectations. It also adds coverage for detector results when Windows package paths use mixed separators.

Changes

Install ownership path tests

Layer / File(s) Summary
Normalize expected paths and test mixed separators
tests/update/update-mise.test.ts
Adds reportedPath for Windows path expectations. Updates existing ownership test expectations and adds checks for Windows paths with mixed separators and unchanged POSIX paths.

Priority: ⚪ Not assessed

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

Change: Other

Merge Risk: ⚪ Minimal · up to b07d5

The updated tests consistently expect forward-slash Windows owner paths and add coverage for mixed separators. No actionable merge risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 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 describes the main test change: expected mise owner paths now use the detector's reported spelling. It is specific, concise, and directly related to the changeset.
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 💡 2
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR

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

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

@lidge-jun

Copy link
Copy Markdown
Owner Author

리뷰 · 우선순위 34 / 80

이 PR은 테스트만 고칩니다. 베이스는 dev입니다. 바뀐 파일은 tests/update/update-mise.test.ts 하나입니다.

윈도우에서 mise 설치 경로를 보는 테스트 두 개가 실패했습니다. 실행 35857034366의 windows 7/9입니다. 감지기 src/update/install-detection.mjs는 드라이브 글자가 있는 경로의 installPath와 toolRoot를 슬래시(/)로 돌려줍니다. 테스트는 path.join으로 기대한 경로를 만들었고, 윈도우의 path.join은 역슬래시(\)를 씁니다. 그 로그에서 설치 도구, 이름, 백엔드, 설치 경계는 같았고, 슬래시 방향만 달랐습니다. RUNNER~1도 양쪽이 같았습니다.

기대 경로를 reportedPath로 감쌉니다. 드라이브 글자나 \\로 시작하면 역슬래시를 슬래시로 바꿉니다. 리눅스와 맥의 경로는 그대로 둡니다. 새 테스트는 파일을 만들지 않고, 역슬래시 입력과 슬래시 입력이 둘 다 C:/Users/RUNNER~1/...로 나오는지 확인합니다. 이 테스트는 윈도우가 아닌 컴퓨터에서도 돕니다.

경로를 소문자로 맞춰 비교하는 안은 이번 커밋에 없습니다. 대소문자를 구분하는 디스크에서 다른 폴더를 하나로 볼 수 있습니다.

tests/update/update-mise.test.ts:136 - 113행부터 135행은 감지기 detectInstallOwnershipFromPath를 부릅니다. 136행과 137행은 테스트 안의 reportedPath만 확인합니다. 감지기 규칙을 바꿔도 이 두 줄은 통과합니다.

tests/update/update-mise.test.ts:28 - 주석은 UNC 경로도 슬래시로 보고한다고 적습니다. 새 테스트가 넣는 경로는 C:로 시작하는 것뿐입니다. \\서버\공유로 시작하는 경로가 깨져도 리눅스 테스트는 통과합니다. //서버/공유처럼 슬래시로 적힌 UNC는 감지기가 윈도우 경로로 보지 않습니다. 그 한계는 이 PR 밖에 있습니다.

메인테이너의 판단이 필요한 지점
이 PR의 CI는 윈도우 테스트 묶음을 건너뜁니다. windows 1/9부터 9/9는 workflow_dispatch이고 lane이 비었거나 all일 때만 돕니다(.github/workflows/ci.yml:839). 그 증거로 돌린 실행은 35860692130이고, 이 글을 쓸 때 대기였습니다. 리눅스 test 1/4부터 4/4가 통과해도, 원래 깨진 두 테스트가 윈도우에서 통과하는지는 그 실행을 봐야 합니다.

너의 추천
기대 경로의 글자를 감지기에 맞춘 방향이 맞습니다. 136행과 137행은 빼세요. 바로 위의 감지기 호출이 이미 같은 규칙을 고정합니다. UNC는 다음으로 미루세요. 실행 35860692130의 윈도우 아홉 조각이 성공한 뒤에 머지하세요. types.ts/config.ts 분리와는 무관해서, 이 PR 때문에 닫을 중복은 없습니다.

이 댓글은 grok-bot이 작성했습니다

@lidge-jun
lidge-jun merged commit 782bfb8 into dev Sep 23, 2026
93 of 98 checks passed
@lidge-jun
lidge-jun deleted the codex/260923-bundle-g-mise-windows-fix branch September 23, 2026 12:53
@lidge-jun

Copy link
Copy Markdown
Owner Author

lane=all proof at head b07d56c1f4: run 35860692130 concluded success on attempt 2 (39 jobs success, privacy gate skipped by scope).

  • windows 1/9 through windows 9/9: all success. windows 7/9, the shard that carried the two failing update-mise cases, passed on the first attempt.
  • Attempt 1 had two batch timeouts that reran green: test 2/4 (batch 9: remote-workspace and codex-integration files) and windows 9/9 (batch 29: server local API auth retry tests). In both, the runner's own attribution sweep reported that every file passed alone, and neither batch contained a file this PR touches.
  • The pull_request CI run 35860694106 at the same head also succeeded.

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.

1 participant