Skip to content

fix: auto-update never bootstraps missing tools; detect pip via pip3#100

Merged
CybotTM merged 2 commits into
mainfrom
fix/auto-update-no-bootstrap
Jul 7, 2026
Merged

fix: auto-update never bootstraps missing tools; detect pip via pip3#100
CybotTM merged 2 commits into
mainfrom
fix/auto-update-no-bootstrap

Conversation

@CybotTM

@CybotTM CybotTM commented Jul 7, 2026

Copy link
Copy Markdown
Member

Problem

Running make upgrade (the interactive guide) silently installed pip,
even though pip showed as not installed. Two independent causes:

  1. Auto-update bootstrapped missing tools. The global auto_upgrade
    default is true, so every tool without an explicit per-tool setting is
    auto-update-eligible. The guide treated auto_update=true as install or
    upgrade
    , so an absent tool (pip) was freshly installed rather than skipped.

  2. pip was misdetected as absent. The catalog only searched for a bare
    pip binary; systems that expose only pip3 reported pip as not installed,
    which is what triggered the bootstrap in the first place.

Changes

  • scripts/guide.sh — the auto-update path now guards on install state:
    if a tool is not installed it is skipped ("upgrades existing tools only"),
    never bootstrapped. Package acquisition stays with uv/bun. Removed the
    now-unreachable fresh-install branch and the SUMMARY_INSTALLED counter it
    was the sole feeder of (interactive installs already count as Updated).
  • catalog/pip.json — added "candidates": ["pip", "pip3"] (mirroring
    fd/fdfind) so an existing pip is detected and kept current by
    auto-update.

Net behavior

pip state before after
present (as pip3) reported not-installed detected, auto-upgraded
absent auto-installed skipped

Verification

  • pytest: 634 passed, 1 skipped.
  • Gating flake8 (E9,F63,F7,F82) clean; smoke test passes; audit.py --help OK.
  • bash -n scripts/guide.sh clean; added shell lines are shellcheck-clean.
  • Staged a fake pip3 (no bare pip) on PATH + live audit → pip 25.3 -> 26.1.2
    (was not installed before the catalog change).
  • test_guide_multi_install.sh: the only 3 failures are pre-existing on
    unmodified main (nvm classification / single-install warning); no regression.

No version bump or CHANGELOG (feature-branch policy).

Copilot AI review requested due to automatic review settings July 7, 2026 10:58
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request updates the pip catalog configuration to include alternative binary candidates and refactors the guide.sh script to ensure that the auto-update process only upgrades already installed tools instead of bootstrapping missing ones. Uninstalled tools are now skipped silently during auto-update, and the unused SUMMARY_INSTALLED counter has been removed. There are no review comments, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.82%. Comparing base (4a15c28) to head (53acb7e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #100      +/-   ##
==========================================
- Coverage   69.88%   69.82%   -0.06%     
==========================================
  Files          22       22              
  Lines        3347     3347              
==========================================
- Hits         2339     2337       -2     
- Misses       1008     1010       +2     
Flag Coverage Δ
unittests 69.82% <ø> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes an unintended behavior in the interactive upgrade guide where auto-update could bootstrap missing tools (notably pip) and also improves pip detection on systems that only expose pip3. This aligns make upgrade with “upgrade existing tools only” semantics while ensuring pip isn’t falsely flagged as absent.

Changes:

  • Prevent auto-update in scripts/guide.sh from installing tools that are not already installed (skip instead of bootstrap).
  • Simplify/clarify auto-update command construction by defaulting to install_tool.sh <tool> update when applicable and removing the unused “Installed” summary counter.
  • Improve pip detection by adding pip3 as an executable candidate in catalog/pip.json.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
scripts/guide.sh Guards auto-update to only run for already-installed tools; removes now-unused install summary counter.
catalog/pip.json Adds pip3 as a candidate executable so pip can be detected when only pip3 exists.

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

Comment thread scripts/guide.sh Outdated
CybotTM added 2 commits July 7, 2026 13:04
…issing ones

The interactive upgrade guide treated auto_update=true as "install or
upgrade", so a tool that was not installed (e.g. pip) was freshly
installed on our behalf. Guard the auto-update path on install state:
skip uninstalled tools and leave deliberate installs to the interactive
prompt, deferring package acquisition to uv/bun.

Drop the now-unreachable fresh-install branch and the SUMMARY_INSTALLED
counter it fed (interactive installs already count as Updated).

Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
Systems commonly expose only pip3, not a bare pip. Add pip3 to the
detection candidates (mirroring fd/fdfind) so an existing pip is
recognized and kept current by auto-update instead of being reported
as not installed.

Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
@CybotTM
CybotTM force-pushed the fix/auto-update-no-bootstrap branch from f8aa845 to 53acb7e Compare July 7, 2026 11:04
@CybotTM
CybotTM requested a review from Copilot July 7, 2026 11:04
@sonarqubecloud

sonarqubecloud Bot commented Jul 7, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@CybotTM
CybotTM merged commit 77ab3b1 into main Jul 7, 2026
21 of 22 checks passed
@CybotTM
CybotTM deleted the fix/auto-update-no-bootstrap branch July 7, 2026 11:07
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.

2 participants