Skip to content

ci(release): verify exact artifacts before publication - #2503

Merged
jxnl merged 1 commit into
mainfrom
codex/release-workflow-1.15.5
Aug 3, 2026
Merged

ci(release): verify exact artifacts before publication#2503
jxnl merged 1 commit into
mainfrom
codex/release-workflow-1.15.5

Conversation

@jxnl

@jxnl jxnl commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • reconcile all pending changelog entries into one unpublished 1.15.5 section
  • validate that pyproject.toml, uv.lock, the changelog section, and comparison link agree
  • replace the mutating scheduled release with a read-only weekly and PR readiness workflow
  • build once, validate and smoke-test the exact wheel on Python 3.9 and 3.13, then require an explicit version plus publish=true before creating a release
  • make PyPI publication consume the exact wheel and sdist attached to the release instead of rebuilding from a moving branch

Release safety

The default and scheduled paths cannot create a tag, GitHub release, or PyPI publication. Publication is available only through a manual dispatch on main with the exact declared version and publish=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 passed
  • Ruff check and format: passed
  • full source and test ty: passed
  • uv lock --check: passed
  • both workflow files parse as YAML
  • scripts/prepare_release.py --expected-version 1.15.5: passed
  • uv build: built instructor-1.15.5.tar.gz and instructor-1.15.5-py3-none-any.whl
  • twine==6.2.0 check: passed for wheel and sdist
  • clean installed-wheel smoke: passed on Python 3.9 and 3.13
  • git diff --check: passed

Included / 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

  • no tag or GitHub release creation
  • no PyPI publication
  • no dependency/provider additions
  • no broad feature or architecture changes
  • no social post

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 new scripts/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 manual workflow_dispatch on main with the declared version and publish=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, runs twine 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.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 3, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

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

@jxnl
jxnl force-pushed the codex/release-workflow-1.15.5 branch from b328575 to 47107a9 Compare August 3, 2026 01:12
@jxnl
jxnl marked this pull request as ready for review August 3, 2026 01:17

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

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'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 47107a9. Configure here.

@jxnl
jxnl merged commit 895c2e6 into main Aug 3, 2026
26 checks passed
@jxnl
jxnl deleted the codex/release-workflow-1.15.5 branch August 3, 2026 01:19
jxnl added a commit that referenced this pull request Aug 3, 2026
## 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 -->
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