Repository navigation
feat(release): automate immutable public crate graph publication - #33
Merged
Merged
Conversation
…omatic-crate-release
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
🎉 This PR is included in version 2.11.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Summary
Automatically publish reviewed public library versions from immutable GitHub source releases, while keeping source semantic-release versions independent of Cargo versions. The explicit crates.io family is
atrinik-artifact,atrinik-catalog,atrinik-diagnostics,atrinik-schema,atrinik-source,atrinik-testkitandatrinik-transaction, initially lockstep0.1.0.atrinik-contentandatrinik-content-mcpremainpublish = false; GitHub binaries and their source artifacts are preserved.Implementation / behavior
A read-only source job uses the pinned commit analyzer and existing release rules to plan the actual source version, validates the complete toolkit, reproduces the public crate archives twice and compiles the exact extracted compatibility graph. It binds source identity, registry metadata, complete archive inventories, checksums and provenance before source publication. A separate inert job signs the manifest with official GitHub build provenance bound to the protected-main source workflow and exact producing attempt. The separate write job waits for that attestation, repeats semantic-release analysis and performs inert finalization; it does not run Cargo or artifact code.
Protected-main dispatch carries the exact source release ID, revision and manifest digest to an isolated publisher. Before every OIDC upload or owner bootstrap, the helper verifies the actual public release is immutable, the complete flat GitHub asset inventory matches
SHA256SUMS, required source checks succeeded, archive/source coordinates agree, and official cryptographic attestation identifies the exact successful main workflow run. The verifier uses preinstalled GitHub CLI >=2.68 with isolated credential-free configuration and bounds the remotely fetched Snappy attestation bundle. The canonical checksum writer has an actual producer/consumer regression against the remote release verifier.Publication respects the package dependency graph: diagnostics precedes source; source and diagnostics precede catalog and schema; source precedes testkit; catalog, schema, source and diagnostics precede transaction. Artifact is independent. Each dependency must be visible through the registry API, sparse index and exact downloaded bytes before the next dependent upload. Matching existing versions are idempotent, conflicting checksums fail closed, a durable global Git-ref reservation permits at most one registry PUT for each coordinate, uncertain uploads receive read-only reconciliation, and hourly reconciliation repairs missed dispatches. Changed package contents require a reviewed Cargo version increase; unchanged public versions are omitted from later source releases.
Only main source releases may own registry coordinates. Maintenance releases still verify the complete compatibility graph but emit an empty crate manifest and retain the CLI/application archives. Actions branch identity is authoritative, and a conflicting override fails closed. Upload preflight compares stable release and archive identities while allowing download counters and release notes to change.
The branch includes the newly merged dependency-review workflow from
mainwithout changing it.Validation
tools/validate.shin the pinnedghcr.io/atrinik/linux-build:1.10.0image at digest7904a1802054662b0ede5b55de72e4c92b0112a3c211125f994ed6c62e9ec9d8, credential-free with isolated caches and two CPUs.git diff --checkpass.Limitations / follow-up
Publication has not been activated or exercised against the registry. Repository governance must enable owner-enforced immutable releases and the protected
crates-io-releaseenvironment before activation. A mutable source release fails closed before any crate write; recovery requires explicit owner review and preserves its evidence.The seven names need one initial local bootstrap by the verified crates.io owner
zoeyrose(account437663), using a short-lived publish-new API token entered through a hidden terminal prompt. The owner also needs a separate existing GitHub login with repository contents-write authority to reserve the durable intent. The helper checks source and account coordinates and confirms ownership after each first publication. CI never accepts that token. After bootstrap, each crate needs Trusted Publishing configured for this repository, workflowpublish-crate.ymland environmentcrates-io-release.Existing upload intents remain reserved across later releases; recovery requires explicit owner review and retained evidence rather than automatic retry or deletion.
This PR does not merge, dispatch a publisher, bootstrap crate names, change repository settings, or claim live publication success. Whole-corpus acceptance remains covered by the existing CI corpus job.