feat(scripts): add Python check-prerequisites PoC#3302
Merged
mnriem merged 3 commits intoJul 6, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a Python proof-of-concept implementation of the existing check-prerequisites script, along with a minimal Python common.py helper module and new tests intended to validate output parity against the existing Bash/PowerShell implementations (without switching any runtime templates over to Python yet).
Changes:
- Added
scripts/python/common.pywith Python equivalents of the subset of shared helpers needed for prerequisite/path resolution. - Added
scripts/python/check_prerequisites.pyimplementingcheck-prerequisitesflag behavior in Python. - Added
tests/test_check_prerequisites_python_parity.pyto compare Python output against Bash (and partially against PowerShell).
Show a summary per file
| File | Description |
|---|---|
| tests/test_check_prerequisites_python_parity.py | Adds parity-oriented tests comparing Python output with Bash (and a limited PowerShell case). |
| scripts/python/common.py | Introduces shared Python helpers for repo-root and feature-path resolution plus command formatting. |
| scripts/python/check_prerequisites.py | Implements the Python PoC of prerequisite checking and JSON/text/path-only outputs. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 3
- Review effort level: Low
mnriem
requested changes
Jul 2, 2026
mnriem
left a comment
Collaborator
There was a problem hiding this comment.
Please address Copilot feedback
Contributor
Author
|
Addressed the requested feedback:
Validation:
|
mnriem
approved these changes
Jul 6, 2026
Collaborator
|
Thank you! |
This was referenced Jul 6, 2026
mnriem
pushed a commit
that referenced
this pull request
Jul 8, 2026
* feat(extensions): port update-agent-context to Python Ports the agent-context extension updater to a single Python script, per #3281 and the check-prerequisites PoC pattern from #3302. The bash version already ran its core logic through embedded Python heredocs, so the port lifts that logic into a standalone script. Parity tests run bash and Python side by side and compare output and resulting context-file bytes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(extensions): match bash case-insensitivity on MSYS, test unparseable config gate Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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.
Description
Adds a Python proof-of-concept implementation for
check-prerequisitesas part of #3279.Scope:
scripts/python/common.pywith the helper subset needed by this scriptscripts/python/check_prerequisites.pyThis preserves the existing shell scripts and keeps activation for follow-up issues.
Fixes #3279
Testing
.venv/bin/python -m pytest tests/test_check_prerequisites_python_parity.py -q.venv/bin/python -m pytest tests/test_check_prerequisites_paths_only.py -q.venv/bin/python -m pytest tests/test_setup_tasks.py -quvx ruff check scripts/python tests/test_check_prerequisites_python_parity.pygit diff --check