Generate new games against SDK v0.0.2 and smoke-test released modules - #26
Conversation
Review 1Findings
Residual risks / review methodReviewed only the pinned one-commit diff Verdict: NEEDS ATTENTION |
Review 1 replyFixed in The boundary was deliberately broken by pointing the consumer at another empty cache; |
Review 2 replyNo findings require changes. The cold-cache network dependency is accepted and documented: preload explicitly reaches Disposition: Review 2 is approving. |
Review 2No findings. Reviewed exact pinned range Residual risk: the preload intentionally requires access to Verdict: APPROVE |
Scaffolds pinned sdk v0.0.1 while v0.0.2 is the current release. Pin the template to v0.0.2 via a scaffoldSDK constant and add a consumer gate: a generated project in a temp dir outside the repository resolves only released modules (GOPROXY=off against a go.sum-verified cache preload, no replace), builds with GOWORK=off, and packages/ABI-validates as WASI. Ref aviorstudio/termcade-be#47
The preload inherited the shared GOMODCACHE and default GOPROXY, so the offline consumer phase could silently resolve from ambient cache state. The test now owns a fresh GOMODCACHE; the preload runs against it with explicit proxy and checksum policy (verified against the repo's go.sum), and the test asserts the released SDK zip landed in that isolated cache before the consumer phase runs GOPROXY=off against it. -modcacherw keeps the test-owned cache writable so t.TempDir can remove it. Ref aviorstudio/termcade-be#47
ee6b86e to
5da2fa9
Compare
Closes aviorstudio/termcade-be#47
What
termcade dev newscaffolds pinned SDK v0.0.1 while v0.0.2 is the current release. Thego.modtemplate now requiresgithub.com/aviorstudio/termcade/sdk v0.0.2via ascaffoldSDKconstant.scaffold_test.go: a generated project in a temp dir outside this repository mustTestScaffoldRequiresReleasedSDK),GOMODCACHEwith explicit proxy/checksum policy (GOPROXY=https://proxy.golang.org,direct,GOSUMDB=sum.golang.org,GOWORK=off, verified against this repo'sgo.sum), the test asserts the released SDK zip actually landed in that isolated cache, then the consumer phase runs withGOPROXY=offagainst it;go list -masserts no replace is in effect and the SDK resolves to exactly the pinned release,dev build(which runs the sameplugin.Runtime.Compileexport check an install enforces).Failure proofs (gates can fail)
Unavailable SDK version (
scaffoldSDK = "v0.0.99"):Preload/consumer boundary (consumer pointed at a different, empty cache than the preload filled):
Both restored; all tests pass.
Verification (local, Go 1.26.5)
gofmt -l .— cleango vet ./... && go vet ./sdk/...— cleango test -race -count=1 -timeout 10m ./... ./sdk/...— all packages okGOWORK=off go build ./... && GOWORK=off go vet ./...— clean (released-consumer gate)Stack created with GitHub Stacks CLI • Give Feedback 💬