ci(release): verify exact artifacts before publication - #2503
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
instructor | 47107a9 | Commit Preview URL Branch Preview URL |
Aug 03 2026, 01:14 AM |
b328575 to
47107a9
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issue. You can view the agent here.
Reviewed by Cursor Bugbot for commit 47107a9. Configure here.
| name: Publish approved GitHub release | ||
| if: >- | ||
| github.event_name == 'workflow_dispatch' && inputs.publish && | ||
| needs.prepare.outputs.release_needed == 'true' |
There was a problem hiding this comment.
Existing tag blocks publish
Medium Severity
When a version tag already points at the current commit, release_needed is set to false, so the publish job never runs even if manual dispatch sets publish=true. A tag can exist without a GitHub release (for example after release deletion or a tag-only push), so an explicit publish request can be ignored with no failing job.
Reviewed by Cursor Bugbot for commit 47107a9. Configure here.
## Summary - update the wheel/sdist repository metadata from the former `instructor-ai` organization to `567-labs/instructor` - make release preparation reject stale repository metadata before artifacts are built or published - include the compact OpenAI-compatible multi-model gateway `base_url` example from #2504 while preserving contributor authorship - document the package metadata correction in the `1.15.5` notes The package metadata defect was found by inspecting the exact wheel produced by the non-publishing readiness run after #2503 merged. ## Included / superseded - includes #2504 as the canonical compact docs update - supersedes the broader DaoXE-specific docs PR #2436 with the generic eight-line example Both source commits remain separately attributed on this branch. ## Validation - release validator tests: 6 passed - Ruff check and format: passed - scoped test type check: passed - release metadata validation for `1.15.5`: passed - `uv lock --check`: passed - pre-commit hooks: passed - wheel and sdist build: passed - Twine metadata checks: passed - built wheel reports `Project-URL: repository, https://github.com/567-labs/instructor` - DaoXE `api.daoxe.com/v1/models` and `daoxe.com/v1/models` endpoints both return the expected authenticated API response - `git diff --check`: passed ## Skipped - no runtime/provider implementation changes - no dependency changes - no tag, release, PyPI publication, or social post <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Metadata, release script, docs, and tests only—no library runtime or dependency changes. > > **Overview** > Updates **published package metadata** so `project.urls.repository` points at `567-labs/instructor` instead of the old `instructor-ai` org, and records that fix in the **1.15.5** changelog. > > **Release preparation** now reads that URL from `pyproject.toml` and fails fast with a repository URL mismatch if it still points at the wrong GitHub org, with a test covering the stale-URL case. > > **Docs** add a short `from_provider` example for OpenAI-compatible gateways using `base_url` and a gateway API key (DaoXE as the sample endpoint). > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 5ff8c87. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->


Summary
1.15.5sectionpyproject.toml,uv.lock, the changelog section, and comparison link agreepublish=truebefore creating a releaseRelease safety
The default and scheduled paths cannot create a tag, GitHub release, or PyPI publication. Publication is available only through a manual dispatch on
mainwith the exact declared version andpublish=true, after release checks and both wheel smokes pass. This PR does not dispatch that path.Validation
uv run --frozen pytest tests/test_prepare_release.py -q: 5 passedty: passeduv lock --check: passedscripts/prepare_release.py --expected-version 1.15.5: passeduv build: builtinstructor-1.15.5.tar.gzandinstructor-1.15.5-py3-none-any.whltwine==6.2.0 check: passed for wheel and sdistgit diff --check: passedIncluded / superseded
This follows merged consolidation PR #2502 and makes its release boundary coherent. It supersedes the previous automatic version-bump, changelog-overwrite, and branch-rebuild release paths in these workflows.
Skipped
Note
Medium Risk
Changes how packages reach PyPI and when releases are created; mistakes in workflow gates could block or mis-publish, but publication requires explicit manual dispatch and uses pre-tested artifacts rather than live branch builds.
Overview
Replaces automatic version bumps and branch rebuilds with a read-only release pipeline that builds once, validates metadata, smoke-tests the exact wheel, and only publishes when someone explicitly opts in.
Release Readiness (formerly scheduled release) now runs weekly and on PRs touching release files: it checks
pyproject.toml,uv.lock, changelog, and tags via newscripts/prepare_release.py, runs lint/type/offline tests, builds distributions, uploads artifacts, and smoke-installs the wheel on Python 3.9 and 3.13. GitHub release creation is limited to manualworkflow_dispatchonmainwith the declared version andpublish=true, after smoke tests pass.PyPI upload no longer rebuilds at publish time; it downloads the wheel and sdist attached to the GitHub release, re-validates tag/metadata with
prepare_release.py, runstwine check, then publishes those files.CHANGELOG consolidates pending work into a single dated 1.15.5 section and documents the new release-safety checks under Tests / CI.
Reviewed by Cursor Bugbot for commit 47107a9. Configure here.