Skip to content

[codex] Handle Windows python3 stubs#149

Merged
justinjoy merged 1 commit into
mainfrom
codex/windows-python-runner
Jun 26, 2026
Merged

[codex] Handle Windows python3 stubs#149
justinjoy merged 1 commit into
mainfrom
codex/windows-python-runner

Conversation

@justinjoy

Copy link
Copy Markdown
Contributor

Summary

Fixes #144 by removing the plugin's hard dependency on a literal python3 command when running factlog's deterministic scripts and hooks.

What Changed

  • Added tools/factlog_python.sh, a Python 3.11+ resolver that tries $FACTLOG_PYTHON, python3, python, then py, and verifies each candidate by executing it.
  • Updated the factlog hook scripts to use the resolver instead of calling python3 directly.
  • Kept the gate fail-closed when no usable Python is available.
  • Updated the factlog skill commands to invoke bundled scripts through the resolver.
  • Documented the Windows Microsoft Store python3 stub issue and FACTLOG_PYTHON workaround in both READMEs.
  • Added hook regression coverage for a broken python3 stub on PATH.

Root Cause

On Windows, python3 can resolve to the Microsoft Store stub. That command exists, but it cannot run Python code, so plugin commands and hook JSON/path parsing could fail or behave incorrectly even when python or py works.

Validation

  • C:\Program Files\Git\bin\bash.exe tests/test_gate_check.sh -> 12 passed, 0 failed
  • python -m pytest tests/unit -> 227 passed
  • git diff --check -> no issues

@justinjoy justinjoy marked this pull request as ready for review June 26, 2026 11:16
@justinjoy justinjoy merged commit 6eafb50 into main Jun 26, 2026
3 checks passed
@justinjoy justinjoy deleted the codex/windows-python-runner branch June 26, 2026 11:16
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.

Windows에서 python3 명령이 Microsoft Store stub일 때 플러그인 실행이 어려울 수 있습니다

1 participant