Repository navigation
Description
Finding
PR #1453 added the wasm-opt -Os + wasm-tools strip shrink pipeline to all seven Roc example build.sh scripts, and its body states the pipeline ends with "wasm-tools validate" — but two of the seven scripts, roc-chat and roc-grid, have no validate step at all (they never had one, and the PR did not add one). Their post-strip modules are echoed as "Built" without ever being validated by the script that produces the checked-in artifact.
Filed by pr-diff-review-b (lane B) from reviewing PR #1453. Parent: #555 (closed by that PR).
Evidence
- PR: id(roc): F11.15 smaller example modules — wasm-opt -Os + strip, all 7 rebuilt ≤400 KB (#555) #1453 — MERGED, commit
9c5ba735. PR body: "After the build:wasm-opt -Os --all-features, thenwasm-tools strip…, thenwasm-tools validate." - Verified on current main
3b559045:pkgs/id/examples/roc-chat/build.sh:40-42—$WASM_TOOLS strip roc-chat.wasm …,mv … roc-chat.wasm,echo "Built roc-chat.wasm …"— no validate line anywhere in the filepkgs/id/examples/roc-grid/build.sh:40-42— same shape, no validate linepkgs/id/examples/lounge/build.sh:42—$WASM_TOOLS validate lounge.wasm(present); the same step is present inroc-counter(after strip, before its import check comment),roc-screen,territory, andtic-tac-toe— five of seven
Why it matters
The checked-in .wasm files are artifacts other work trusts (e.g. the F11.9 bytes-per-frame baseline in #542 instantiates them). For five examples the producing script itself proves the optimized+stripped module is still valid before it can be committed; for roc-chat and roc-grid a wasm-opt/strip regression would be committed silently at build time and only surface later, in a different context, if a test happens to instantiate that example. The scripts also diverge from the contract #555's PR states, so the next reader cannot tell the omission is accidental.
Acceptance criteria
-
pkgs/id/examples/roc-chat/build.shandpkgs/id/examples/roc-grid/build.shrun$WASM_TOOLS validate <module>after the strip step and before the "Built" echo, matching the other five example scripts (or the deviation is explicitly documented in both scripts and in id(roc): F11.15 smaller example modules (wasm-opt -Os, strip, <=400 KB) #555's follow-up notes) - All seven example
build.shscripts have the same build → optimize → strip → validate sequence
Activity
developing-today commentedon Oct 28, 2026
CODE-592
dezren39 commentedon Oct 28, 2026
🤖 Agent note · filed
wasm-tools validate, but on current main (3b55904) pkgs/id/examples/roc-chat/build.sh:40-42 and roc-grid/build.sh:40-42 go strip → mv → "Built" with no validate step, while the other five (e.g. lounge/build.sh:42) validate after strip. Enqueued as a triage packet to repo-health-code-pilot.18 remaining items
dezren39 commentedon Nov 3, 2026
agent-note:v1 — task 6498 resumed (queue repo-health-code-pilot, worker repo-worker-code, lane c8b9355e-319a-4640-8096-7ad19480d151, origin openchamber-scheduled-lane) at 2026-11-03T00:11Z: revalidated issue OPEN, PR #4652 OPEN, 2-line diff matches scope (validate step in roc-chat + roc-grid build.sh only). CI still pending on the same basic-guard run 41543928691 (queued ~40min, not progressing). Re-parking for CI per 5-minute rule; merge when green.
dezren39 commentedon Nov 3, 2026
Resumed + merge-ready (repo-worker-code, lane c8b9355e): revalidated issue OPEN, PR #4652 OPEN, diff is the exact 2-line scope (validate step in roc-chat + roc-grid build.sh). CI green: basic OpenCode metered-provider guard PASS, CodeRabbit neutral/skipping. shfmt clean; shellcheck warnings on the files are pre-existing style classes (sibling lounge/build.sh has 21 of the same), new line 42 is warning-free.
origin/mainhas not touched either script since the branch point — no conflict risk. Merging now.dezren39 commentedon Nov 3, 2026
Done (repo-worker-code, lane c8b9355e): PR #4652 MERGED (d368b9f, 2026-11-03T00:42:32Z); issue auto-closed. Fix:
validatestep added to roc-chat + roc-grid build.sh, matching the four sibling scripts. CI: basic guard PASS; shfmt clean; shellcheck new-line clean (remaining warnings pre-existing). No .wasm artifact changes.