Repository navigation
Release on a tag through trusted publishing, with the checks that were memory before - #59
Merged
danielplohmann merged 5 commits intoSep 15, 2026
Conversation
…e memory before Releasing was `make package` then `make publish` with an API token, and the tag workflow only attached artefacts to a release with generated notes. Every check around it lived in whoever was doing it: that the tag matches both version strings, that the version has a changelog section, that the commit is on main and CI went green on it. Pushing a vX.Y.Z tag now runs those as gates, builds in isolation, installs the wheel into a clean environment and imports it with the checkout kept off sys.path, publishes to PyPI through trusted publishing with signed provenance, and creates the GitHub release from the version's changelog section with the generated contributor list appended. Pre-release tags are marked as such. A manual run rehearses against TestPyPI and stops before the release. A PR that changes purepdb/ or pyproject.toml now has to touch CHANGELOG.md or carry the no-changelog label, so the release notes are written while the change is fresh rather than reconstructed at release time. The Python floor moves to 3.12, shared across the MCRIT ecosystem. The checks that parse anything live in a script with tests, because the changelog shape they read is a convention.
This was referenced Sep 12, 2026
Open
…loader for ty Since Python 3.12, shutil.which() on Windows resolves a file only under one of the PATHEXT extensions, even when handed an absolute path. The stub llvm-pdbutil the validator tests hand in has no extension, so on the new floor the guard read it as absent and skipped, and the test that expects a run over an empty corpus to fail saw it succeed instead. The stub carries a .bat extension on Windows; it is never executed there. The guard test loads the script through importlib and left the spec and loader unnarrowed, which ty checks in this repository.
Raising requires-python to 3.12 is a user-visible breaking change -- it is what makes pip refuse the wheel on 3.11 -- and it rode in on a release-workflow PR whose title says nothing about it. Nothing in the workflows needs 3.12 (tomllib is 3.11), so this PR runs on the floor the project has, and the bump goes to a branch of its own with its Removed entry, where it can be reviewed as the ecosystem decision it is. The Windows shutil.which fix stays: it is harmless on 3.11 and needed the day the floor moves. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017jQKALSgFN7VecWTqzWSmD
r0ny123
added a commit
to r0ny123/purepdb
that referenced
this pull request
Sep 12, 2026
…anielplohmann#59 and the dependabot bumps Fill in the fuzz and timing results, note the follow-up branches, and summarise the review in the log. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017jQKALSgFN7VecWTqzWSmD
Two places where this repository had drifted from the shape smda merged in danielplohmann/smda#343. The milestone gate: verify refuses a tag whose milestone still has open items, and release closes that milestone once the release exists. Both steps are byte-identical to smda's, so the ecosystem keeps one thing to fix rather than two that resemble each other. A tag with no milestone emits a notice and releases, which is what makes this adoptable here -- purepdb's one milestone is named `0.3.0` without the `v`, so nothing matches a tag until a release is tracked that way deliberately. The Python floor: smda's RELEASING.md names purepdb as one of the conditions for moving off 3.11, so the reasoning has to exist on this side too. Framed the way it actually applies here rather than copied: purepdb is at the bottom of the stack -- smda depends on `purepdb>=0.3.0` unbounded, MCRIT reaches it through smda -- so this floor constrains what is above it instead of following it, and raising it alone would silently resolve smda back to an older purepdb on 3.11 with nothing reporting the downgrade. Verified: the gate's jq run verbatim against this repository's API in both branches it can reach -- no milestone for `v0.6.0` (notice), `0.3.0` at 100% (pass); the open-items branch has no milestone here to exercise it, and is smda's own tested code. zizmor --persona=regular clean, 601 passed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`purepdb` does not exist on TestPyPI, so "add the same publisher on TestPyPI" sends a maintainer to a project page that is not there. The mechanism for a project that does not exist yet is a pending publisher, on a different form, which the first successful upload converts into an ordinary one. Also states which path reaches TestPyPI at all: a manual rehearsal, never a tag push. A tag always goes to PyPI, where re-running an existing version is a collision rather than a skip. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Sep 15, 2026
danielplohmann
added a commit
that referenced
this pull request
Sep 15, 2026
Both version strings to 0.6.0, `## [Unreleased]` renamed to `## [0.6.0] - 2026-09-15` with a fresh empty one above it, and the compare links moved on. No source changes. First release cut through `publish-release.yml`, which has existed since #59 without a tag ever exercising it. 23 entries from five merged PRs plus the release machinery and three dependency bumps: the corpus-audit fixes (#60), the single-pass record walk (#61), the mapped `PDB.open` and streamed inline-site placement (#62), the C7/C11 signature handling (#65) and the parse-boundary hardening (#53). Minor rather than patch: the `Fixed` entry for the fused `ChangeCodeLengthAndCodeOffset` annotation says **This moves addresses** -- the second and later ranges of an inline site built from that opcode now start earlier than 0.5.0 reported, on every rust-lld and clang output. The first range, and every single-range site, are unchanged. `CHANGELOG.md`'s preamble reserves that for a breaking change and requires it to be stated. Verified before tagging: `release_guard.py --tag v0.6.0` extracts the section and reports prerelease=false, and refuses v0.7.0 naming both version strings; 645 passed, ruff and ty clean on the new pins; `python -m build` plus `twine check --strict` pass on both artefacts; and the wheel, installed into a clean venv and imported with `python -P`, reports 0.6.0 from site-packages with `py.typed` present and runs the entry point. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Releasing purepdb is
make publishwith an API token, and the tag workflow only attaches artefacts to a release with generated notes. The checks around a release live in whoever is doing it: that the tag matchespyproject.tomlandpurepdb/__init__.py, that the version has a changelog section, that the commit is onmainand CI went green on it. None of that is visible afterwards, and a version yanked from PyPI stays unusable under that number forever.This is one of six pull requests giving the MCRIT ecosystem one release process — the same guard, the same tag-triggered workflow, the same changelog check, and a
RELEASING.mdin each repository stating only the values that differ. A maintainer learns it once.Architecture
The hand-written
CHANGELOG.mdis the single stream of change information. Every PR that touchespurepdb/orpyproject.tomladds its own bullet under## [Unreleased]while the change is fresh, or carries theno-changeloglabel; a newChangelogcheck enforces that (read-only token, no PR content executed, Dependabot exempt). At release time the version's section is the release notes, and GitHub's generated list of merged PRs and contributors is appended under it — the entry says what changed and what it costs, the generated half says who and where to diff..github/release.ymlgroups the dependency bumps so they do not sit between the real changes.I looked at Release Please, semantic-release, towncrier and scriv. All of them either derive the notes from commit subjects (which this repository's commit style does not carry, and which produce a list rather than an entry) or add a second place where release information is written. The repository already had a Keep a Changelog file and the discipline to fill it; the cheapest reliable system is to make that file authoritative and gate on it.
Versioning stays Semantic Versioning over
purepdb.__all__, as the changelog header already states. The version is declared inpyproject.tomlandpurepdb/__init__.py;tests/test_version.pyalready tied them together, and the release workflow now refuses a tag that does not match both.What pushing
vX.Y.Zdoes now.github/workflows/publish-release.ymlreplacesrelease.yml:CHANGELOG.mdhas a## [X.Y.Z] - <date>section (written out as the notes), the commit is an ancestor ofmain, and theCIworkflow concludedsuccesson that commitpython -m buildin isolation,twine check --strict, then installs the wheel into a clean venv and imports it withpython -Pso the checkout cannot stand in for the wheel — checks__version__,py.typed, and runs thepurepdbentry pointpypa/gh-action-pypi-publishthrough trusted publishing,id-token: writeas the only credential, attestations on. Environmentpypi; a manual run goes totestpypiinstead and skips an existing versiongh release createwith the changelog section as body,--generate-notesappended, sdist and wheel attached. Pre-release tags (v0.6.0rc1) are marked--prereleaseand not--latestA manual run from a tag rehearses the whole path against TestPyPI and stops before the GitHub release. The guard script has tests (
tests/test_release_guard.py), because the changelog shape it reads is a convention.Other changes
requires-python, classifiers, CI matrices,rufftarget). The ecosystem shares one floor now; nothing in the parser needed 3.12. Recorded underRemoved.RELEASING.mddocuments cutting, rehearsing, pre-releases, recovery and the one-time maintainer configuration;AGENTS.mdand the README point at it.build/twine/hatchlingversions stay the single copy, asAGENTS.mdrequires.pyproject.tomlwas already PEP 621 with a PEP 639 license expression and a PEP 735 dev group; only the floor moved. Dependabot was already configured for actions and pip.Security
persist-credentials: falseon every checkout; top-levelcontents: read, raised per job only where a job writes.make publish's API token, and each file carries PEP 740 provenance.zizmor --persona=regularreports no findings;actionlintclean.Tests
main),ruff checkandty checkclean.python -m build+twine check --strictpass; the wheel installs into a clean Python 3.13 venv, imports fromsite-packageswithpy.typedpresent,purepdb --helpruns. The wheel's metadata readsRequires-Python: >=3.12,License-Expression: BSD-3-Clause.release_guard.py --tag v0.5.0run against the real tree extracts the 0.5.0 section and reportsprerelease=false.What a maintainer has to configure once
purepdb: ownerdanielplohmann, repositorypurepdb, workflowpublish-release.yml, environmentpypi. The same on test.pypi.org with environmenttestpypienables rehearsals.pypiandtestpypi. A required reviewer onpypiturns the publish into an approval step.no-changeloglabel.Until 1 is done, pushing a tag fails at the publish job with PyPI's own message; nothing is created on GitHub, and the tag can be deleted and re-pushed.
Compatibility
make publishstill exists as the manual fallback. Consumers are unaffected except for the 3.12 floor; smda, the one in-ecosystem consumer, moves to the same floor in its own PR.Related pull requests across the ecosystem
The same process, one PR per repository. None depends on another to merge; release order once merged is smda → purepdb → picblocks → MCRIT → MCRITweb → docker-mcrit.