Repository navigation
Conversation
Build the module zip the proxy serves for the current tree with golang.org/x/mod/zip, assert no website or design file is in it, and fail when it grows past the byte and file counts in benchmarks/module-zip-budget.json, so a tree that loses its nested go.mod or the module outgrowing a download fails the repository checks. Refs #1560.
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.
Summary
Issue #1560 asked for two things: retract the abandoned
github.com/nsgo-dev/game/packages/gamev0.1.0, and keep the website and design trees out of the root module zip with a test that fails when the zip outgrows its budget. The retraction releasepackages/game/v0.1.1(a deprecated module that carriesretract v0.1.0) and the nestedgo.modfiles forwebsiteanddesign(#2397) already landed, so this change adds the remaining acceptance item:internal/repochecknow builds the module zipgolang.org/x/mod/zipproduces for the current tree, asserts that nowebsite/ordesign/file is in it, and compares its byte size and file count againstbenchmarks/module-zip-budget.json. The baseline is about 28.4 MiB in 6,368 files and the budget adds about 5% headroom, the same margin the other budget files inbenchmarks/use.go.modmovesgolang.org/x/modfrom the indirect to the direct requirements because the test now imports it.The retraction was verified against the proxy from this checkout:
go list -m -versions github.com/nsgo-dev/game/packages/gamelists only v0.1.1, andgo list -m -json -retracted github.com/nsgo-dev/game/packages/game@v0.1.0reports the retraction; the proxy's v0.1.1 go.mod starts with the// Deprecated:comment.The new note
.agents/notes/implemented/testing/2026-12-01-module-zip-budget.mdrecords the guard, and the two existing notes about the module zip link it: the layout note's rejected stub-module alternative was overtaken forwebsiteanddesignby the exclusions note. There is no changelog fragment because nothing user-visible changes; the 0.4.0 changelog already records keeping the website and design trees out of the module zip.Related issue
Fixes #1560
Verification
gofmt -l .produces no output.go tool nsgo checkpasses from the repository root (the default targets).go tool nsgo test ./internal/repocheckpasses from the repository root: 40 passed, 0 failed, 1 skipped (an environment-dependent guard unrelated to this change).bun run verify-notespasses (846 note(s) tree and relative links verified,846 note(s) verified).go tool nsgo test ./...was not run; the changed package was tested and the full suite is CI's job.go tool nsgo check -target macos,windows,linux,android,webwas not run separately; the defaultgo tool nsgo checkran.go tool nsgo check -target ios,ios_simulatorwas not run; the change touches no platform code.bun run buildwas not run; neitherdocs/norwebsite/changed.docs/en/ordocs/zh/update is needed; the change is repository tooling, not a documented page.Screenshots
None; the change has no visible surface. The editor checklist does not apply because no
pkg/editorfile changed.