Skip to content

Replay verified prepared release artifacts without rebuilding - #39

Merged
leehack merged 2 commits into
mainfrom
release/prepared-artifact-replay
Nov 3, 2026
Merged

leehack merged 2 commits into
mainfrom
release/prepared-artifact-replay

Conversation

@leehack

@leehack leehack commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

Allow native_release.yml to publish an already qualified prepared artifact without rebuilding it. Replay requires the original run ID, full owner source SHA, tag and manifest SHA256, then verifies the trusted successful run, upstream gitlink, artifact digest, complete archive inventory and archive checksums.

Preparation defaults to publish=false. Only the main-only publication job can write: it verifies the transferred bytes again, atomically creates a new tag at the prepared source, and creates the release without overwriting existing tags, releases or assets. Same-tag runs are serialized; failures after tag creation report the partial state. Existing explicit build-and-publish dispatches remain supported.

Future manifests add the owner source; legacy prepared manifests remain usable through trusted run and gitlink provenance. The current llamadart manifest reader accepted the additive field in an executed compatibility check covering 12 runtimes and the Apple checksum.

Validation

  • 16 focused release tests passed, including corrupt/foreign/expired artifacts, altered archive source, exact byte replay, collision races and partial publication failures.
  • 14 Apple privacy tests passed.
  • actionlint .github/workflows/native_release.yml, Python compilation and git diff --check passed.
  • Full owner suite passed at 433796eb628bc5d513728d3fc045c2afa189dd68: 82 tests, 16 expected skips (214.956 seconds), with the pinned cached Dart 3.13.5 binary on PATH. Skips require unavailable model/runtime/platform scenarios.
  • Replay job-condition regression covers skipped build/package ancestors, verification success/failure/cancel/skip, and run cancellation; restoring the original condition makes it fail.

No release workflow was dispatched, no tag or release was created, and no artifacts were published. Independent review accepted exact head 433796eb628bc5d513728d3fc045c2afa189dd68 against 1c1f03bbb4578c3fbf80a96ad90718ba78a09407: 30 independently rerun tests and 64 release-condition cases passed, with no blocking findings. All 17 GitHub checks passed; no review threads or closing issue references remain. Source merge does not authorize publication.

Remaining integration question

Historical-source publication needs a credential check before readiness. GitHub's release API documentation requires workflow write authorization when the target commit's workflow files differ from the default branch; GITHUB_TOKEN cannot receive that permission. Reference creation also documents a contents+workflows permission set. The original prepared commit predates this publisher workflow, so atomic tag creation with the current token may fail closed. No publication was attempted to probe this. The existing credential path or a source/provenance decision must resolve this before publication.

Read-only configuration inventory found no repository secrets, repository variables or environments supplying another release credential. Original historical-candidate publication remains on hold. A fresh preparation after this workflow merges is a separate option that preserves the old candidate and avoids the documented workflow-tree mismatch while workflow files remain unchanged. No new preparation was dispatched.

@leehack
leehack marked this pull request as ready for review November 3, 2026 00:38
@leehack
leehack merged commit 9d22852 into main Nov 3, 2026
17 checks passed
@leehack
leehack deleted the release/prepared-artifact-replay branch November 5, 2026 12:11
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