Skip to content

test: make suite portable on Windows#154

Merged
alphacrack merged 2 commits into
alphacrack:mainfrom
innovationty:agent/windows-test-portability
Jul 19, 2026
Merged

test: make suite portable on Windows#154
alphacrack merged 2 commits into
alphacrack:mainfrom
innovationty:agent/windows-test-portability

Conversation

@innovationty

Copy link
Copy Markdown
Contributor

What this changes

Skips the POSIX executable-bit assertion on Windows, where NTFS cannot
represent that behavior, while leaving both assertions unchanged on POSIX.
Generated tutorial fixtures and artifacts are now read and written explicitly
as UTF-8 instead of relying on the Windows locale.

Why

On this Windows checkout, the baseline had 11 failures: one synthesized
executable-bit failure and ten GBK/UTF-8 decode failures. The test-only fix
keeps the product code and POSIX behavior untouched.

Validation

  • Before: 11 failed, 350 passed
  • After: 360 passed, 1 skipped on Windows; the skip is the POSIX-only permission check
  • python -m ruff check src/ tests/

No Docker, API keys, source files, sandbox flags, or prompts were involved.

Fixes #144

@innovationty
innovationty marked this pull request as ready for review July 18, 2026 14:29
@innovationty
innovationty requested a review from alphacrack as a code owner July 18, 2026 14:29

@alphacrack alphacrack left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks @innovationty — this is a model first PR for this repo.

What I checked, so you know the bar you cleared:

  • Skip vs. weaken: the skipif gates only on os.name == "nt" and the S_IXUSR/S_IXOTH assertions are untouched, so POSIX still asserts the real product behavior (distill.write_commands_sh's chmod(0o755)). Exactly what #144 asked for.
  • Encoding fixes: every bare read_text/write_text on generated artifacts in test_tutorial.py now pins encoding="utf-8", matching what the writers in tutorial.py produce — fixed rather than skipped, which is the right call for this class.
  • Ran your exact head locally (macOS): 361 passed — identical to main, so the POSIX path is unaffected. ruff, mypy, and the coverage gate (85.99% ≥ 80%) pass too.
  • The Regression (#144, reported in #82) docstring follows the house convention, and your Windows before/after numbers line up exactly with the failure split predicted in the issue — GBK verification is a nicer stress test than the cp1252 case I wrote up.

CI shows no checks only because first-time contributions need a maintainer to approve the workflow run — the maintainer will kick that off; expect green.

If you're interested in a follow-up, the windows-latest CI lane mentioned in #144 is the natural next step (comment there first — it's a runner-cost decision). Either way: a tight, well-validated diff. Thank you.

@alphacrack
alphacrack merged commit cb1040f into alphacrack:main Jul 19, 2026
6 checks passed
alphacrack added a commit that referenced this pull request Jul 19, 2026
* release: v0.7.0 — the GitHub Action wedge

The milestone release: a composite Action that verifies the README in
CI and fails the build when it breaks (#157), report exit codes as the
verdict (#158), report --markdown job summaries (#159), and per-run
badge.json (#156). Windows-portable suite (#154, first-time
contributor) and the hermetic docker-socket test fix (#155).

Ships docs/whats-new-0.7.0.md: a step-by-step walkthrough of every
user-facing change since 0.6.0, each command executed against the
committed example run before publishing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* docs: whats-new step 1 installs from the checkout (not on PyPI yet, #19)

Guide mode executes every step verbatim in the sandbox; 'pip install -U
readme2demo' would fail there (or fetch a name-squatted package).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix: action.yml description under Marketplace's 125-char limit

The Marketplace publish validator rejects descriptions >=125 chars;
ours was ~170. Same claim, fewer words.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.

tests: suite fails on Windows — POSIX executable-bit assertion + locale-dependent reads of UTF-8 artifacts

2 participants