Record Jerboa verification anti-patterns
ober
1e37c1fb60ecd44ef5f9e17ba7efd610b61f35ac
--- a/data/anti-patterns.sexp +++ b/data/anti-patterns.sexp @@ -4404,38 +4404,46 @@ . "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.") - ("id" . "agent-substitutes-workflow-for-explicit-instruction") + ("id" + . + "agent-substitutes-workflow-for-explicit-instruction") ("kinds" "all") ("pattern" - . + . "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") ("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.") - ("id" . "repeat-heavy-build-without-artifact-freshness-check") + ("id" + . + "repeat-heavy-build-without-artifact-freshness-check") ("kinds" "test" "script") ("pattern" - . + . "(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")) + ("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.") @@ -4457,4 +4465,48 @@ "WebAssembly.validate" "node support/wasm-gc/validate.mjs" "jerboa_run_tests" - "wasm-tools validate"))) + "wasm-tools validate")) + (("advice" + . + "First confirm whether the flagged token is a real binding with `rg -n '\\\\bTOKEN\\\\b'` or relevant symbol tooling. Treat `No compile issues` as the compile result, fix only real source matches, and rerun `jerboa_verify` after any edit.") + ("avoid" + . + "Do not rewrite working code solely because `jerboa_verify` reports a divergence pre-scan item when the same output also says `No compile issues`. The pre-scan can match substrings or compatibility words that are not actual invalid identifiers.") + ("id" . "treat-jerboa-verify-prescan-as-advisory") + ("kinds" "debug-error" "test" "module") + ("pattern" + . + "Divergence pre-scan:.*(len|count|compat|error)") + ("severity" . "low") + ("tags" "jerboa_verify" "pre-scan" "false-positive" + "diagnostics" "compile") + ("title" + . + "Do Not Treat Divergence Pre-scan Matches As Compile Failures") + ("tools" + "jerboa_verify" + "rg" + "jerboa_document_symbols" + "jerboa_function_signature")) + (("advice" + . + "Before writing HTTP client code, call `jerboa_module_exports` and `jerboa_function_signature` for the actual module in the current checkout. For `(std net request)`, use patterns like `(http-get url headers #f)` and `(http-post url headers body)`, then read response data with `request-status` and `request-text`.") + ("avoid" + . + "Do not copy older cookbook examples for `(std net http)` or `http-fetch-*` into code that imports `(std net request)`. The local module exports `http-get`, `http-post`, `request-status`, and `request-text`, with headers/body passed directly to the request call.") + ("id" . "stale-http-cookbook-vs-std-net-request") + ("kinds" "module" "script" "docs") + ("pattern" + . + "http-fetch-get|http-fetch-post|\\(std net http\\).*when module exports show \\(std net request\\)") + ("severity" . "medium") + ("tags" "http" "std-net-request" "cookbook" "arity" + "headers") + ("title" + . + "Do Not Use Stale std net http Recipes For std net request") + ("tools" + "jerboa_howto" + "jerboa_module_exports" + "jerboa_function_signature" + "jerboa_verify")))