Skip to content

ci: gate release publication on built artifact validation#143

Merged
SSobol77 merged 1 commit into
mainfrom
ci/wire-built-artifact-release-gate
Jul 10, 2026
Merged

ci: gate release publication on built artifact validation#143
SSobol77 merged 1 commit into
mainfrom
ci/wire-built-artifact-release-gate

Conversation

@SSobol77

Copy link
Copy Markdown
Owner

Summary

Wire the explicit built-artifact validation gate into the canonical release workflow before any publication action.

What changed

Added a shared release validation job:

validate-built-artifacts

The job:

  1. waits for all platform build jobs;
  2. downloads all generated artifacts;
  3. assembles the current release directory;
  4. generates adjacent checksum sidecars;
  5. runs:
make validate-built-artifacts MACOS_ASSERT_MODE=structural
  1. stages checksum evidence under .checksums/;
  2. verifies the exact 21 GitHub Release asset contract;
  3. uploads the validated release directory as an internal workflow artifact.

Publication ordering

Both publication jobs depend on successful final artifact validation:

publish-pypi
publish-github-release

PyPI publication retains its original policy:

tag push OR workflow_dispatch publish_pypi=true

GitHub Release publication retains its original policy:

tag push OR workflow_dispatch publish_github_release!=false

Both additionally require:

needs.validate-built-artifacts.result == 'success'

Recovery behavior

The workflow preserves independent recovery modes:

  • PyPI only;
  • GitHub Release only;
  • both;
  • neither.

The shared final validation job runs after successful build jobs and before either publication path.

Preserved contracts

This PR does not change:

  • the exact 21 uploaded ECLI-owned GitHub Release assets;
  • the GitHub Release upload glob;
  • non-uploaded .checksums/ evidence;
  • artifact names;
  • version numbers;
  • package mappings;
  • validate-gate2 source/structural behavior;
  • checksum digest verification;
  • release asset verifier semantics.

No checksum sidecars are uploaded as GitHub Release assets.

Tests

Added coverage proving:

  • final built-artifact validation runs after artifact assembly;
  • publication is blocked until validation succeeds;
  • failure is not masked;
  • source-only workflows do not run final artifact validation;
  • PyPI and GitHub Release recovery flags remain independent;
  • all workflow-dispatch publication combinations behave correctly;
  • exact 21 asset semantics remain unchanged;
  • upload and download artifact paths remain compatible.

Validation

Passed:

uv run ruff check src tests scripts
uv run ruff format --check src tests scripts
uv run python scripts/check_runtime_imports.py
uv run pytest -q tests/packaging/test_packaging_workflows_contract.py
uv run pytest -q tests/packaging/test_release_asset_count_gate.py
uv run pytest -q tests/packaging
uv run pytest -q tests/docs
uv run python scripts/f4_linter_linux_provisioning.py --check-official-evidence-drift
make validate-gate2
git diff --check

Observed:

tests/packaging/test_packaging_workflows_contract.py: 19 passed
tests/packaging/test_release_asset_count_gate.py: 85 passed
tests/packaging: 531 passed
tests/docs: 18 passed
PASS: Linux official distro evidence drift audit clean
--> OK: Gate 2 source and structural contract validation completed

Scope

Changed only:

  • .github/workflows/release.yml
  • Makefile
  • docs/release/release-checklist.md
  • docs/release/release-process.md
  • tests/packaging/test_packaging_workflows_contract.py
  • tests/packaging/test_release_asset_count_gate.py

No release artifacts were created or modified.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@SSobol77, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 10 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: b5107a71-742d-47fd-914b-815eb0545b68

📥 Commits

Reviewing files that changed from the base of the PR and between 7a8807b and 9b6a8b2.

📒 Files selected for processing (6)
  • .github/workflows/release.yml
  • Makefile
  • docs/release/release-checklist.md
  • docs/release/release-process.md
  • tests/packaging/test_packaging_workflows_contract.py
  • tests/packaging/test_release_asset_count_gate.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/wire-built-artifact-release-gate

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

@SSobol77 SSobol77 merged commit 66b6f94 into main Jul 10, 2026
7 checks passed
@SSobol77 SSobol77 deleted the ci/wire-built-artifact-release-gate branch July 10, 2026 22:16
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