Skip to content

test: align path assertions with canonical helper#975

Merged
TabishB merged 1 commit intomainfrom
codex/fix-canonical-path-tests
Apr 15, 2026
Merged

test: align path assertions with canonical helper#975
TabishB merged 1 commit intomainfrom
codex/fix-canonical-path-tests

Conversation

@TabishB
Copy link
Copy Markdown
Contributor

@TabishB TabishB commented Apr 15, 2026

Summary

  • update Windows-sensitive artifact workflow assertions to use the same canonical path helper as production
  • align artifact output tests with the helper contract instead of raw Node realpath variants

Testing

  • pnpm exec vitest run test/core/artifact-graph/outputs.test.ts test/commands/artifact-workflow.test.ts

Summary by CodeRabbit

  • Tests
    • Implemented consistent path canonicalization in artifact workflow tests to ensure reliable handling of proposal and specification file paths.
    • Enhanced output resolution tests to apply canonical path normalization across direct file assertions, glob pattern matching, and symlink scenarios for improved test reliability.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 15, 2026

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: 08b16563-0830-4e38-9e17-4ba8449af396

📥 Commits

Reviewing files that changed from the base of the PR and between 93f7b79 and 71ffea4.

📒 Files selected for processing (2)
  • test/commands/artifact-workflow.test.ts
  • test/core/artifact-graph/outputs.test.ts

📝 Walkthrough

Walkthrough

Two test files are updated to replace direct fs.realpath() usage with a local canonical() helper that delegates to FileSystemUtils.canonicalizeExistingPath(). Path assertions in artifact workflow and output tests now use canonicalized paths for consistency.

Changes

Cohort / File(s) Summary
Test Path Canonicalization
test/commands/artifact-workflow.test.ts, test/core/artifact-graph/outputs.test.ts
Introduced local canonical() helper delegating to FileSystemUtils.canonicalizeExistingPath() and replaced all fs.realpath() calls in path assertions with canonicalized path comparisons for artifact resolution tests.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

Suggested reviewers

  • alfred-openspec

Poem

🐰 Paths are canonicalized with care,
No more realpath floating in the air—
Helpers delegate with grace,
Assertions find their proper place!
🌟

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'test: align path assertions with canonical helper' directly and clearly summarizes the main changes: introducing a canonical() helper and updating path assertions in test files to use it.
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 codex/fix-canonical-path-tests

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.

Copy link
Copy Markdown
Collaborator

@alfred-openspec alfred-openspec left a comment

Choose a reason for hiding this comment

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

Looks good. This keeps the tests aligned with the production canonical path contract and should reduce cross-platform path flakiness, especially on Windows.

@TabishB TabishB added this pull request to the merge queue Apr 15, 2026
Merged via the queue into main with commit f529b25 Apr 15, 2026
9 checks passed
@TabishB TabishB deleted the codex/fix-canonical-path-tests branch April 15, 2026 10:33
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