Repository navigation
Description
Parent and selected seam
#805 / #816 / #817 — the publication-byte prerequisite for the next release. Release-specific execution index: #1339.
Discovered while reconciling release source truth in #1293 / PR #1299.
PR-sized builder graph — 2026-10-09
This issue remains the integration/acceptance owner. Split implementation into two bounded leaves without weakening any acceptance below:
- release(bytes): validate an independently authorized candidate archive before publication #1343 — pure authorized-candidate identity/byte validator and independently discriminating rejection corpus; no publishing I/O or workflow activation.
- release(publish): promote verified candidate bytes and reject rebuild, replay, or asset overwrite #1344 — after release(bytes): validate an independently authorized candidate archive before publication #1343, wire trusted candidate preparation/promotion, collision/replay/overwrite refusal, and non-publishing production-boundary integration proof.
#1343 -> #1344 -> #1300 acceptance
-> #816 final candidate freeze
-> separate exact authorization and publication in #817
The planned implementation promotes the exact prepared bytes. Record the durable design choice here before production integration; a justified reproducible-rebuild alternative must preserve independently authorized digest comparison before exposure. Do not create a third parallel implementation of the same validator/workflow. Preserve existing release/portability owners and #945 shared-file sequencing.
Problem and current source
At main 33f4271a8e2bf507d387aac7b409a5fc20578512, release-binary.yml independently builds/packages a branch-dispatch candidate and the eventual tag-push archive. The install/tar steps retain fresh filesystem timestamps. Identical source SHA therefore does not establish identical archive bytes, and a normal delayed tag run can differ from the digest authorized from the candidate packet.
The publish job verifies only the tag run's newly generated manifest/checksum, then creates or overwrites release assets. It neither promotes the authorized candidate artifact nor compares against the earlier authorized digest before exposure. #817 requires published identities/digests to match that packet. Post-publication comparison discovers the mismatch too late.
Integrated outcome
Implement and prove a production publication boundary that accepts only the exact previously authorized archive/checksum for the exact authorized candidate source and tag, before any GitHub Release create/upload is permitted.
Supported design choices after durable review:
- promote the exact retained candidate archive/checksum through a trusted artifact-identity path; or
- normalize and prove reproducible packaging, then verify rebuilt bytes against the independently supplied authorized digests before exposure.
Do not change #817's immutable-byte acceptance into a weaker source-SHA-only promise to accommodate the current rebuild. Candidate metadata cannot authorize itself; a trusted external authorization record must bind the exact packet and intended side effects.
Likely surfaces and source truth
.github/workflows/release-binary.yml: package/manifest/publish boundary.- A small Rust/xtask identity validator and fixture tests; reuse project-owned types where present.
src/main.rsrelease-workflow contract tests.docs/RELEASE_RUNBOOK.mdand SPEC-0010: actual implemented identity and authorization contract; coordinate final release prose with docs(release): reconcile advisory scope, version mirrors, and consumer guidance before candidate freeze #1342.policy/allow.tomland CI ledgers for controlled surfaces.- M3d: prepare and verify the next SHA-bound release candidate #816 candidate packet, M3e: authorize, publish, and verify the exact next release #817 exact-SHA/tag authorization, and existing
ub-review.release_candidate.v1.
Acceptance
- The authorized packet binds full candidate SHA, actual source ref, proposed unused tag, workflow/run/attempt identity, exact artifact/asset identity, archive and checksum digests, and relevant toolchain/packaging provenance.
- A branch-dispatch receipt retains its actual ref/tag fields; no cosmetic relabeling produces tag evidence.
- Publication resolves the authorized inputs independently of the tag run's newly generated claims and validates identity/digests before any external create/upload.
- Candidate archive, checksum, or metadata tampering; wrong SHA/ref/tag/run/artifact; absent/expired artifacts; replay from another candidate; and malformed/duplicate fields fail closed before exposure.
- A matching positive fixture crosses exactly one publication boundary; the invocation captures the verified bytes, not a path that can be replaced after validation.
- If rebuilding, fixed-source artifacts are byte reproducible across separated builds with controlled tar/gzip metadata and pinned packaging inputs, and mismatch to the authorized digest is rejected before exposure.
- Existing tag/release collisions stop; no automatic historical-tag reuse or
--clobberpath replaces an already published asset. - Partial external state is retained; retry does not silently overwrite, delete or resume beyond its authorization.
- Candidate preparation remains non-publishing. PR tests and negative controls use fake publication adapters and cannot tag, publish, request release credentials, or upload public assets.
- Candidate code cannot execute with publishing credentials or supply its own approval.
- The workflow/code change does not itself authorize a release, tag, marketplace action, or destructive recovery.
- Receipts preserve actual verification and publication outcomes. Docs state implemented behavior, remaining limitations, and retention requirements.
- Both release(bytes): validate an independently authorized candidate archive before publication #1343 and release(publish): promote verified candidate bytes and reject rebuild, replay, or asset overwrite #1344 are merged through ordinary protected review/checks and the real production boundary has retained non-publishing integration proof; leaf issue closure alone is insufficient.
Proof
Cheapest local fixtures first, hosted non-publishing proof only when appropriate:
- Deterministic positive and tampered/mismatched/replayed/missing candidate fixtures with a recording publication adapter.
- Delayed two-build byte-identity proof if the reproducible-build approach is selected.
- Assert zero publication calls on every identity/digest/authorization failure.
- Existing
cargo test --bin ub-review --locked release_binary_workflowcontract tests, plus focused tests for the chosen validator. cargo fmt --all -- --check, relevant locked check/Clippy,cargo run --locked --package xtask -- policy-check,actionlint .github/workflows/release-binary.yml, andgit diff --check.- Reviewed non-publishing workflow fixture/dispatch receipt binding exact candidate source, workflow, artifacts, and verified digest; no real publication is needed to merge the repair.
- Independent exact-head review of workflow permissions, credential isolation, controlled-file receipts, and absence of candidate-controlled publication authority.
Non-goals
No release cut, tag mutation, asset replacement, public support expansion, provider/portability/stable-tool acceptance, stable coordinator, or branch-protection change. No new general artifact service. Historical #1265 portability work is not general candidate acceptance; retain #815/#1071 ownership and verify current status before reuse.
Rollback and completion
If the new boundary cannot establish identity, keep publication disabled and preserve failing receipts; do not restore unchecked rebuild-and-clobber behavior. Revert only lane-owned code/docs if needed. Destructive public release recovery remains separately authorized.
Close only after the exact authorized-byte boundary is implemented and its failure controls pass before exposure. #816/#817 stay blocked on this prerequisite until then and retain their other unmet acceptance.
Activity
EffortlessSteven commentedon Oct 11, 2026
Pure authorized-byte leaf #1343 is delivered as draft PR #1379 at 9b223f1 (base main411d68f). New strict authorized_release.v1 contract leaves existing release_candidate.v1 producer/workflows unchanged and returns captured immutable verified archive/checksum bytes. Nine adversarial/golden/real-GNU-fixture tests and seven exact-commit local baseline checks pass; independent Luna review has no remaining validator blocker. Hosted required-gate proof and reviewed merge remain pending. Handoff to #1344 is exact prepared-byte promotion: authenticate external authority/API facts independently, consume only verified slices after trusted-time expiry recheck, and freshly reject tag/release collisions before side effects. Point-in-time absence is not a reservation. No publication adapter, workflow wiring, merge or release was performed; this source-only leaf does not close #1300/#816/#817 acceptance.
EffortlessSteven commentedon Nov 5, 2026
Handoff: both leaves delivered (2026-11-04)
Per the builder graph this issue owns, both leaves are now merged on main and the production boundary this issue demands is implemented end to end:
c6bc743b).xtask/src/release_bytes.rs, contractub-review.authorized_release.v1, 9 adversarial/golden/real-GNU-fixture tests, no publication I/O, no binary execution.500930bc). The release path now (a) keeps candidate preparation non-publishing (package job = frozen artifact only,contents:read,persist-credentials:false); (b) resolves trusted facts independently of candidate claims (run/attempt/artifact ids, tree, sha-verified producer ref, tag absence, package version); (c) runscargo xtask validate-release— the release(bytes): validate an independently authorized candidate archive before publication #1343 validator — before the single create; (d) publishes tag + release + both assets exactly once from captured immutable bytes; (e) removesgh release upload --clobberand every rebuild-on-publish route; (f) stops fail-closed on wrong identity, expired artifacts, collisions, API outage, partial upload — the publisher trait exposes no overwrite/move/delete capability at all.Retained proof packet (PR #1647 body + tests): the issue's full 10-item acceptance matrix is covered by named discriminating tests —
authorized_candidate_produces_exactly_one_byte_identical_publication(12/12),every_negative_admission_produces_zero_create_calls(21 named negatives, each asserting zero create/upload calls),captured_bytes_cannot_change_after_validation,partial_publication_requires_explicit_recovery_and_never_clobbers,publish_path_never_rebuilds_or_overwrites, plus the hosted gate + independent-baseline both green on the reviewed head9320b7e1and the re-run green gate on the rebased headc55219ba.Authorization-field mapping (for #816 freeze and #817's maintainer record): the trusted packet = run id + attempt, both immutable artifact ids, exact packet digest, proposed tag, record/verifier/expiry — mapped 1:1 onto
authorized_release.v1's admission inputs (seextask/src/release_bytes.rsandrelease_publish.rson main).Known residuals (fail-stop, documented in the review): a draft release beyond the 1000-release survey budget with no tag ref, and a verify_tag→create_release re-point by a repo-write-capable concurrent actor — both strictly smaller than the closed survey→create TOCTOU, both stop rather than overwrite.
#816 can now freeze a real candidate through this path; #817 remains gated on the separate maintainer authorization. Design deviation retained for review:
release_bytes.rsretained_untilcompares observed artifact-expiry horizon against the packet claim (the producer cannot observe GitHub's computed expiry seconds at packet-write time), with its own dedicated test.EffortlessSteven commentedon Nov 5, 2026
Closing as completed — the production-boundary proof this issue requires is on main.
Both leaves of the builder graph landed and are green on hosted required checks:
c6bc743b): the pureub-review.authorized_release.v1validator.500930bc): the publish path binds publication to independently authorized candidate bytes — non-publishing preparation, trusted facts resolved independently of candidate claims,cargo xtask validate-releasebefore the single create, exact once publication from captured bytes,--clobberand rebuild-on-publish removed, fail-stop on every negative. The publisher trait exposes no overwrite/move/delete capability.Proof retained: the 10-item acceptance matrix is covered by named discriminating tests (zero create/upload calls on all 21 named negatives; exactly one byte-identical call on the positive; tamper/collision/outage/partial-replay stop states), hosted gate + independent-baseline green on the reviewed head
9320b7e1, gate re-green on the rebased headc55219ba, and the composition re-verified on merged main. The full handoff (revisions, design, authorization-field mapping for #816/#817) is in the 2026-11-04 handoff comment above.Residuals are fail-stop and documented (draft-release survey budget; verify-tag re-point by a repo-write-capable actor) — strictly smaller than the closed survey→create TOCTOU.
docs(release): refresh state for the authorized-publication candidate (…