Skip to content

fix: make env-integration test cross-platform (Windows CI)#1160

Merged
Wirasm merged 2 commits intodevfrom
fix/windows-env-test-1128
Apr 13, 2026
Merged

fix: make env-integration test cross-platform (Windows CI)#1160
Wirasm merged 2 commits intodevfrom
fix/windows-env-test-1128

Conversation

@Wirasm
Copy link
Copy Markdown
Collaborator

@Wirasm Wirasm commented Apr 13, 2026

Summary

  • Check for Windows env var equivalents (Path instead of PATH, USERPROFILE instead of HOME) in scenario 3 assertions
  • On Windows, spreading process.env into a plain object preserves the OS-native casing (Path), and HOME doesn't exist (USERPROFILE is the equivalent)

Closes #1128

Test plan

  • Windows CI passes on this PR
  • Ubuntu/Docker CI still green

Summary by CodeRabbit

  • Tests
    • Made environment-variable assertions tolerant of platform differences in casing and key names (e.g., Windows vs. Unix), using fallbacks when needed.
    • Improves cross-platform test reliability so CI and local runs on Windows, macOS, and Linux consistently validate shell-inherited variables without false failures.

Check for Windows env var equivalents (Path instead of PATH,
USERPROFILE instead of HOME) in scenario 3 assertions.

Closes #1128
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d5dddb6e-2ba0-48d4-8188-d2e1d4520dac

📥 Commits

Reviewing files that changed from the base of the PR and between 2b5f23c and b812fa0.

📒 Files selected for processing (1)
  • packages/providers/src/claude/provider.test.ts

📝 Walkthrough

Walkthrough

Updated two tests to make environment-variable assertions tolerant of platform differences by accepting Windows-style environment keys (e.g., Path, USERPROFILE) alongside Unix-style keys (PATH, HOME) using nullish/coalesce checks.

Changes

Cohort / File(s) Summary
Paths env integration test
packages/paths/src/env-integration.test.ts
Adjusted scenario 3 assertions to read subprocessEnv.PATH ?? subprocessEnv.Path and subprocessEnv.HOME ?? subprocessEnv.USERPROFILE before asserting definedness, making the check cross-platform.
Claude provider test
packages/providers/src/claude/provider.test.ts
Made subprocess env comparisons platform-casing tolerant by deriving envPath/envHome and processPath/processHome with ?? fallbacks (PATHPath, HOMEUSERPROFILE) before asserting equality.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped through envs both near and far,
Found PATH and Path beneath the same star,
HOME or USERPROFILE, whichever you send,
I shrug and accept them — rabbit-approved blend. 🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is incomplete and lacks many required template sections (UX Journey, Architecture Diagram, Label Snapshot, Change Metadata, Validation Evidence, Security Impact, Compatibility, Human Verification, Side Effects, and Rollback Plan). Complete the PR description by filling in all required template sections, particularly Validation Evidence, Security Impact, and other mandatory sections outlined in the repository template.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: making the env-integration test cross-platform to fix Windows CI failures.
Linked Issues check ✅ Passed The PR correctly addresses the Windows CI failure by making env assertions cross-platform compatible with Windows environment variable naming (Path/USERPROFILE instead of PATH/HOME), directly resolving issue #1128.
Out of Scope Changes check ✅ Passed All changes are within scope: two test files adjusted for Windows environment variable compatibility, with no modifications to exported/public entities or unrelated functionality.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/windows-env-test-1128

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 and usage tips.

Same cross-platform fix for ClaudeProvider test — spread objects
lose Windows case-insensitive behavior (Path vs PATH, USERPROFILE
vs HOME).
@Wirasm Wirasm merged commit 6a6740a into dev Apr 13, 2026
4 checks passed
@Wirasm Wirasm deleted the fix/windows-env-test-1128 branch April 13, 2026 06:45
kagura-agent pushed a commit to kagura-agent/Archon that referenced this pull request Apr 13, 2026
…1160)

* fix: make env-integration test cross-platform (Windows CI)

Check for Windows env var equivalents (Path instead of PATH,
USERPROFILE instead of HOME) in scenario 3 assertions.

Closes coleam00#1128

* fix: Windows PATH/HOME casing in provider subprocess env test

Same cross-platform fix for ClaudeProvider test — spread objects
lose Windows case-insensitive behavior (Path vs PATH, USERPROFILE
vs HOME).
prospapledge88 pushed a commit to prospapledge88/Archon that referenced this pull request Apr 14, 2026
We develop exclusively on macOS. Windows was an untested platform in
the matrix, going red on the env-integration test cherry-picked from
upstream in d02dd3a (subprocessEnv.PATH vs Path casing on Windows).

Rather than pull upstream's Windows-casing test fix (6a6740a / coleam00#1160)
for a platform we cannot verify locally, scope CI to what we actually
develop against. The release workflow still publishes
archon-windows-x64.exe for user convenience — binary builds remain,
only the test job loses its Windows matrix entry.

If Windows user demand surfaces, reintroduce windows-latest to the
matrix AND cherry-pick upstream coleam00#1160 together.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
tboome33 pushed a commit to tboome33/Archon that referenced this pull request Apr 14, 2026
…1160)

* fix: make env-integration test cross-platform (Windows CI)

Check for Windows env var equivalents (Path instead of PATH,
USERPROFILE instead of HOME) in scenario 3 assertions.

Closes coleam00#1128

* fix: Windows PATH/HOME casing in provider subprocess env test

Same cross-platform fix for ClaudeProvider test — spread objects
lose Windows case-insensitive behavior (Path vs PATH, USERPROFILE
vs HOME).
kagura-agent pushed a commit to kagura-agent/Archon that referenced this pull request Apr 17, 2026
…1160)

* fix: make env-integration test cross-platform (Windows CI)

Check for Windows env var equivalents (Path instead of PATH,
USERPROFILE instead of HOME) in scenario 3 assertions.

Closes coleam00#1128

* fix: Windows PATH/HOME casing in provider subprocess env test

Same cross-platform fix for ClaudeProvider test — spread objects
lose Windows case-insensitive behavior (Path vs PATH, USERPROFILE
vs HOME).
kagura-agent pushed a commit to kagura-agent/Archon that referenced this pull request Apr 18, 2026
…1160)

* fix: make env-integration test cross-platform (Windows CI)

Check for Windows env var equivalents (Path instead of PATH,
USERPROFILE instead of HOME) in scenario 3 assertions.

Closes coleam00#1128

* fix: Windows PATH/HOME casing in provider subprocess env test

Same cross-platform fix for ClaudeProvider test — spread objects
lose Windows case-insensitive behavior (Path vs PATH, USERPROFILE
vs HOME).
joaobmonteiro pushed a commit to joaobmonteiro/Archon that referenced this pull request Apr 26, 2026
…1160)

* fix: make env-integration test cross-platform (Windows CI)

Check for Windows env var equivalents (Path instead of PATH,
USERPROFILE instead of HOME) in scenario 3 assertions.

Closes coleam00#1128

* fix: Windows PATH/HOME casing in provider subprocess env test

Same cross-platform fix for ClaudeProvider test — spread objects
lose Windows case-insensitive behavior (Path vs PATH, USERPROFILE
vs HOME).
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.

fix: Windows CI failing on env-integration.test.ts scenario 3

1 participant