chore(release): Windows compatibility & CI hardening (2026-05-10)#56
Open
chore(release): Windows compatibility & CI hardening (2026-05-10)#56
Conversation
b16f27c to
db7f79d
Compare
The managed venv path was hardcoded to Unix-style bin/python, which fails on Windows where venvs use Scripts/python.exe. Now detects the correct path based on runtime.GOOS. Also adds comprehensive tests for venvPython() to catch platform-specific path issues. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
ci: add Go unit tests to CI pipeline Fixed withTempHome() helpers in scan_meta_test.go and mode_test.go to work on Windows by setting USERPROFILE instead of HOME (which os.UserHomeDir() respects on Windows but not in test environments). Also added Go unit tests to the CI pipeline so these tests now run on all platforms (Ubuntu, macOS, Windows) to catch regressions early. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
1. JavaScript and Go parser imports: Added sys.path configuration to test_pipeline.py scripts so they can find the utilities module when run as subprocesses. The working directory is set but Python's module search path wasn't automatically updated. 2. APIStatusError constructor: Updated test_silent_401.py to work with the new Anthropic SDK where AuthenticationError requires response and body keyword arguments. Mock response now includes headers dict that the exception handler expects. ci: run all Python tests instead of a subset Changed from running a hardcoded list of test files to running all tests in the tests/ directory. This ensures all regression tests, Windows path handling tests, and other critical tests are part of the CI pipeline. Previously missing from CI: - test_agreement_filter.py - test_cwe_tagging.py - test_dedup.py - test_diff_filter.py - test_docker_scaffold.py - test_evidence_tier.py - test_file_io.py (important for cross-platform UTF-8 handling) - test_metadata_plumbing.py - test_silent_401.py - test_windows_path_handling.py (important for Windows) All 117 Python tests now pass with this change. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- README: add Python runtime subsection covering OPENANT_PYTHON, the auto-managed venv (Unix bin/python vs Windows Scripts\python.exe), and how to rebuild a stale venv. - CHANGELOG: extend the 2026-05-10 entry with the Windows venv path fix, the parser sys.path / Anthropic SDK / run_utf8 / withTempHome test fixes, and the new go test ./... CI step + pytest tests/ switch. - .gitignore: add _docs/ (local internal notes, not for the public repo). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Release bundle for 2026-05-10. Combines three independently-reviewed PRs into one RC so the overlapping changes in
parsers/{javascript,go}/test_pipeline.py(touched by both #45 and #46) merge cleanly once, instead of forcing a fork rebase.Scope is Windows compatibility + CI hardening — no behaviour changes for Linux/macOS users beyond the new lint step in
python-tests.Included PRs
ci: add ruff lint with F821/F811 rules #44 —
ci: add ruff lint with F821/F811 rulesAdds a
ruff check .step to thepython-testsjob beforepytest. Conservative rule set (F821undefined name,F811redefined unused) — both zero-FP runtime-bug catchers. Fixed one real dormantNameErrorincore/analyzer.py:393that this lint surfaced (tracker.add_prior_usage(...)→get_global_tracker().add_prior_usage(...)).fix: centralize UTF-8 file I/O for Windows compatibility #45 —
fix: centralize UTF-8 file I/O for Windows compatibilityAdds
libs/openant-core/utilities/file_io.py(open_utf8,read_json,write_json,run_utf8) and migrates ~190 bareopen()andsubprocess.run(..., text=True)call sites to pin UTF-8 explicitly. Four regression scanners intests/test_file_io.py(bareopen(,.read_text/.write_text(,.open(,subprocess.run text=True) prevent reintroduction. Resolves'charmap' codec can't decode byte ...on cp1252 consoles when scanning code with non-ASCII content (curly quotes, accents, CJK).fix: Windows-compatible path handling in JS/Go parsers #46 —
fix: Windows-compatible path handling in JS/Go parsersThree Windows-only failures in the JS/Go parsers:
toPosixPath()helper + a static-scanner test guard so ts-morph doesn't silently drop every file when it gets backslash paths.--files-fromnow splits on/\r?\n/and trims each line so CRLF-terminated lists don't leave a trailing\r.parsers/{javascript,go}/test_pipeline.pyprobesys.stdout.encodingat import time and fall back toOK/FAIL/->on cp1252 — UTF-8 terminals keep✓ ✗ →.Stale
xfailmarkers intest_js_parser.pyandtest_go_cli.pyremoved.Conflicts resolved during the merge
parsers/javascript/test_pipeline.pyandparsers/go/test_pipeline.pywere touched by both #45 and #46 (PR #45 swappedsubprocess.run→run_utf8; PR #46 added theSYM_OK/SYM_FAIL/SYM_ARROWprobe). Combined cleanly — both changes belong.Changelog
Top entry of
CHANGELOG.mdupdated with[2026-05-10] — Windows compatibility & CI hardening, voicing the user-facing impact of each fix.Test plan
pytest libs/openant-core/tests/green on the merged RC branch (re-runs the regression scanners from fix: centralize UTF-8 file I/O for Windows compatibility #45 over the post-fix: Windows-compatible path handling in JS/Go parsers #46 code).ruff check libs/openant-core/exits 0 on the merged RC branch.go vet ./...andgo build ./...clean (no Go-side changes here, but the test_pipeline.py Python wrappers are exercised bytests/test_go_cli.py).openant scanagainst a TS repo with non-ASCII content. Expected: non-zero file count from the JS parser, nocharmaperrors in the pipeline status output, noUnicodeEncodeErroron subprocess capture.Closes the Windows-side of items 2, 8, 9 from #16. Does not close #16 (other items remain — venv binary path on Windows, etc.).