Skip to content

Switch documented/CI build profile to -gc=conservative#37

Merged
BCook98 merged 2 commits into
mainfrom
conservative-gc
Jun 11, 2026
Merged

Switch documented/CI build profile to -gc=conservative#37
BCook98 merged 2 commits into
mainfrom
conservative-gc

Conversation

@BCook98

@BCook98 BCook98 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Why

Production OOM evidence (2026-06-11): 4 rooms trapped against the host's 32 MiB linear-memory cap at ~28–56 min of room age (~52 min of play in the worst case) — -gc=leaking never frees, so every allocation is permanent and long-lived rooms inevitably hit the cap and trap.

The spike (TinyGo 0.41.1, exact production configuration)

  • 200k-callback soak under -gc=conservative: dead flat at 1.88 MiB. A leaking contrast build trapped at callback 70,250 with the exact production stack.
  • Full platform gameabi/conformance suite green.
  • A real game (bytebreaker) passed shellcade-kit check, including hibernation determinism PASS.
  • Callback latency cost ~2%; wasm binary +31%.

What changed

  • CI (.github/workflows/ci.yml): both author-journey tinygo builds (-opt=1 PR gate, -opt=2 nightly/tag release job) now use -gc=conservative.
  • TinyGo pin bumped 0.41.00.41.1 in both jobs: the spike verified 0.41.1 specifically; 0.41.0 was never re-tested against the old fault, so the pin moves with the profile.
  • Docs (README.md, GUIDE.md, ABI.md §6, CLAUDE.md): build commands flipped, and the recorded rationale corrected — the "TinyGo 0.41 conservative GC faults in this reactor configuration" finding does not reproduce on 0.41.1. It was also already contradicted in-tree: the platform repo ships a conservative-built benchmark guest (loadspike-cons.wasm, "the candidate profile for resident rooms").
  • Code comments (internal/game/codec.go, internal/game/run.go, one test comment): the roster-cache rationale updated — the leaking-build leak math is retained as historical contrast.

What did NOT change

The kit's allocation-free steady-state design (roster cache, reused frame/encode buffers) remains load-bearing and the guidance is retained everywhere: under conservative GC, steady-state allocations are GC pressure — pauses inside the callback deadline — so the discipline matters as much as ever.

No Go API change, docs+CI only — no changeset (CI does not require one for this).

Companion

Companion games-repo PR: shellcade/games#48 (shellcade/games#48).

🤖 Generated with Claude Code

BCook98 and others added 2 commits June 11, 2026 18:55
…d long rooms)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The kit-pin job fails when the pinned binary release falls behind the
newest published one; v2.9.0 shipped 2026-06-10, so any PR now trips
the gate. SHA256 is the linux/amd64 entry from v2.9.0's checksums.txt.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@BCook98
BCook98 merged commit b2dead0 into main Jun 11, 2026
7 checks passed
@BCook98
BCook98 deleted the conservative-gc branch June 11, 2026 09:25
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