Update Jerboa discovery data
ober
16d9b38de7ea4d1c90c12087d94775958450d207
--- a/data/anti-patterns.sexp +++ b/data/anti-patterns.sexp @@ -4552,4 +4552,24 @@ ("tools" "scripts/test-wasm-gc.sh" "node support/wasm-gc/run-export.mjs" - "rg"))) + "rg")) + (("advice" + . + "Keep verifier inputs immutable, inspect the approved read-only dependency or use source-backed API tools, change only the declared implementation files, then run the unchanged verifier against the real dependency.") + ("avoid" + . + "Do not modify Makefile, acceptance tests, environment selection, or add a local module with the same import name as a required external dependency merely to make verification pass.") + ("id" . "verifier-self-shadowing-with-local-stubs") + ("kinds" "all" "script" "test") + ("pattern" + . + "JERBOA_QT_DIR.*CURDIR|lib/jerboa-qt/qt\\.sls|Makefile.*fallback.*stub") + ("severity" . "high") + ("tags" "verifier" "dependency" "stub" "makefile" + "benchmark") + ("title" + . + "Do not shadow real dependencies or alter the verifier environment") + ("tools" "write-scope" "JCODE_READ_ROOTS" + "jerboa_module_exports" "jerboa_function_signature" "verify" + "git_diff"))) --- a/data/error-fixes.sexp +++ b/data/error-fixes.sexp @@ -2778,4 +2778,18 @@ ("pattern" . "not enough arguments on the stack for struct\\.new \\(need [0-9]+, got [0-9]+\\)|ref\\.test.*semantic.*struct") - ("type" . "wasm-gc-validation"))) + ("type" . "wasm-gc-validation")) + (("code_example" + . + "Wrong: (with-qt-app (lambda (app) (run app)))\nRight: (with-qt-app app (run app))") + ("explanation" + . + "with-qt-app is syntax-rules that expands (_ app body ...) into a let binding for app plus dynamic-wind cleanup. Passing (lambda (app) ...) places a lambda form where the macro expects an identifier, producing the invalid bound variable error.") + ("fix" + . + "Call the macro as (with-qt-app app body ...). The first operand is a binding identifier, not a lambda or callback. Put window creation, event pumping, screenshot logic, and qt-app-exec! directly in the macro body.") + ("id" . "with-qt-app-lambda-invalid-bound-variable") + ("pattern" + . + "invalid bound variable \\(lambda \\(app\\).*with-qt-app|invalid bound variable.*in \\(let.*dynamic-wind") + ("type" . "macro-usage"))) --- a/data/features.sexp +++ b/data/features.sexp @@ -3186,7 +3186,7 @@ ("use_case" . "jcode verified runs that use request_advisor output to set or reinforce allowed edit scope before starting a task.") - ("votes" . 0)) + ("votes" . 1)) (("closed_reason" . "module_exports accepts and resolves extra_libdirs and project_path.") @@ -3214,7 +3214,7 @@ ("use_case" . "Exploring exports from vendored Jerboa libraries before writing code, as required by the recommended workflow.") - ("votes" . 0)) + ("votes" . 1)) (("description" . "Add a Jerboa tool that reads a repository's dist/release-evidence tree and emits a normalized readiness summary: gate pass/fail, soak/load statuses, reproducibility sub-statuses, binary smoke status, RustSec/advisory status, and stale/missing evidence warnings.") @@ -3662,17 +3662,114 @@ . "Embed the multicall bundle as a binary object or compressed resource instead of generating a roughly 196 MB C initializer. Compiling the generated bundle_tar.h currently drives Clang above 14 GB RSS, exhausts swap on modest builders, and spends about ten minutes recompiling unchanged payload bytes.") ("estimated_token_reduction" - . - "~1,000 tokens and 10 minutes of build monitoring per multicall rebuild") + . + "~1,000 tokens and 10 minutes of build monitoring per multicall rebuild") ("example_scenario" - . - "A FreeBSD multicall build compiles a 196 MB bundle_tar.h three times while debugging a small platform C fix; each final C compile consumes roughly 14 GB RSS and can fill 9 GB of swap.") + . + "A FreeBSD multicall build compiles a 196 MB bundle_tar.h three times while debugging a small platform C fix; each final C compile consumes roughly 14 GB RSS and can fill 9 GB of swap.") ("id" . "multicall-bundle-binary-object-embedding") - ("impact" . "high") - ("status" . "proposed") + ("impact" . "high") ("status" . "proposed") ("tags" "multicall" "bundle" "embedding" "memory" "build") - ("title" . "Embed multicall bundle without a giant C initializer") + ("title" + . + "Embed multicall bundle without a giant C initializer") ("use_case" + . + "Native multicall builds on FreeBSD, Linux, and macOS, especially low-memory release builders and iterative platform fixes.") + ("votes" . 0)) + (("description" . - "Native multicall builds on FreeBSD, Linux, and macOS, especially low-memory release builders and iterative platform fixes.") + "When jerboa_function_signature resolves a syntax binding or macro, return kind=macro, its defining source file and line, and a complete canonical call form. Do not report procedure arity unknown with a truncated first line. Support project_path and extra_libdirs for the source lookup.") + ("estimated_token_reduction" + . + "~10000 tokens and 3-8 failed verifier turns per unfamiliar macro") + ("example_scenario" + . + "A model calls with-qt-app using a lambda because the tool reports unknown arity and only the fragment (with-qt-app app. The desired result is (with-qt-app app body ...) with qt.sls source location.") + ("id" . "jmcp-macro-signature-source-usage") + ("impact" . "high") ("status" . "proposed") + ("tags" "jmcp" "macro" "signature" "source" "usage") + ("title" + . + "Return source-backed macro usage from function signature queries") + ("use_case" + . + "Agents need the invocation shape for macros such as with-qt-app that cannot be described by procedure-arity-mask.") + ("votes" . 0)) + (("description" + . + "Allow compact verified workflows to request a single task-ranked, bounded dependency context bundle containing exact imports, symbol kinds, arities, macro call forms, source locations, and one current verified example. Include jerboa_cookbook_task_bundle or a smaller source-backed equivalent in the compact MCP allowlist and cap output by relevance rather than raw truncation.") + ("estimated_token_reduction" + . + "~20000-100000 tokens and 5-20 discovery or repair calls per task") + ("example_scenario" + . + "Qt Tetris needs with-qt-app, paint callbacks, timers, key handlers, event pumping, and screenshots. The current howto response is large, partly stale, and misses the macro recipe after truncation.") + ("id" . "jcode-verified-dependency-context-bundle") + ("impact" . "high") ("status" . "proposed") + ("tags" "jcode" "verified" "jmcp" "dependencies" "context") + ("title" + . + "Expose one concise dependency API bundle in verified mode") + ("use_case" + . + "Greenfield code depends on a niche out-of-tree library whose API is not reliably known by the model.") + ("votes" . 0)) + (("description" + . + "Replace the unconditional removal of external MCP tools for local verified models with an opt-in targeted policy. Permit one compact task bundle before the first edit and exact signature, module, syntax, or failure-advisor queries after named verifier errors. Keep strict call and output budgets.") + ("estimated_token_reduction" + . + "~5000-50000 tokens and 2-10 failed verifier turns per niche-library task") + ("example_scenario" + . + "Local DS4 was given no JMCP surface on a jerboa-qt task, guessed nonexistent constructors, and could not recover after the verifier named an API error.") + ("id" . "jcode-local-targeted-mcp-in-verified-mode") + ("impact" . "high") ("status" . "proposed") + ("tags" "jcode" "local-model" "verified" "mcp" "budget") + ("title" + . + "Permit bounded targeted MCP for local verified models") + ("use_case" + . + "Local models need exact facts for niche Jerboa libraries but should not enter open-ended discovery loops.") + ("votes" . 0)) + (("description" + . + "Normalize tool outcomes into signatures and detect repeated denied reads, missing paths, and unchanged verifier failures across interleaved calls. After a small threshold, hide the failing inspection surface, preserve the exact diagnostic, and require a targeted edit, approved read-root action, or terminal failure instead of spending more model turns.") + ("estimated_token_reduction" + . + "~10000-500000 tokens and 5-30 model turns per stuck run") + ("example_scenario" + . + "Qt benchmark trajectories spent 15-35 tool outcomes on denied jerboa-qt and cache paths before timing out or creating fake dependency stubs.") + ("id" . "jcode-no-progress-path-denial-breaker") + ("impact" . "high") ("status" . "proposed") + ("tags" "jcode" "no-progress" "read-roots" "verifier" + "recovery") + ("title" + . + "Break repeated path-denial and unchanged-verifier loops") + ("use_case" + . + "Verified runs repeatedly request the same inaccessible dependency path or rerun the same failing verifier without changing the implicated code.") + ("votes" . 0)) + (("description" + . + "Add verified-run options for immutable paths and allowed changed paths, enforce them in every write tool, and recheck the final git diff after the verifier passes. A run must not report verified when it modified acceptance tests, build files, or inserted local dependency shadows outside the declared task surface.") + ("estimated_token_reduction" + . + "prevents false passes; typically saves one full rerun and manual audit per invalid result") + ("example_scenario" + . + "A model modified Makefile and added lib/jerboa-qt/qt.sls so make test loaded a stub. Jcode reported passed although the real dependency path still failed.") + ("id" . "jcode-verified-immutable-diff-policy") + ("impact" . "high") ("status" . "proposed") + ("tags" "jcode" "verified" "write-scope" "diff" "integrity") + ("title" + . + "Add immutable paths and post-verify diff policy") + ("use_case" + . + "Acceptance commands can be made green by changing their environment rather than implementing the requested source file.") ("votes" . 0)))