oceanbase / oceanbase/powercontext
fix(windows): resolve worker pipe typing and POSIX-only test assumptions
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 212
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 199
Description
Describe the bug
The current source fails Windows-target type checking with seven errors in artifact-processing workers and tests. This is an existing platform qualification issue recorded in RFC #1455's delivery plan, independently actionable before Desktop code is introduced.
The errors concern Windows PipeConnection values passed to Connection annotations and tests referencing POSIX-only os.WNOHANG. These diagnostics establish a type/platform-check failure; they do not by themselves demonstrate a runtime crash.
Steps to reproduce
On Windows, check out aa697c5315204249e090acdf1a00d0582e851c5f, synchronize the locked development environment, and run:
uv sync --locked
uv run --locked --no-sync ty check --python-platform win32
The local reproduction used --exclude docs/my only to exclude untracked personal research files; this exclusion is unnecessary in a clean checkout.
Expected behavior
- Windows connection types are correctly represented for the operations the worker actually uses.
- POSIX-only test behavior is correctly isolated or expressed through a supported platform-specific path.
- Windows-target type checking passes without blanket ignores, removing tests, or relabeling a Linux-target check as Windows validation.
- Add focused Windows type-check CI coverage and run relevant worker cancellation/cleanup behavior tests, preserving Linux behavior.
Actual behavior
Seven errors:
| Location | Diagnostic |
|---|---|
src/powercontext/builtin/runtime/artifact_processing.py:203 |
Two arguments pass PipeConnection where Connection is expected |
src/powercontext/builtin/runtime/artifact_processing.py:210 |
Two arguments pass PipeConnection where Connection is expected |
src/powercontext/builtin/runtime/artifact_processing.py:216 |
Worker handle receives PipeConnection where Connection is expected |
tests/builtin/runtime/test_artifact_processing.py:312 |
os.WNOHANG is unavailable on Windows |
tests/builtin/runtime/test_artifact_processing.py:382 |
os.WNOHANG is unavailable on Windows |
The same command also emitted three url2pathname deprecation warnings in cli/opencode.py; those warnings are separate from these seven blocking errors and do not need to expand this issue's scope.
Environment
- PowerContext source:
aa697c5315204249e090acdf1a00d0582e851c5f - OS: Windows 11 x64, build 26200
- Active environment: Python 3.12.13
- Configured type-check target: Python 3.11, Windows
- ty: 0.0.56
- uv: 0.11.15
Additional context
- Refs #1455 and #1428; delivery-plan platform prerequisite.
- Worker source.
- Test source.
- Existing Windows portability fixes do not eliminate these diagnostics at the inspected commit.
- Open for community implementation as a focused
masterPR. Desktop scaffolding can proceed in parallel, but these errors must be resolved or correctly platform-scoped before claiming Windows qualification.
Desktop consumer: #1654.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run the locked Windows-target check with uv and ty, then inspect the connection annotations at src/powercontext/builtin/runtime/artifact_processing.py:203-216 and the os.WNOHANG assumptions in tests/builtin/runtime/test_artifact_processing.py:312 and :382. Confirm the worker cancellation and cleanup tests involved, then add focused Windows type-check coverage. Done means the Windows check passes without blanket ignores while Linux behavior remains covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ci-cd, operating-systems, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100