Skip to content

Serve moq.dev/moq-ffi from the go.moq.dev module proxy - #281

Merged
kixelated merged 1 commit into
mainfrom
go-proxy-cutover
Nov 22, 2026
Merged

kixelated merged 1 commit into
mainfrom
go-proxy-cutover

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Cuts moq.dev/moq-ffi over to the Go module proxy, the follow-up planned in moq-dev/moq#8743.

Problem

Every moq-ffi release commits about 61 MiB of staticlibs to the moq-dev/moq-go-ffi git mirror, which will soon pass GitHub's 1 GB guidance. moq-dev/moq#8743 added go.moq.dev, a GOPROXY-protocol proxy backed by R2, to replace it.

Approach

worker/vanity.ts: /moq-ffi now serves

<meta name="go-import" content="moq.dev/moq-ffi mod https://go.moq.dev">

and no go-source tag, because no repo holds the module. A Module is now either { vcs: "git", repo } or { vcs: "mod", proxy }. /moq is unchanged.

This is the patch from #8743's Follow-ups. The only change is restructuring the Module union so it passes the current biome formatter.

Impact

  • go get moq.dev/moq-ffi (through proxy.golang.org or GOPROXY=direct) downloads from go.moq.dev instead of cloning the mirror. Module path and versions stay the same.
  • After the deploy, moq-dev/moq's release job (sh/go/ffi-origin.sh) reads mod from this page and publishes new versions to go.moq.dev instead of the mirror.
  • Takes effect only on deploy (just deploy live). Merging doesn't deploy.

Validation

  • Steps 1 to 3 of "Bootstrapping the Go module proxy" in moq-dev/moq's infra/README.md are done: https://go.moq.dev/moq.dev/moq-ffi/@v/list lists all 46 versions, verified against sum.golang.org.
  • just check (biome, tsc, quest check) passes. bun test passes 58/58, including the new test that only a module in a repo gets a go-source tag.

Remaining after deploy: step 5 of the runbook (verify.sh --proxy direct against the live moq.dev).

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

The /moq-ffi vanity page now answers with a mod go-import tag pointing
at https://go.moq.dev and drops its go-source tag, since no repo holds
the module. /moq is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Approach: sound. A vcs: "git" | "mod" union on Module is the smallest change that lets /moq-ffi point at the proxy while /moq stays on git.

Reviewed changes

Reviewed the full diff of both files.

  • Module union in worker/vanity.ts: a module is now { vcs: "git", repo } or { vcs: "mod", proxy }.
  • page(): emits go-import as <path> <vcs> <origin>, which is the prefix mod url form the go command expects. It emits go-source only for git modules.
  • MODULES: /moq-ffi now points at https://go.moq.dev, and /moq is unchanged.
  • Tests: the go-import assertion is updated, and there is a new test that only a module in a repo gets go-source.

Pullfrog  | View workflow run | Using claude-sonnet-5-5 | 𝕏

@coderabbitai

coderabbitai Bot commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The module configuration now supports Git-backed and proxy-served modules. /moq remains Git-backed, while /moq-ffi uses the mod protocol and https://go.moq.dev. The page uses each module’s configured source for its import metadata and origin link. It emits go-source metadata only for Git modules. Tests check the updated tags and distinguish the two module paths.

Merge Risk: Minimal · up to 34080

This change points Go module lookups for /moq-ffi at the module proxy and removes the source link that no longer applies. No defect introduced by this change was found. It takes effect only after deployment, and the post-deploy check of the live page is still pending.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: /moq-ffi is now served from the go.moq.dev Go module proxy. It is specific and matches the vanity.ts and vanity.test.ts changes, which switch /moq-ffi from Git mode to…
Description check Passed The description states the purpose (moving moq.dev/moq-ffi to the Go module proxy to stop adding about 61 MiB of staticlibs per release to the git mirror). It describes the Module union change, the re…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: /moq-ffi is now served from the go.moq.dev Go module proxy. It is specific and matches the vanity.ts and vanity.test.ts changes, which switch /moq-ffi from Git mode to the mod protocol with https://go.moq.dev.

Full details: Description check

Explanation

The description states the purpose (moving moq.dev/moq-ffi to the Go module proxy to stop adding about 61 MiB of staticlibs per release to the git mirror). It describes the Module union change, the removed go-source tag, the unchanged /moq route, the deploy-time effect, and the test and validation results. This matches the changeset.

Finishing Touches

Simplify code

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c748a7fd-4107-4a15-b870-ef465cfd958f
Commits

Reviewing files that changed from the base of the PR and between 27c2792 and 3408057.

Files selected for processing: 2

  • worker/vanity.test.ts
  • worker/vanity.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@kixelated

Copy link
Copy Markdown
Collaborator Author

Maintainer decision (2026-11-21): merge, then deploy the main Worker only (not moq.pub or moq.watch), then run step 5 of moq-dev/moq's Go proxy runbook.

(Written by Claude Opus 5.5)

@kixelated

Copy link
Copy Markdown
Collaborator Author

Answers the maintainer decision: landing as decided; the deploy follows the merge.

(Written by Claude Opus 5.5)

@kixelated
kixelated merged commit 0c2fb9c into main Nov 22, 2026
4 checks passed
@kixelated
kixelated deleted the go-proxy-cutover branch November 22, 2026 00:22
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