-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix: Windows path compatibility in resolver tests #524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Use path.join() in test expectations instead of hardcoded forward slashes - Add openspec/config.yaml with cross-platform requirements to prevent similar issues in future proposals The tests were failing on Windows because path.join() uses backslashes on Windows, but the test expectations hardcoded forward slashes.
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughA new configuration file Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
✨ Finishing touches
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 |
Review CompleteYour review story is ready! Comment !reviewfast on this PR to re-generate the story. |
Greptile SummaryFixed Windows CI test failures by aligning test expectations with cross-platform path behavior. Key Changes:
Technical Details: Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Test as Test Suite
participant Func as getProjectSchemasDir()
participant Path as path.join()
participant OS as Operating System
Test->>Func: Call with '/path/to/project'
Func->>Path: join('/path/to/project', 'openspec', 'schemas')
Path->>OS: Detect platform
alt Windows (win32)
OS-->>Path: Use backslash separator
Path-->>Func: Return '\path\to\project\openspec\schemas'
else Unix (darwin/linux)
OS-->>Path: Use forward slash separator
Path-->>Func: Return '/path/to/project/openspec/schemas'
end
Func-->>Test: Return platform-specific path
Test->>Path: Generate expected value with path.join()
Path-->>Test: Platform-specific expected path
Test->>Test: Compare actual vs expected ✓
|
- Use path.join() in test expectations instead of hardcoded forward slashes - Add openspec/config.yaml with cross-platform requirements to prevent similar issues in future proposals The tests were failing on Windows because path.join() uses backslashes on Windows, but the test expectations hardcoded forward slashes.
# By Tabish Bidiwale (57) and others # Via GitHub * main: (67 commits) fix(ci): use workflow_dispatch for polish release notes (Fission-AI#533) fix(changelog): convert markdown headers to bold text for proper formatting (Fission-AI#532) Version Packages (Fission-AI#531) Add changeset for project config and schema commands (Fission-AI#530) fix(config): handle null rules field in project config (Fission-AI#529) docs: update workflow docs and mark schema commands as experimental (Fission-AI#526) feat(cli): add schema management commands (Fission-AI#525) fix: Windows path compatibility in resolver tests (Fission-AI#524) change(schema-management-cli): proposal for schema management commands (Fission-AI#523) feat(resolver): add project-local schema support (Fission-AI#522) docs: add project-config demo guide (Fission-AI#521) feat(config): add project-level configuration via openspec/config.yaml (Fission-AI#499) fix: auto-trigger polish release notes on release publish (Fission-AI#519) perf: add path filtering to Nix validation CI job (Fission-AI#518) Version Packages (Fission-AI#517) Add changeset for v0.21 release (Fission-AI#516) fix: prevent implementation during explore mode (Fission-AI#515) OPSX apply: infer target change (Fission-AI#513) Refine opsx archive sync assessment (Fission-AI#514) feat: add nix flake support (sorry for this duplicate) (Fission-AI#459) ... # Conflicts: # src/core/templates/slash-command-templates.ts
Summary
path.join()in test expectations instead of hardcoded forward slashesopenspec/config.yamlwith cross-platform requirements to prevent similar issues in future proposalsProblem
The
getProjectSchemasDirtests were failing on Windows CI:The function correctly uses
path.join()which produces OS-specific separators, but the tests hardcoded forward slashes.Solution
path.join()for expected values so tests pass on all platformsopenspec/config.yamlthat injects cross-platform requirements into all OpenSpec proposals, including:path.join()for file pathsTest plan
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Tests
Chores
✏️ Tip: You can customize this high-level summary in your review settings.