mirror of
https://github.com/mikeyobrien/ralph-orchestrator.git
synced 2026-04-25 15:15:57 +03:00
[PR #12] [CLOSED] feat: add windows support and fix integration tests #88
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ralph-orchestrator#88
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/mikeyobrien/ralph-orchestrator/pull/12
Author: @procGro
Created: 12/31/2025
Status: ❌ Closed
Base:
main← Head:fix/windows-support📝 Commits (1)
d16c361feat: add windows support and fix integration tests📊 Changes
9 files changed (+264 additions, -81 deletions)
View changed files
➕
patch_windows.sh(+21 -0)📝
pyproject.toml(+1 -0)📝
ralph.yml(+12 -40)📝
src/ralph_orchestrator/adapters/qchat.py(+39 -12)📝
src/ralph_orchestrator/context.py(+2 -2)📝
tests/test_integration.py(+45 -22)📝
tests/test_qchat_adapter.py(+13 -3)📝
tests/test_qchat_integration.py(+11 -2)📝
uv.lock(+120 -0)📄 Description
Summary of changes:
This PR enables
ralph-orchestratorto run on Windows environments. Previously, the tool would crash on import due to Unix-specific dependencies (fcntl) and fail during execution due to default OS encoding issues.Unix Dependency Mocking: In
src/ralph_orchestrator/adapters/qchat.py, I added a conditional import forfcntl. On Windows, aMagicMockstyle class is used to preventImportError, allowing the adapter to load safely.UTF-8 Enforcement: Forced
encoding="utf-8"on allPath.write_text()andread_text()calls. Windows defaults tocp1252, which caused crashes when encountering non-ASCII characters in prompt files.Async/Sync Bridge: Since Windows
unittestoften struggles withasynctest methods, I refactoredtest_orchestrator_checkpoint_creationto use a standarddefwith an internalasyncio.run()call.Setup Lifecycle: Fixed the
TestOrchestratorIntegrationclass whereself.orchestratorwas not being initialized insetUp(), causingAttributeErroracross the suite.Git Side-Effect Verification: Refactored checkpoint tests to verify success by checking the
git rev-list --count, ensuring the orchestrator actually performs commits in the local environment.Environment: Windows 11, Python 3.12.0
Command:
uv run pytest tests/test_integration.py -vWhy I changed Git verification to use commit counts
In the original test, we were asserting against the return value of _create_checkpoint(). However, I refactored this to use git rev-list --count for several reasons:
qCLI to be configured in the Windows path.test_claude_token_extractionremains skipped as it needs a rewrite to support the current SDK response schema.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.