Skip to content

Add windows-latest to CI test matrix in advisory mode (closes #637)#639

Merged
aallan merged 2 commits into
mainfrom
claude/issue-637-windows-ci
May 10, 2026
Merged

Add windows-latest to CI test matrix in advisory mode (closes #637)#639
aallan merged 2 commits into
mainfrom
claude/issue-637-windows-ci

Conversation

@aallan

@aallan aallan commented May 10, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #637.

Two-line addition to .github/workflows/ci.yml adding three windows-latest matrix entries — but in advisory mode (continue-on-error: true for Windows only) because three pre-existing Windows-compatibility bugs surfaced on first CI run. The advisory mode lets us merge the matrix expansion now (so Windows visibility lands) while the underlying bugs are fixed in their own focused PRs.

Matrix change:

  • Before: {ubuntu, macos} × {3.11, 3.12, 3.13} = 6 entries
  • After: {ubuntu, macos, windows} × {3.11, 3.12, 3.13} = 9 entries (Windows advisory)

Why advisory mode

First CI run with Windows entries surfaced 17 test failures across 4 categories — all genuinely Windows-specific bugs that pre-date this PR. Per the test plan we agreed (don't conflate matrix expansion with bug fixing), each is now a focused sub-issue:

Sub-issue Failures Root cause
#640 6 tests/test_cli.py::TestStdinInput::* — Vera CLI's /dev/stdin path is Unix-only
#641 ~9 cp1252 default encoding — and characters trip 'charmap' codec errors in file I/O without explicit encoding='utf-8'
#642 1-2 test_io_read_file_roundtrip embeds a Windows path with \U into a Vera string literal; grammar correctly rejects

Each sub-issue has its own acceptance criteria. When all three land, drop the continue-on-error and Windows entries become strict gates again.

Why merge advisory rather than wait

Acceptance criteria

Choice of windows-latest

Chosen for symmetry with the existing *-latest convention; resolves to Windows Server 2022 today, will roll to Server 2025 on GitHub's published schedule. Server vs consumer Windows differences are negligible for compiler / runtime work — both share the NT kernel, Python distribution, and line-ending / PATH conventions.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests

    • Extended continuous integration testing to include Windows alongside existing Ubuntu and macOS environments.
  • Documentation

    • Updated known issues documentation with specific Windows compatibility limitations and their technical context.

Review Change Stack

Single-line addition to `.github/workflows/ci.yml`'s test matrix
that mirrors the existing per-version coverage onto Windows.

Before: `{ubuntu, macos} × {3.11, 3.12, 3.13}` = 6 entries
After:  `{ubuntu, macos, windows} × {3.11, 3.12, 3.13}` = 9 entries

Closes the OS-coverage gap flagged after PR #631's CI cycle: a
Python 3.11 syntax bug was caught by the existing matrix's 3.11
entries, but a hypothetical Windows-only-at-3.11 bug would have
slipped through.  Windows-specific bug surfaces this catches:

- Path separator handling (raw string concat in module resolution
  / source-file fixtures)
- Line ending differences (CRLF vs LF in conformance fixtures,
  lark grammar handling)
- Locale / encoding (cp1252 default in some Windows Python
  contexts)
- Wasmtime Windows-specific quirks (DLL loading, ctypes ABI)
- Subprocess invocations (`.exe` extension, PATH handling, shell
  dispatch in `tests/test_cli.py`)
- Browser-target tests (Playwright Windows binary differences)

`windows-latest` chosen for symmetry with existing `*-latest`
convention; resolves to Windows Server 2022 today, will roll to
Server 2025 on GitHub's published schedule.

The "+ coverage" gating cell at line 18 / 41 / 45-46 stays
constrained to `ubuntu-latest, 3.12` — coverage remains single-
machine, single-version (no redundant uploads).

Closes #637.

Co-Authored-By: Claude <noreply@anthropic.invalid>
@coderabbitai

coderabbitai Bot commented May 10, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 29df7b30-153b-457a-b10f-f92983117358

📥 Commits

Reviewing files that changed from the base of the PR and between cf0f61c and fce920b.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • KNOWN_ISSUES.md

📝 Walkthrough

Walkthrough

The CI test workflow adds windows-latest to the OS matrix (Ubuntu, macOS, Windows × Python 3.11/3.12/3.13), marks Windows runs advisory-mode via continue-on-error, and updates KNOWN_ISSUES.md with four Windows-specific test-gap entries.

Changes

CI Matrix Expansion

Layer / File(s) Summary
Workflow Matrix Configuration
.github/workflows/ci.yml
The test job's strategy matrix os list expands to include windows-latest, creating 9 total matrix combinations across three Python versions; coverage remains gated to the ubuntu-latest × 3.12 cell.
Windows advisory-mode handling
.github/workflows/ci.yml
Adds continue-on-error for matrix.os == 'windows-latest' and inline advisory comments so Windows failures do not block merges.
KNOWN_ISSUES Windows entries
KNOWN_ISSUES.md
Replaces the previous single coverage-gap note with four Windows-specific entries documenting advisory-mode execution and three linked Windows compatibility issues (/dev/stdin, cp1252 encoding, \U escape in fixtures).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • aallan/vera#638: Documents the Windows CI gap and acceptance criteria that motivated adding windows-latest to the matrix.

Suggested labels

ci

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding windows-latest to the CI test matrix with advisory mode, and references the closing issue #637.
Linked Issues check ✅ Passed The code changes fully satisfy issue #637's acceptance criteria: matrix expanded to windows-latest × {3.11, 3.12, 3.13}, Windows entries marked advisory via continue-on-error, and KNOWN_ISSUES.md updated with sub-issues #640, #641, #642.
Out of Scope Changes check ✅ Passed All changes are tightly scoped to the matrix expansion objective: .github/workflows/ci.yml adds Windows entries, and KNOWN_ISSUES.md documents the advisory state and three sub-issues. No unrelated changes detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/issue-637-windows-ci

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented May 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.97%. Comparing base (23ea1e5) to head (fce920b).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #639   +/-   ##
=======================================
  Coverage   90.97%   90.97%           
=======================================
  Files          59       59           
  Lines       23134    23134           
  Branches      259      259           
=======================================
  Hits        21047    21047           
  Misses       2080     2080           
  Partials        7        7           
Flag Coverage Δ
javascript 57.36% <ø> (ø)
python 94.77% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

First-run Windows CI surfaced 17 test failures across 4 categories
— all pre-existing Windows-compatibility bugs that the matrix
change is the messenger for, not the cause of.

Per the agreed test plan ("don't conflate matrix expansion with
bug fixing"), the matrix entries land in advisory mode while
each bug is fixed in its own focused PR:

  - #640: Vera CLI's /dev/stdin Unix-only — 6 test failures
    in tests/test_cli.py::TestStdinInput::*
  - #641: Default cp1252 file I/O encoding — ~9 failures with
    UnicodeEncodeError on '→' / UnicodeDecodeError on 0x97
    (em-dash in cp1252)
  - #642: test_io_read_file_roundtrip embeds Windows path
    (C:\\Users\\...) into a Vera string literal; grammar
    correctly rejects \\U as invalid escape

Mechanism: continue-on-error: ${{ matrix.os == 'windows-latest' }}
on the test job.  Windows failures show as advisory (yellow) in
the checks UI rather than blocking merges (red).  Existing
Ubuntu/macOS entries stay strict.

When #640, #641, #642 land, drop the continue-on-error line and
Windows becomes a strict gate alongside the other 6 entries.

KNOWN_ISSUES.md updated:
  - #637 entry rewritten to note the advisory state + the three
    blocking sub-issues
  - #640, #641, #642 added under "Test coverage gaps"

Co-Authored-By: Claude <noreply@anthropic.invalid>
@aallan aallan merged commit f148e54 into main May 10, 2026
19 of 22 checks passed
@aallan aallan deleted the claude/issue-637-windows-ci branch May 10, 2026 21:53
aallan added a commit that referenced this pull request May 10, 2026
Closes the third sub-issue from PR #639's matrix-expansion follow-up
cluster (#641 cp1252 file I/O encoding) and flips the Windows
matrix entries from advisory to strict.

This is the "now works on Windows" release.

Set PYTHONUTF8=1 in the CI test job environment so Python's
text-mode open() defaults to UTF-8 regardless of locale (PEP 540).
Covers all CI-side encoding failures with a single config change
rather than auditing ~30 individual call sites.  Closes ~9 failing
tests across test_codegen.py, test_codegen_monomorphize.py,
test_codegen_closures.py, test_html.py.

Also added explicit encoding='utf-8' to vera/parser.py's grammar
load — the load-bearing site that runs on every parse, so users
on Windows without PYTHONUTF8=1 in their shell still get correct
grammar loading (defense-in-depth).

Filed #645 for the broader audit (every text-mode open() /
read_text() / write_text() call site for explicit encoding) as
the durable fix.

Drop continue-on-error advisory mode

PR #639 added Windows entries with continue-on-error: ${{ matrix.os
== 'windows-latest' }} so failures didn't block merges while #640,
sub-issues now closed (PR for #642 sanitises Windows paths in
test fixtures; PR for #640 reads sys.stdin cross-platform; this
PR closes #641).  The continue-on-error line is removed in this
release; the matrix is now fully strict across all 9 entries
(ubuntu / macos / windows × 3.11 / 3.12 / 3.13).

Version bump 0.0.142 → 0.0.143

This is the Windows-compatibility milestone — the project went
from "untested on Windows" to "Windows is a strict gate" in three
sequential PRs (#643 / #644 / this).  Marking with a minor version
bump and "now works on Windows" framing in CHANGELOG.

Co-Authored-By: Claude <noreply@anthropic.invalid>
aallan added a commit that referenced this pull request May 10, 2026
The post-#637 Windows CI rollout (PRs #639/#643/#644/#646) hit
three test-fixture footguns — `tempfile.NamedTemporaryFile`'s
delete-while-open behaviour, Windows paths embedded in Vera
string literals tripping the `\U` escape, and cp1252 default
file I/O encoding.  Each had a portable workaround.

Added a "Test Fixture Conventions" section to TESTING.md
(immediately before "Adding Tests") with the three rules + their
canonical wrong/right code snippets.  Each rule cites the test
that surfaced the bug + the PR that fixed it.

Added a brief "Cross-platform pitfalls" section to CLAUDE.md's
project-orientation footer that points at the TESTING.md section.
The CLAUDE.md entry is a one-bullet pointer per rule, not a
full repeat — keeping the substantive content in TESTING.md as
the single source of truth.

These notes will save the next contributor (or agent) from
re-discovering the same footguns.

Co-Authored-By: Claude <noreply@anthropic.invalid>
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.

Add windows-latest to CI test matrix (3 runners mirroring Ubuntu / macOS)

1 participant