Skip to content

feat: plan protocol crate trusted publishing policy - #86

Draft
zoeyrose wants to merge 1 commit into
mainfrom
feat/protocol-crate-release-policy
Draft

zoeyrose wants to merge 1 commit into
mainfrom
feat/protocol-crate-release-policy

Conversation

@zoeyrose

@zoeyrose zoeyrose commented Oct 4, 2026

Copy link
Copy Markdown
Member

Summary

Record the pending Trusted Publishing contract for the atrinik-protocol crate so its future manual release workflow has an exact action allowance and reviewable environment policy.

Implementation / behavior

  • Allow only rust-lang/crates-io-auth-action@c6f97d42243bad5fab37ca0427f495c86d5b1a18, verified as upstream v1.0.5.
  • Bind the pending contract to atrinik/protocol (repository ID 1327106950), publish-crate.yml, workflow_dispatch on refs/heads/main, and crates-io-release.
  • Specify the verified maintainer zoeyrose (User ID 3865595) as environment reviewer, permit the existing solo-maintainer review flow, disable administrator bypass, and require no environment secrets or variables.
  • Validate the pending-only schema without relaxing existing active environment contracts. The read-only verifier checks repository/reviewer identity and maintainer permission, then reports PENDING; the publisher only reports the manual follow-up.
  • Document release-proof preparation, activation prerequisites and rollback. No future release SHA or crate digest is invented.

Validation

  • All 19 governance test scripts passed, including new schema, action-scope and identity/permission rejection cases.
  • JSON validation, repository validator, Bash syntax, ShellCheck, actionlint and whitespace checks passed.
  • Independent source review passed on d819290f3183d050c599dcbc2d1216aede6aeaea; the reviewer independently reran the schema mutants, full manual-verifier fixture and repository validator.
  • Verified the official action tag and protocol repository/reviewer identities and current reviewer admin permission through read-only GitHub APIs.
  • Reviewed the complete read-only combined-source publisher plan using the exact reviewed inventory from chore: register Atrinik service updater #85; that qualified plan completed successfully.

Limitations / follow-up

This draft applies no policy and creates no environment or Trusted Publisher. It performs no workflow dispatch, crate publication or merge. The protocol workflow and actual published source-release proof remain separate activation prerequisites.

The unmodified proposal's live publisher plan and audit correctly stop because atrinik/service-updater is live but absent from main's inventory; #85 supplies that dependency. The combined plan used temporary copies of #85's inventory files and is not evidence that this proposal alone can currently apply. The complete live manual-settings verifier stops earlier on pre-existing Classic Pages source drift; its overall live result is not passing. New crate identity checks were verified separately, and fixture coverage passes.

zoeyrose added a commit to atrinik/protocol that referenced this pull request Oct 4, 2026
## Summary

Prepare the unpublished Rust 0.2.0 crate for a separately reviewed
registry activation, and fix the release download layout exposed by
v2.6.0.

The published v2.6.0 assets remain unchanged. Its 33 downloaded assets
match their GitHub digests and all 32 flat checksum entries pass, but
its checksum manifest also names 30 nested fixtures absent from the
GitHub asset list. Those fixtures are present in the source archive.

## Implementation / behavior

- Produce a deterministic contract bundle containing the full contract
layout, nested fixtures and internal checksums. Keep the outer release
directory flat, with every downloadable asset covered by the outer
checksum manifest.
- Prepare Cargo source for crates.io while keeping the candidate
explicitly unpublished. Preserve the immutable published 0.1.0 release
coordinates and checksum.
- Add a manual preparation-only workflow. It has no OIDC permission,
registry credentials or upload job. The pending artifact policy contains
no predicted source revision or digest.
- Validate an actual published tag and exact source revision against
local/public Git identity and release provenance; package twice with
Rust 1.97.1; check identical bytes, package inventory, clean VCS
metadata and registry-only dependencies.
- Emit the actual crate and artifact pins for the next review. The
verifier also provides credential-free checks for later pinned release
assets and public API/sparse-index checksums; it never uploads.

## Validation

At `fec06675d996c41e2802a3c8e71d6239733773b2`:

- Full `tools/validate.sh` passed in the pinned Atrinik Linux build
image
`sha256:7904a1802054662b0ede5b55de72e4c92b0112a3c211125f994ed6c62e9ec9d8`,
with Go 1.26.6 and Rust 1.97.1.
- Workflow actionlint, shell lint and full-base whitespace checks
passed. The full aggregate also passed with the pull-request CI
environment variables set.
- Tests cover flat publish-glob discovery, complete outer/internal
checksum inventories, omitted/tampered files, redirected fixture roots,
disabled activation, malformed artifact pins, source-tag drift, crate
provenance/dependency boundaries and registry checksum conflicts.
- Independent review approved the implementation and the final test-only
CI-environment correction. Required GitHub checks `Protocol validation`
and `Conventional PR title` passed on this exact head and accepted base.

## Limitations / follow-up

This is the preparation source change, not registry activation. v2.6.0
still has Cargo publication disabled and cannot supply publishable bytes
without changing them. Actual released-tag preparation therefore follows
a separately approved source merge/release and manual preparation
dispatch.

The next activation PR must use the real prepared source release,
revision, asset and checksum, and add the reviewed Trusted Publishing
upload job. Exact release-asset attachment, environment/Trusted
Publisher setup and publication dispatch each retain their authorization
boundary. Governance preparation is tracked in
[atrinik/github-settings#86](atrinik/github-settings#86);
access-token consumer coordination remains in #43.

No release asset, environment, registry configuration or package was
changed. No merge, dispatch or publication is authorized by this PR.
Consumers still need the actual registry release and normal
dependency-lock validation.
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