Repository navigation
ci(python-cli): verify clean install of the built wheel (rebased #13416) - #21055
Merged
Merged
Conversation
Adds a clean-install smoke test that the publish workflow runs before uploading, so an artifact with a missing or too-loose runtime dependency cannot reach PyPI. This is the guard proposed in #13410. Why: the publish workflow validated metadata with twine check but never installed what it was about to publish, and the PR lane installs -e ".[dev]", where the dev extras hide a missing runtime dependency. omi-cli 0.2.3 shipped that way - its metadata omitted click while omi_cli/main.py imports it, pip resolved typer 0.27.2 (which no longer depends on click), and every fresh install failed with ModuleNotFoundError: No module named 'click'. The branch is squashed into this single commit because the earlier fix: commit subject required a failure-class declaration for a correction to code introduced in the same PR. (cherry picked from commit 82b50f4)
Current main rejects a new workflow job until the inventory names it with a reviewed rationale. Keep the unsampled sentinel so the remaining linux minute cap still holds. Co-authored-by: Cursor <[email protected]>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…blish-path triggers Luna (gpt-6-luna) review of the rebased clean-install gate: - add Python 3.11 to install-smoke (covers stdlib tomllib path; 3.10 keeps tomli marker) - verify-clean-install.sh: EXIT-trap venv cleanup, Windows omi.exe fallback, explicit missing-console-script error - trigger python-cli-ci on publish_omi_cli.yml changes; refresh ci-budget inventory No blockers found. Workflow contract tests (91) and CI budget check pass locally.
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.
Summary
Based on #13416 by @moon1ight13089703-cmyk — rebased onto current main, preserving their commit authorship.
Supersedes #13416.
omi-cli 0.2.3 shipped to PyPI without
clickbecause the publish lane stopped attwine checkand the PR lane'spip install -e ".[dev]"hid the missing runtime dependency. This ports the approved clean-install gate:sdks/python-cli/verify-clean-install.shinstalls every wheel and sdist indist/into a fresh venv, runsomi --versionandomi --help, and checks the printed version against that artifact's own METADATA/PKG-INFO..github/workflows/publish_omi_cli.ymlruns that script betweentwine checkandupload-artifact..github/workflows/python-cli-ci.ymladdsinstall-smokeas its own top-level job (Python 3.10 and 3.12).ci-tierstays first. The job is not nested underwindows-acl.The
clickpin is already on main (pyproject.toml); the package version is 0.3.0. The script's expected stringomi-cli <version>still matchesomi --version.Current main's CI budget rejects a new job until
.github/ci-budget.yamlnames it. That inventory entry is a second commit on top of the cherry-pick (82b50f46f1, recorded with-x). It is an unsampled sentinel: 5-minute p50, 1 run/day, 10 linux-minutes/day. About 59 linux-minutes of cap headroom remained; a later re-seed at thetestsjob's ~50 runs/day would need a cap review.Fork-PR gating
install-smokeruns on fork PRs. It is not behindfull_ci.testshas noneeds: ci-tierand noif.windows-aclis the heavy job: itneeds: ci-tierand runs only whenneeds.ci-tier.outputs.full_ci == 'true'..github/actions/ci-tier/resolve.shsetsfull_cifor non-PR events, same-repo PRs, and fork PRs that currently carryci:full.backend/tests/unit/test_workflow_contracts.py::test_python_cli_fork_deferral_uses_the_standard_noticeonly requires the existing heavy-CI deferral notice in this workflow; it does not put every job behindfull_ci.install-smokeis secret-free (contents: read, no${{ secrets.* }}) and cheap (ubuntu-latest, build a wheel, install it, runomi --version/omi --help). That matches the cheap fork-PR lane, including the Windows ACL note indocs/doc/developer/Contribution.mdx, which reservesci:fullfor slow guardrails and the Windows Python ACL check.Test plan
82b50f46f1with-x(authormoon1ight13089703-cmyk); resolvepython-cli-ci.ymlsoinstall-smokeis a sibling ofwindows-acl.actionlint .github/workflows/python-cli-ci.yml .github/workflows/publish_omi_cli.ymlpython3 .github/scripts/check_ci_budget.py(passed; linux daily budget stays under the cap)pytest --noconftest backend/tests/unit/test_workflow_contracts.py::test_python_cli_fork_deferral_uses_the_standard_notice(1 passed)python3.11). Python 3.10 and 3.12 are not installed on this machine, so those matrix legs were not run locally.python -m buildproduceddist/omi_cli-0.3.0-py3-none-any.whlanddist/omi_cli-0.3.0.tar.gz. The script installed each into its own venv. Both printedomi-cli 0.3.0, matching the artifact metadata, and the fresh installs pulledclick==8.5.0from the declared runtime dependencies.Product invariants affected
none
Failure-Class: none