Skip to content

[codex] Add bootstrap host preflight checks#166

Merged
jamesyc merged 1 commit into
mainfrom
codex/bootstrap-preflight
Jun 3, 2026
Merged

[codex] Add bootstrap host preflight checks#166
jamesyc merged 1 commit into
mainfrom
codex/bootstrap-preflight

Conversation

@jamesyc
Copy link
Copy Markdown
Owner

@jamesyc jamesyc commented Jun 3, 2026

Summary

  • adds a bootstrap preflight for the selected Python interpreter and requires Python 3.9+
  • blocks automatic macOS host-tool installation below macOS 14 unless smbclient and sshpass are already installed
  • records preflight details in bootstrap telemetry and documents the macOS 14+ auto-install boundary

Validation

  • /Users/jameschang/git/TimeCapsuleSMB/.venv/bin/pytest tests/test_cli.py -k bootstrap
  • /Users/jameschang/git/TimeCapsuleSMB/.venv/bin/pytest

@jamesyc jamesyc marked this pull request as ready for review June 3, 2026 11:51
@jamesyc jamesyc merged commit 8c61446 into main Jun 3, 2026
16 checks passed
Copy link
Copy Markdown
Contributor

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

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 introduces preflight validation checks during the bootstrap process. It ensures that the selected Python version is at least 3.9 and verifies macOS host tool installation support. On macOS versions older than 14.0, automatic installation of host tools (such as smbclient and sshpass) is disabled, requiring manual installation instead. Comprehensive unit tests have been added to cover these new validation scenarios. 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.

@jamesyc jamesyc deleted the codex/bootstrap-preflight branch June 3, 2026 11:52
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4b8d013ed6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

command_context.update_fields(host_platform_label=platform_label)
print(f"Detected host platform: {platform_label}", flush=True)
command_context.set_stage("check_python")
selected_python_version = validate_selected_python(args.python)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Validate the venv interpreter when reusing it

When .venv already exists, ensure_venv() ignores args.python and returns .venv/bin/python, so this preflight can check the wrong executable on reruns. In that case a stale venv created with Python 3.8 can pass because the selected/system Python is 3.11, or a valid existing venv can be blocked because the selected/system Python is older; either way the interpreter used for the subsequent pip/install steps is not what was validated. Validate the returned venv_python when reusing the venv, or only validate args.python before creating a new one.

Useful? React with 👍 / 👎.

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.

1 participant