Skip to content
This repository was archived by the owner on Jul 16, 2026. It is now read-only.

fix(tests): resolve Python 3.14 Windows CI failures caused by subprocess DLL issues - #330

Closed
tschm with Copilot wants to merge 10 commits into
mainfrom
copilot/fix-failing-github-actions-job
Closed

tschm with Copilot wants to merge 10 commits into
mainfrom
copilot/fix-failing-github-actions-job

Conversation

Copilot AI commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Two independent Windows-only failures on Python 3.14 caused by subprocess pipe handles incompatible with the MinGW64 git runtime and uv-managed venv DLL isolation.

Changes

Root cause 1 — _ctypes DLL load failure in test_main.py (2 FAILED)

sys.executable in a uv temp venv can't load _ctypes in child processes because os.add_dll_directory() entries are not inherited across process boundaries. Replaced subprocess-spawning tests with in-process equivalents:

  • test_main_entry_point → typer.testing.CliRunner
  • test_main_direct_execution → runpy.run_path() (matches existing test_main_if_name_main_block pattern)

Root cause 2 — STATUS_DLL_INIT_FAILED (0xC0000142) from MinGW64 git (86 ERRORS)

shutil.which("git") resolves to C:\Program Files\Git\mingw64\bin\git.EXE on this runner. That binary fails DLL init when spawned with capture_output=True (PIPE handles) on Python 3.14 Windows. Production code uses bare "git" (which resolves to the Windows-native cmd\git.exe wrapper) and has no such issue.

Changes across conftest.py, test_e2e_bump_release.py, test_bump_command.py:

  • Removed GIT = shutil.which("git") or "git" — use bare "git" to match production code
  • Changed capture_output=True → stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL for all fixture git calls that discard output (belt-and-suspenders; calls that read stdout retain capture_output=True)

Testing

  • make test passes locally
  • make fmt has been run
  • New tests added (or explain why not needed) — existing 493 tests now all pass; no new tests required

Checklist

  • Commit messages follow the Conventional Commits format
  • CHANGELOG.md entry added (or not needed for this change)
  • Documentation updated if behaviour changed
  • make deptry passes (no unused or missing dependencies)

@tschm
tschm marked this pull request as ready for review July 15, 2026 11:20
Copilot AI review requested due to automatic review settings July 15, 2026 11:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI requested a review from tschm as a code owner July 15, 2026 11:43
Copilot AI changed the title [WIP] Fix failing GitHub Actions job ci / test (3.14, windows-latest) fix(tests): resolve Python 3.14 Windows CI failures caused by subprocess DLL issues Jul 15, 2026
Copilot finished work on behalf of tschm July 15, 2026 11:44
@tschm tschm closed this Jul 15, 2026
@tschm
tschm deleted the copilot/fix-failing-github-actions-job branch July 15, 2026 15:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants