Skip to content

[codex] Fix Windows workspace change path assertion#1117

Merged
alfred-openspec merged 1 commit into
mainfrom
codex/fix-windows-cli-path-output-test
May 23, 2026
Merged

[codex] Fix Windows workspace change path assertion#1117
alfred-openspec merged 1 commit into
mainfrom
codex/fix-windows-cli-path-output-test

Conversation

@TabishB

@TabishB TabishB commented May 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Normalize the workspace change CLI output before asserting the created change path.
  • Keep the assertion focused on the displayed location while allowing Windows backslashes.
  • Add an empty changeset because this is test-only and has no release impact.

Root cause

The previous fix removed the command failure, but this test still hard-coded a Unix-style path. On Windows PowerShell the CLI prints the workspace-relative path as changes\cross-repo-login/, so the main-branch Windows matrix failed even though the command succeeded.

Validation

  • pnpm exec vitest run test/commands/artifact-workflow.test.ts -t "creates workspace-planning changes under the workspace root without touching linked repos"
  • pnpm exec vitest run test/commands/artifact-workflow.test.ts
  • pnpm exec changeset status --since=origin/main
  • git diff --check

Summary by CodeRabbit

  • Tests
    • Improved cross-platform test reliability to ensure consistent test behavior across different operating systems.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 23, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b74fbfe3-d210-4477-b076-bf3e29b9ed49

📥 Commits

Reviewing files that changed from the base of the PR and between 7fdb177 and ba87d48.

📒 Files selected for processing (2)
  • .changeset/neat-cameras-press.md
  • test/commands/artifact-workflow.test.ts

📝 Walkthrough

Walkthrough

This PR adds cross-platform path handling to the artifact workflow test by normalizing path separators before asserting on CLI output, and includes a changeset file documenting the fix.

Changes

Cross-Platform Path Normalization

Layer / File(s) Summary
Path separator normalization for artifact workflow test
test/commands/artifact-workflow.test.ts, .changeset/neat-cameras-press.md
The workspace-planning test now calls normalizePaths() on the CLI output before checking for the expected changes/cross-repo-login path segment. A changeset file documents this cross-platform fix.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • Fission-AI/OpenSpec#971: Updates workflow CLI output assertions to normalize path separators for platform compatibility.
  • Fission-AI/OpenSpec#975: Modifies artifact workflow test assertions to canonicalize paths before comparing them across platforms.

Suggested reviewers

  • alfred-openspec

Poem

🐰 Paths skip and hop on Windows and Unix,
Normalizing slashes, a cross-platform fix,
Tests now run steady, no platform surprises,
One small change brings harmonized testfalls! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title '[codex] Fix Windows workspace change path assertion' clearly summarizes the main change: fixing a test assertion on Windows that was using Unix-style paths.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ 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 codex/fix-windows-cli-path-output-test

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.

@alfred-openspec alfred-openspec left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good. The normalizePaths() assertion is the right cross-platform fix, and checks are green.

@alfred-openspec alfred-openspec added this pull request to the merge queue May 23, 2026
Merged via the queue into main with commit e441287 May 23, 2026
12 checks passed
@alfred-openspec alfred-openspec deleted the codex/fix-windows-cli-path-output-test branch May 23, 2026 05:47
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.

2 participants