Repository navigation
Probe Each Python Candidate in install.ps1 and Bound the Profile Mask - #4335
Conversation
install.ps1 now runs each of py -3, python3, and python with a probe only Python 3.11 or newer passes, skipping the WindowsApps alias stub. install-tools.ps1 masks the profile in log lines only at a path component. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…limiter Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
There was a problem hiding this comment.
🟡 Changes recommended
The change still has an unresolved profile-boundary bug for dot-hyphen sibling directories, and its regression test does not verify that the Store stub’s diagnostic remains visible.
2 open issues
What changed in this PR
This pull request hardens Windows host setup by probing each Python candidate before selection and improving profile masking in installer logs.
Changes:
- Probes
py -3,python3, andpythonfor Python 3.11 or newer while preserving probe diagnostics. - Bounds profile replacement to avoid masking sibling directory names.
- Adds PowerShell-backed tests for interpreter selection, fallback behavior, and log-path masking.
| File | Description |
|---|---|
| tests/test_install_ps1.py | Adds PowerShell tests for Python candidate probing, fallback behavior, diagnostics, and installer selection. |
| tests/test_install_agents.py | Extends native Windows helper coverage with tests for profile masking in installer failure logs. |
| host-setup/windows/install-tools.ps1 | Applies boundary-aware profile masking to installer and winget log paths. |
| host-setup/agent-safety/claude/install.ps1 | Probes each available Python candidate and selects the first one that satisfies the Python 3.11+ requirement. |
Review effort: Lite
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #4335 +/- ##
========================================
Coverage 79.15% 79.15%
========================================
Files 45 45
Lines 15926 15926
========================================
Hits 12606 12606
Misses 3320 3320
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@coderabbitai review |
|
/review |
Action not completed
|
…ssage Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
|
Local pass finding on install-tools.ps1 (profile mask masks a sibling like bob(old) or bob#2): declined. The mask is a privacy heuristic on free-text log lines, where an unmasked account name costs more than a sibling folder shown as a profile child. The lookahead covers the realistic sibling shapes (letters, digits, underscore, hyphen, dot suffixes such as .000 and .-backup), and Hide-Home, which sees whole paths, stays exact. Punctuation-suffixed sibling profiles are not something Windows creates. |
…ocal Cover, UTF-8 Children (#4342) Promotes the eight pull requests that landed on develop since the last promotion. - #4334: Create the PR with the `comments` label in drive-pr. - #4337: Correct the reviewer reference on CodeRabbit in private repositories. - #4335: Probe each Python candidate in `install.ps1` and bound the profile mask. - #4336: Write kit files atomically through a temporary file beside each target. - #4338: Pin the governance sections the host CLAUDE.md blocks mirror. - #4340: Let an attested pass cover a main head with no Copilot table. - #4339: Rebase or append where an upstream rejects merges or rewrites. - #4341: Pass `PYTHONIOENCODING` to every Python child a test decodes as UTF-8. Closes #1577 Closes #2274 Closes #4176 Closes #4322 Closes #3601 Closes #4317 Closes #4031 Closes #4113 Closes #3925 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Improvements** * The Windows agent installer now detects a working Python 3.11+ interpreter and reports which options were unavailable or too old. * Agent installation better preserves existing files if interrupted or if a write fails. * Installer logs more accurately distinguish profile paths from similarly named folders. * Pull request review guidance clarifies when local review coverage can qualify and how labels affect review runs. * **Documentation** * Updated contribution, review, and agent setup guidance, including governance synchronization checks. <!-- end of auto-generated comment: release notes by coderabbit.ai -->


Summary
install.ps1now runs each ofpy -3,python3, andpythonwith a probe only Python 3.11 or newer passes, leaves the probe's stderr visible, and falls through on a mismatch. The WindowsAppspython3alias stub (exit 9009) is passed over. This mirrorsinstall.sh. The maintainer approved the shape on Probe Each Interpreter install.ps1 Tries Rather Than Taking the First One Found #4031 on 2026-11-19.install-tools.ps1masks the profile in installer and winget log lines unless a folder-name character follows it, so a sibling such as<profile>aor<profile>.000stays whole, while a bare profile before a quote, colon, or sentence period is still masked. A sibling folder whose name continues after a space is not told apart from the profile followed by text.tests/test_install_ps1.pydrivesinstall.ps1under pwsh against stub candidates, one of them running the real probe text. A liftedWrite-InstallFailuretest sits inTestInstallAgentsWindowsHelpers, so the native Windows runner runs both.This edits
host-setup/agent-safety/, so it waits for the maintainer's read of the diff. Do not merge before that.Closes on promotion: #4031, #4113
🤖 Generated with Claude Code