Skip to content

fix: validate browser extra before publishing#88

Merged
dreamiurg merged 1 commit into
mainfrom
codex/release-browser-extra-validation
Jun 19, 2026
Merged

fix: validate browser extra before publishing#88
dreamiurg merged 1 commit into
mainfrom
codex/release-browser-extra-validation

Conversation

@dreamiurg

Copy link
Copy Markdown
Owner

Summary: add a release artifact validator that inspects the built wheel for the browser extra, patchright dependency, and browser transport module; run it in CI and Release before publishing; and let PyPI fail if a version already exists instead of silently skipping a stale artifact. Why: PyPI has an immutable stale peakbagger 1.10.0 wheel that lacks the documented browser extra. The source tree was fixed, but the installable artifact users get was not. Validation: ruff check, ruff format check, pytest, uv build, and scripts/validate_distribution.py all passed locally.

@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.48%. Comparing base (2219343) to head (f14678f).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #88   +/-   ##
=======================================
  Coverage   93.48%   93.48%           
=======================================
  Files          11       11           
  Lines        2026     2026           
  Branches      265      265           
=======================================
  Hits         1894     1894           
  Misses         84       84           
  Partials       48       48           

☔ 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.

@dreamiurg dreamiurg merged commit 3e0feda into main Jun 19, 2026
18 of 19 checks passed
@dreamiurg dreamiurg deleted the codex/release-browser-extra-validation branch June 19, 2026 20:41
@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 85e1829c-bfac-4c29-9391-82b87aaa3b03

📥 Commits

Reviewing files that changed from the base of the PR and between 2219343 and f14678f.

📒 Files selected for processing (3)
  • .github/workflows/ci.yml
  • .github/workflows/release.yml
  • scripts/validate_distribution.py

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Enhanced release process with automated distribution validation to verify package metadata and contents before publishing to PyPI.

Walkthrough

A new script scripts/validate_distribution.py is added to verify that the built wheel contains peakbagger/browser_transport.py and declares correct browser extras metadata. The script is wired into the CI build job and the release workflow (before PyPI publishing), and skip-existing: true is removed from the PyPI publish step.

Changes

Wheel Validation Script and CI/CD Integration

Layer / File(s) Summary
Wheel validation script
scripts/validate_distribution.py
Adds validate_distribution.py with helpers _fail, _metadata_path, validate_wheel, and main. Opens the wheel as a zip, asserts presence of peakbagger/browser_transport.py, parses *.dist-info/METADATA, verifies Provides-Extra: browser, and checks that a patchright requirement is scoped to extra == "browser"; exits with status 1 on any failure.
CI and release workflow wiring
.github/workflows/ci.yml, .github/workflows/release.yml
Inserts a "Validate distribution metadata" step running python scripts/validate_distribution.py dist in the CI build job and in the release workflow before PyPI publish; removes skip-existing: true from the PyPI publish action inputs.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes


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 and usage tips.

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