Repository navigation
Conversation
…8743) moq.dev's go-import tag has said `mod https://go.moq.dev` since 2026-11-21, but `release` still pushed each moq-ffi release to the git mirror only, so moq.dev/moq-ffi v0.4.28 never reached go.moq.dev and every Go wrapper release since has failed to download it. Port main's publisher: release-go-ffi.yml picks go.moq.dev or the mirror by moq.dev's go-import tag, publish-ffi.sh builds the version with sh/go/modzip and uploads it through infra/go's upload and verify scripts, and the wrapper's push gate asks the same origin whether the ffi version is published. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A rerun that rebuilds the native libs makes a byte-different zip, which the immutable upload refuses, so a run that died after the zip went up left the version unpublishable. Count the zip as published and upload only the .mod and .info the earlier run missed. Also port main's Go guide line on the ffi module. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
marked this pull request as ready for review
November 28, 2026 09:10
This branch has not been deployed
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.
Problem
moq.dev's go-import tag has sent
moq.dev/moq-ffitomod https://go.moq.devsince 2026-11-21, but releases ship fromrelease, whoserelease-go-ffi.ymlstill pushes only to themoq-dev/moq-go-ffigit mirror. Somoq-ffi-v0.4.28(2026-11-23) reached the mirror and never go.moq.dev:go get moq.dev/moq-ffi@v0.4.28fails through proxy.golang.org and withGOPROXY=direct(reading https://go.moq.dev/moq.dev/moq-ffi/@v/v0.4.28.info: 404 Not Found).package-wrapperdownloading it: 45150250878, 45321435938, 45701155545, 46042922155.moq.dev/moqis stuck at v0.7.27.releasewould repeat it, and the mirror (862 MB) keeps growing toward GitHub's 1 GB guidance.Approach
Port moq-dev/moq#8743's publisher from
main, file for file where possible so the next cut merges cleanly:release-go-ffi.yml: thepublishjob (now in thepublishEnvironment, which already allowsmoq-ffi-v*tags and holds the R2 key) reads moq.dev's go-import tag withjust go ffi-originand runsjust go publish-ffi(go.moq.dev) formod, orjust go publish-ffi-mirrorforgit. The dry-run job builds the GOPROXY files.release-go.yml: the push gate asks the same origin whether the pinned ffi version is published, so a version missing from go.moq.dev defers to the FFI release chain instead of failing.Copied from
main:sh/go/publish-ffi.sh,publish-ffi-mirror.sh,ffi-origin.sh,sh/go/modzip/,infra/go/{r2,upload,verify}.sh(only what the publisher calls; the Worker and backfill deploy frommain), andpackage-ffi.sh's README wording.Hand-ported: the three
go/justfilerecipes, the go.moq.dev paragraphs ofgo/ffi/README.md, and thesh/go/modzip/**path inrelease-gate.yml's Go FFI filter.Review fix, also on
mainin moq-dev/moq#9843:publish-ffi.shcounts a version as uploaded once its.zipis in the bucket, not its.info, and a rerun uploads only whichever of.modand.infothe bucket lacks (a backfilled version's.infocarries the mirror commit's time). A rerun that rebuilds the native libs makes a byte-different zip, which the immutable upload would refuse forever.doc/lib/go/index.mdtakesmain's line on wheremoq.dev/moq-fficomes from.The copied workflows also take
main's newer action pins (dependabot bumps of the same majors) and itscache: falseonsetup-go.v0.4.28 itself still needs publishing to go.moq.dev once; that is a one-time step with an R2 key, tracked in moq-dev/moq#9843's quest.
Impact
None. Release CI only; no public API or wire change. The next
moq-ffirelease publishes to go.moq.dev instead of the git mirror.Caused by
main, while releases run fromrelease(found by person: the quest's start session; no incident id)Decisions
Review: the wrapper push gate probes the ffi version's
.info(uploaded last) rather than its.mod, changed onmaintoo in moq-dev/moq#9843 so the two stay identical. Kept as before: the FFI completion run builds the tag's SHA, so a wrapper commit pushed during an upload waits for the next push, as it did before this PR. Refuted thepublishEnvironment question: its policy listsmoq-ffi-v*and it holdsAPP_CLIENT_ID,APP_PRIVATE_KEY, and the R2 key.Port
main's files verbatim, mirror path andffi-originincluded. Rejected: a go.moq.dev-only publisher onrelease(smaller, but drops the rollback path of pointing moq.dev back at the mirror, and conflicts withmainat the next cut).Backport now rather than wait for the
0.22.0cut, which waits on m0 to m2 work; until then every moq-ffi patch would miss go.moq.dev.Leave v0.4.28's one-time upload to the maintainer. Rejected: an agent minting an R2 token from the Cloudflare admin token in Bitwarden to write the production bucket unattended; the upload pins the version's hash in sum.golang.org for good.
Alternatives
Validation
publish-ffi.sh --dry-run, fed a tarball of the mirror'sv0.4.27tree, printsh1:PCXoyW1QTUN2XnM4pkAIBGpOAFjhm1OmCyPfPHszKPc=, the hash sum.golang.org pinned for v0.4.27, and the same run on the mirror'sv0.4.28tree buildsv0.4.28.{info,mod,zip}(h1:es2x8Bh+q8lcP7qr9C14xeO8DOFcfs9IxXql3fOQznA=).sh/shell.sh check,just --fmt --checkon both justfiles,just gh check(actionlint, alert coverage), andsh/markdown.sh checkpass. zizmor on the two workflows: 2 high findings onrelease(cache-poisoning, dangerous-triggers) drop to 0; the 8 lowself-repositorynotes are the same asmain's.just go check, which this nested worktree cannot build (its parent checkout's.cargo/config.tomlfails to merge); this diff changes no Go source it builds. The Release gate's Go FFI dry-run runs on this PR.GO_BUCKETholding only a stand-inv0.4.28.zip: it keeps that zip, uploads this build's.modand.info, and lists v0.4.28 (the closingverify --proxy directthen 404s, since the real go.moq.dev holds nothing).moq-ffi-v*tag'sPublish to go.moq.devstep.Models
(Written by Claude Opus 5.5)
Review
Rewritten by
quest reviewafter each round.Head: 8967409
Base: origin/release at e3064ac
Risk: high,
it changes .github/workflows/release-gate.yml, which is always high, as are 2 more of its paths: workflows run with the repository's secretsClassified: high by the always-high paths
Risk file: none
Reviewer: Codex, gpt-6.2-sol, medium effort
Session:
01a2214d-3e58-77b1-b888-cd6b7582e91c, round 3Score: 10/10,
The proxy gate now waits for the completed FFI upload, and the remaining deferral behavior matches the merge base.Rounds: 3; first round 2 (medium 2); findings 2 (medium 2): fixed 2, refuted 0, open 0
Findings: none
The last round's findings, at 57d6aa5:
.github/workflows/release-go.yml:180:Preserve wrapper pushes made during an FFI upload;`.github/workflows/release-go.yml:181` now probes `.info`, which `infra/go/upload.sh:36`–`37` uploads after `.mod` and `.zip`, and the completion run's tag-SHA checkout at `.github/workflows/release-go.yml:106` already existed at the merge base.Reviewer: Claude Code, claude-opus-5-5, medium effort, second
Session:
62d36cea-8a1b-4340-a6fb-1e328668205d, round 3Score: 9/10,
The only change since the last round points the gate's go.moq.dev probe at the `.info` file, which upload.sh uploads last, so the gate now waits for a complete version and nothing holds the head.Rounds: 3; first round 2 (medium 2); findings 2 (medium 2): fixed 1, refuted 1, open 0
Findings: none