Skip to content

fix(test): improve Windows compatibility of the test suite - #1312

Open
beatenevo wants to merge 4 commits into
oceanbase:masterfrom
beatenevo:windows-compatibility
Open

fix(test): improve Windows compatibility of the test suite#1312
beatenevo wants to merge 4 commits into
oceanbase:masterfrom
beatenevo:windows-compatibility

Conversation

@beatenevo

Copy link
Copy Markdown

Which issue or RFC does this PR close?

Closes #1308.

Rationale for this change

The PowerContext test suite runs successfully on Windows, but five tests failed.Because they assumed POSIX filesystem behavior, Unix permission bits, the platform default text encoding, or POSIX SQLite path formatting. These failures did not indicate runtime or end-to-end failures. The changes make the existing tests portable across Windows and Mac/Linux without changing production behavior.
image

What changes are included in this PR?

Area Windows failure Change
External Skill scan Creating a test symlink requires SeCreateSymbolicLinkPrivilege and raised WinError 1314 Handle the missing privilege and continue testing invalid package handling; preserve symlink assertions when available
Codex scope state Windows stat() does not expose POSIX 0o600 permission bits Keep the permission assertion on POSIX only
Codex Skill contract UTF-8 Chinese content was read using the Windows default encoding Read the Skill file with encoding="utf-8"
Codex recall trace Windows stat() does not expose POSIX 0o600 permission bits Keep the permission assertion on POSIX only
SQLite settings Windows path separators were inserted directly into the expected SQLite URL Build the expected URL through the existing sqlite_url() helper

No production runtime code, generated API code, or public API was changed.

Are there any user-facing changes?

No. This PR only updates platform-specific test assumptions.

How was this change tested?

Tested on Windows 10 with Python 3.12.4.

  • uv sync --link-mode=copy
  • uv run python -m pytest tests/builtin/artifacts/skill tests/codex_plugin/test_contract.py tests/codex_plugin/test_recall.py tests/test_server.py -q
    • 78 passed
  • uv run python -m pytest tests/e2e -q
    • passed
  • uv run python -m pytest --doctest-modules -q -rs
    • 625 passed, 14 skipped
  • uv run ruff check tests/builtin/artifacts/skill/test_external.py tests/codex_plugin/test_contract.py tests/codex_plugin/test_recall.py tests/test_server.py
    • passed

The skipped tests require a dedicated OceanBase test database, a configured Vec1 extension, or intentionally cover a POSIX virtual-environment symlink scenario.The test run also emitted intermittent Windows access violation diagnostics,but pytest exited successfully with no test failures.
image

AI usage statement

OpenAI Codex was used to implement and test these changes.

@CLAassistant

CLAassistant commented Aug 21, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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.

fix: Establish Windows support test coverage

2 participants