test(devin-cli): anchor the empty-data-dir fallback at the host home - #4384
test(devin-cli): anchor the empty-data-dir fallback at the host home#4384luvs01 wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe credential-path tests now use the runtime home directory and normalize Windows separators. This replaces POSIX-specific and fixed-string path assertions. ChangesCredential path test portability
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Other Merge Risk: ⚪ Minimal · up to The test-only portability fix is supported by the cross-platform validation results and is ready to merge. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
리뷰 · 우선순위 54 / 80설명 이 PR은 Windows에서 깨지는 테스트 픽스처만 고칩니다. 프로덕션 코드는 건드리지 않고 무엇이 깨졌냐면, Devin 경로 기대값이 리눅스식 슬래시 문자열( 같은 날 열린 라인 - 이게 무슨 문제다
본문 Verification - 로컬에서 Devin/pnpm 55 passed를 적었지만 hosted Cross-platform CI는 pending입니다. draft 체크리스트도 아직 ready가 아닙니다. 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
75c7c16 to
4283b95
Compare
|
✅ Deterministic PR hygiene checks passed. |
|
Exact-head CI for 4283b95 completed with failure: https://github.com/luvs01/opencodex/actions/runs/34681186783 The three Devin fixture failures are absent from this run; both retained files also passed locally (29 tests, 95 assertions). Remaining recurring assertion groups correspond to Cline inventories (#4386), injection/journal fixtures (#4380), and pnpm shim fixtures (#4379). One additional failure is explicitly unresolved: cli-start-journal-order.test.ts, |
⏳ DRAFT
What to do
Review readiness checklist
1/4 boxes ticked. This PR stays in draft until every box above is ticked. |
3314465 to
cba37f3
Compare
|
This PR was rebuilt on
What remains is one real Windows failure on current This is worth knowing beyond this PR: the same failure is currently red on the Windows lane of every head rebased onto Verification on this head: reproduced 17 pass / 1 fail on |
cba37f3 to
fdba29b
Compare
|
Correction to the head, and a finding worth recording. The first version of this fix anchored both branches at a raw The head is now A full matrix on this exact head is running at run 34726876847, alongside a baseline matrix on unmodified |
Ingwannu
left a comment
There was a problem hiding this comment.
Reviewed the complete one-file patch at fdba29b against dcd13b4.
The new assertions match the resolver's actual contract: its fallback uses the host homedir, while the selected platform controls posix/win32 joining. Checking the Windows branch against win32.join(homedir()) accounts for the separator rewrite on a POSIX host; the data-directory suffix and non-cwd-relative checks remain. No production code, timeout, credentials, workflow, or dependency change is included. This is not the older pnpm/retired ACP patch described in the historical reviews.
I approved exact-head Cross-platform CI 34726826365 and React Doctor 34726826617. The description's cba37f3 evidence is an older revision; these approvals and this review bind fdba29b, not that earlier head. The hosted pull_request lane remains read-only and does not select the self-hosted Windows path.
Keep Draft until the final-head runtime checks and checklist are complete. This execution approval is not merge approval and does not assert every downstream PR will become green. I did not execute tests against the local runtime home.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
The fallback resolves against the real home directory, so asserting a leading slash only held on a POSIX host and failed the Windows lane. Anchor both branches at homedir(), and normalize the anchor for the win32 branch because win32.join rewrites a POSIX host home such as /Users/runner to \Users\runner.
fdba29b to
5a57d08
Compare
…4448) Carry #4384 from fdba29b onto the current dev tip. The empty-XDG_DATA_HOME case asserted the resolved path starts with "/", which is false on a Windows runner: devinCliCredentialsPath picks path.win32 or path.posix from its platform ARGUMENT, but the fallback joins the HOST homedir(), so asking about "linux" from Windows yields C:\Users\<name>/.local/share/devin/credentials.toml. Anchor both crossings at that home directory instead, normalising through win32.join for the win32 branch so a POSIX host home compares against the same separators. Anchoring, not a leading slash, is what proves the path is not cwd-relative, which is the defect the test exists to pin. The surviving endsWith assertions and the startsWith("devin") === false check still prove it. Production behaviour is unchanged; this is test-only. Local product tests, typecheck, build and install: NOT RUN. Hosted exact-head CI on this PR is the merge proof. Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>
|
Landed on |
Summary
The Windows lane fails
tests/providers/devin-cli-login.test.tson currentdev. The empty-XDG_DATA_HOMEcase added with #4418 asserts that the resolved credential path starts with/, but the fallback deliberately resolves against the real home directory, andhomedir()returnsC:\Users\<name>regardless of which platform the resolver is asked about. The assertion therefore only holds when the host is POSIX.Anchor both branches at
homedir()instead. That is the property the test exists to prove — the path is not cwd-relative — and it holds on either host. Thewin32branch needs one extra step: it joins withwin32separators, so a POSIX host home such as/Users/runnercomes back as\Users\runnerand a rawhomedir()prefix would not match. The anchor for that branch is normalized withwin32.join(homedir()), which is a no-op on Windows and rewrites the separators on macOS and Linux. Production behavior is unchanged.Scope change from the original PR
This PR originally carried the Devin path-separator fixture repair plus a pnpm shim fixture repair. Both are now obsolete:
293c37d68(fix(devin-cli): resolve credential paths for the selected platform), which made the POSIX expectations correct.tests/providers/devin-cli-adapter.test.tsno longer exists;213065e30retired the ACP adapter.Rather than close this and open a third PR for the same file, I rebuilt the branch on
dev@dcd13b435with only the one remaining Windows failure fixed. The head is a single commit; the previous two-commit series is gone.Verification
dev: 17 pass, 1 fail —an empty XDG_DATA_HOME or APPDATA does not become a cwd-relative pathattests/providers/devin-cli-login.test.ts:155, expectedtrue, receivedfalse.bun test ./tests/providers/devin-cli-login.test.ts— 18 pass, 0 fail, 34 assertions, Bun 1.4.2 on Windows.bun run typecheck,bun run structure:check,bun run privacy:scan,git diff --check— all passed.win32branch at a rawhomedir()passed Windows and Linux but failed the macOS shard, becausewin32.joinhad rewritten/Users/runnerto\Users\runner. The normalized anchor is verified for both host shapes:\Users\runner\AppData\Roaming\devin\credentials.tomlon a POSIX host andC:\Users\runneradmin\AppData\Roaming\devin\credentials.tomlon Windows both anchor correctly.Checklist
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
All CI tests are green on my local testing.
I pushed my PR to the latest dev commit.
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit
Current verification (2026-09-13)
Head: 5a57d08, rebased onto dev@17da84f89.
Focused tests, typecheck, structure check and privacy scan passed on this rebased source:
(pass) devin-cli credential path and read bounds > no thrown message repeats the key [0.13ms]
18 pass
0 fail
40 expect() calls
Ran 18 tests across 1 file. [1423.00ms]
The previous green matrix tested an older PR head with the pending #4384 fix added. It is integration evidence only, not a passing full-suite result for this published head. Full CI readiness remains open. The current dev tip has advanced beyond this tested base; further refresh will be coordinated with the shared Windows fixture fix to avoid repeatedly queuing matrices that inherit the same failure.