Skip to content

Run a reproducible Python quality gate

The build problem

Run a reproducible quality gate for a typed Python CLI across environments, behavior, and hosted source analysis.

Reviewed answer

Recommended path: Use astral-sh/uv, pytest-dev/pytest, and github/codeql-action.

You still own: The repository must still define its supported versions, typed postconditions, coverage target, and complete gate ordering.

Option-by-option decision

Use

astral-sh/uv

Fast Python package and project manager written in Rust.

What it contributes: Owns the reproducible Python environment, lock, execution, and build orchestration.

Watch: It is the environment owner, not a replacement for tests, typing, linting, or hosted security analysis.

Revisit when: The lock or cross-platform execution contract stops being reproducible.

Checked 2026-09-17 · Repository · Evidence

Use

pytest-dev/pytest

Python testing framework for readable tests, fixtures, and plugins.

What it contributes: Runs readable scenario and contract tests across supported Python versions.

Watch: Property generation and branch visibility remain distinct Hypothesis and coverage.py roles.

Revisit when: Supported Python compatibility or plugin behavior becomes unsuitable.

Checked 2026-09-17 · Repository · Evidence

Use

github/codeql-action

GitHub Action for initializing, building, and analyzing projects with CodeQL.

What it contributes: Supplies hosted repository-native source analysis and SARIF reporting in GitHub Actions.

Watch: It is GitHub-hosted and does not replace dependency, workflow, typing, or behavior checks.

Revisit when: GitHub changes the supported action or the selected SHA is no longer valid.

Checked 2026-09-17 · Repository · Evidence

What the existing tools already cover

  • Environment locking, behavior tests, and hosted source analysis already have mature owners.
  • Their boundaries can compose without inventing one universal quality tool.

What you still need to decide or build

  • The repository must still define its supported versions, typed postconditions, coverage target, and complete gate ordering.

That remaining work is the justified custom scope in this decision. The actions above apply only to the stated problem; they are not universal rankings or guarantees beyond the cited evidence.

Checked 2026-09-17 · See all decisions

Brief research evidence - docs/architecture/dogfood-reuse-audit.md - docs/decisions/quality-security.json