fix(release): publish plugin and policy artifacts once, tag the rest to the same digest #85
All Vouch review confidence checks passed
Residual risk 0.20 = Change Risk (0.50) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 582 lines diff across 7 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.381
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #85"
general
weight: 0.35
gusfcarvalho
Why
release-go-plugin.ymlandrelease-policies.ymlrangooci upload/gooci upload-singleonce per tag (vX.Y.Z, thenlatestfor a final release). Each gooci upload builds a new manifest (its index carries anorg.opencontainers.image.createdannotation), so the two tags held identical files under different digests. Seen in the rc tests on 2026-10-09:v0.1.1issha256:7c7f…,latestissha256:e2b9…v0.1.0issha256:c0ff…,latestissha256:2d5d…The agent records
_plugin_digestand_policy_digeston evidence, so one build reported two digests depending on which tag an agent config pulled. That breaks provenance.preview.ymlhad the same loop for:main+:sha-<7>.What
In every job that uploads a gooci artifact (
release-go-plugin.ymlpublish,release-policies.ymlpublish,preview.ymlplugin and policies):1. Upload once, to the first (most specific) tag from the
tagsjob:vX.Y.Z,mainorpr-<N>.2. Tag the rest (new step, identical in all four jobs): read the uploaded digest with
crane digest, point each other tag atrepo@<digest>withcrane tag(a registry-side manifest PUT of the same bytes, no re-upload), then check that every tag resolves to that digest and fail if any differs. A single-tag run (rc,pr-N) does no tagging but still runs the check.3. Install crane with
go install github.com/google/go-containerregistry/cmd/crane@v0.20.7. It reuses thedocker/login-actionlogin the job already has.Why crane (not oras)
craneis that library's CLI.crane tagfetches the manifest and PUTs its raw bytes under the new tag, so the digest is preserved for gooci's manifests.go installat an exact version, checked against the Go checksum DB), so there's no new action and no binary download to verify.setup-goexportsGOTOOLCHAIN=local, andrelease-go-plugin.ymlruns the caller'sgo.modGo version. v0.20.7 is the newest crane whosegodirective (1.24.0) is no newer than gooci v0.0.7's (1.24), so it can't break a plugin repo that installs gooci today. v0.21.0 and later need Go 1.25.Local check with real gooci v0.0.7 output against go-containerregistry's in-memory registry. Before: two
upload-singlecalls gavev0.1.0=sha256:6ac6…andlatest=sha256:decd…. After:crane tag repo@sha256:6ac6… latestgave both tagssha256:6ac6….Workflows changed
.github/workflows/release-go-plugin.yml(publish).github/workflows/release-policies.yml(publish).github/workflows/preview.yml(plugin, policies)Checked and left alone
publish-image.yml: a singledocker buildx imagetools createwith every--tagalready makes one index for all tags.release-helm.yml: onehelm pushper release.plugin-release.yml: legacy. The README says it stays unchanged until it is removed, and it is excluded from these tests like the existing ones.Tests (
internal/ciworkflows/oci_test.go)TestGoociUpload: a final release (v1.2.3 latest) now makes exactly one gooci call, for both plugin and policies.TestTagTheRest(fake crane backed by a tag→digest file):- a final release moves a stale
latestto the upload's digest;- an rc makes no tag calls;
- a preview tags
sha-<7>;- a tag that doesn't move fails with an
::error::;- a missing upload fails;
- empty tags fail.
TestUploadOnceTagTheRest, a structural test that fails if the old loop comes back. Every workflow job runninggooci uploadmust:- have exactly one upload, outside any loop;
- follow it immediately with the one shared
Tag the reststep;- have the same pinned
Install cranestep.The test also pins the set of such jobs.
README (preview and release-workflow tables plus a paragraph on the single digest) and the header comments of the three workflows are updated.
Gate: in
golang:1.26with bash 5, jq and yq,go test -race ./...,go vet ./...,gofmt -l ., actionlint v1.7.12, andgo run ./cmd/manifeston both manifests all pass.Live proof comes after release. Once this ships as v1.3.1 and ccf-bump moves the mocks, a final release on mock-plugin-2 and on mock-plugin-policies-1 should show the
latestdigest equal to thevX.Y.Zdigest.Task: W1-S3-FIX-OCI-ONE-DIGEST (local-dev/docs/release-automation/workstream-1-foundations.md)
🤖 Generated with Claude Code