Record Wasm GC validation anti-pattern
ober
4f789d3094e9cb3e0c4fcaeb5f2ab7151d366ea6
--- a/data/anti-patterns.sexp +++ b/data/anti-patterns.sexp @@ -4405,34 +4405,56 @@ "Treat the latest explicit user instruction as the controlling scope boundary. Stop immediately when told to stop, resume only the requested operation, and do not substitute extra canonical builds, policy audits, cleanup, or verification unless they are required for the requested outcome or the user asks for them.") ("avoid" . - "Do not override explicit stop, resume, deploy, commit, or push instructions with a broader workflow chosen by the agent.") + "Do not override explicit stop, resume, deploy, commit, or push instructions with a broader workflow chosen by the agent.") ("id" . "agent-substitutes-workflow-for-explicit-instruction") ("kinds" "all") ("pattern" . - "explicit (stop|resume|deploy|commit|push).*(extra|canonical|policy|verification)") + "explicit (stop|resume|deploy|commit|push).*(extra|canonical|policy|verification)") ("severity" . "high") ("tags" "scope" "instructions" "stop" "commit" "workflow" "user-intent") ("title" . - "Do Not Substitute a Broader Workflow for Explicit Instructions") + "Do Not Substitute a Broader Workflow for Explicit Instructions") ("tools" "task status" "process inspection" "git status")) (("advice" . "Before repeating a heavyweight build, identify exactly which inputs changed and which artifact must be regenerated. Reuse verified generated inputs only when they correspond to the final source, preserve a known-good installed artifact, and schedule the minimum rebuild needed around the user's deployment window.") ("avoid" . - "Do not repeatedly compile a huge embedded byte-array or native dependency bundle without first checking artifact freshness, source equivalence, and whether the user needs the host immediately.") + "Do not repeatedly compile a huge embedded byte-array or native dependency bundle without first checking artifact freshness, source equivalence, and whether the user needs the host immediately.") ("id" . "repeat-heavy-build-without-artifact-freshness-check") ("kinds" "test" "script") ("pattern" . - "(embedded|bundle|native).*(rebuild|relink|compile).*(repeat|again)") + "(embedded|bundle|native).*(rebuild|relink|compile).*(repeat|again)") ("severity" . "high") ("tags" "build" "bundle" "generated-artifacts" "deployment" "performance" "freshness") ("title" . - "Do Not Repeat Heavy Builds Without Checking Artifact Freshness") - ("tools" "git diff" "make -n" "process inspection" "artifact hashes"))) + "Do Not Repeat Heavy Builds Without Checking Artifact Freshness") + ("tools" "git diff" "make -n" "process inspection" "artifact hashes")) + (("advice" + . + "Keep exact-byte and interpreter tests, then generate a complete module and require WebAssembly.validate plus instantiation and behavioral execution in the repository-pinned Node runtime. Add browser-engine smoke tests before advertising browser support.") + ("avoid" + . + "Do not claim that Jerboa emits valid Wasm-GC modules because an opcode byte sequence matches expectations or the Scheme interpreter executes its internal object model. Those tests do not validate recursive GC type groups, reference types in signatures and locals, subtype constraints, section encoding, or current engine behavior.") + ("id" . "wasm-postmvp-byte-test-as-engine-validation") + ("kinds" "test" "debug-error" "docs") + ("pattern" + . + "(struct\\.new|array\\.new|ref\\.i31|call_ref|return_call_ref).*(produces bytecode|interpreter|opcode)") + ("severity" . "high") + ("tags" "wasm" "wasm-gc" "post-mvp" "codegen" "validation" + "node") + ("title" + . + "Do Not Treat Post-MVP Opcode Tests As Engine Validation") + ("tools" + "WebAssembly.validate" + "node support/wasm-gc/validate.mjs" + "jerboa_run_tests" + "wasm-tools validate")))