fix: scrub local paths from release artifacts
ober
5deb3201ce148f5eb4033c780ec01d37d394a434
--- a/data/api-signatures.sexp +++ b/data/api-signatures.sexp @@ -7416,7 +7416,7 @@ "zip-root" "zip-top?" "zip-up" "zipper" "zipper?") ("file" . "lib/std/zipper.ss") ("tier" . "stable"))) - ("source_root" . "/Users/user/mine/jerboa") + ("source_root" . "/Users/example/mine/jerboa") ("stats" ("modules" . 734) ("parse_errors" . 0) ("symbols" . 11001) ("tiers" ("compat" . 47) --- a/data/cookbooks.sexp +++ b/data/cookbooks.sexp @@ -4588,7 +4588,7 @@ "Compact jmcp tool discovery with search/catalog/describe")) (("code" . - ";; Project-aware verification: compile/check a file that imports sibling modules.\n;; The MCP tool derives libdirs from:\n;; 1. explicit extra_libdirs\n;; 2. Makefile LIBDIRS in project_path\n;; 3. project_path/lib\n;; 4. the source file's containing lib root\n\n;; Example MCP args for compile_check:\n;; {\"file_path\":\"src/app/main.ss\",\"project_path\":\"/path/to/project\"}\n\n;; Example with explicit libdirs:\n;; {\"file_path\":\"src/app/main.ss\",\n;; \"extra_libdirs\":[\"src\",\"/Users/user/mine/jerboa/lib\"]}\n\n;; Bundle the normal pre-commit sequence for one changed file:\n;; {\"name\":\"jerboa_verify_changes\",\n;; \"arguments\":{\"file_path\":\"src/app/main.ss\",\n;; \"project_path\":\"/path/to/project\",\n;; \"run_tests\":true}}") ("id" . "mcp-project-libdirs-verify-changes") ("imports") + ";; Project-aware verification: compile/check a file that imports sibling modules.\n;; The MCP tool derives libdirs from:\n;; 1. explicit extra_libdirs\n;; 2. Makefile LIBDIRS in project_path\n;; 3. project_path/lib\n;; 4. the source file's containing lib root\n\n;; Example MCP args for compile_check:\n;; {\"file_path\":\"src/app/main.ss\",\"project_path\":\"/path/to/project\"}\n\n;; Example with explicit libdirs:\n;; {\"file_path\":\"src/app/main.ss\",\n;; \"extra_libdirs\":[\"src\",\"/Users/example/mine/jerboa/lib\"]}\n\n;; Bundle the normal pre-commit sequence for one changed file:\n;; {\"name\":\"jerboa_verify_changes\",\n;; \"arguments\":{\"file_path\":\"src/app/main.ss\",\n;; \"project_path\":\"/path/to/project\",\n;; \"run_tests\":true}}") ("id" . "mcp-project-libdirs-verify-changes") ("imports") ("notes" . "jerboa_compile_check, jerboa_verify, and jerboa_run_tests now accept project_path and/or extra_libdirs. jerboa_verify_changes composes compile_check, security_scan, and optional run_tests into one compact report, which reduces missed verification steps and avoids repeated library-resolution failures in multi-module projects.") --- a/data/features.sexp +++ b/data/features.sexp @@ -436,7 +436,7 @@ "~100 tokens per test run (eliminates the fallback round-trip; more importantly, restores filter/timeout capabilities that jerboa_make doesn't expose)") ("example_scenario" . - "Working on jerboa-db transport tests: calling jerboa_run_tests with file_path=\"tests/test-transport.ss\" immediately fails with \"library (jerboa-db core) not found\". Had to use jerboa_make with target=\"test-transport\" for every run, losing the ability to filter by test name or set per-test timeouts. If jerboa_run_tests accepted project_path=\"/home/jafourni/mine/jerboa-db\" it could read the Makefile's LIBDIRS variable and pass --libdirs \"lib:/home/jafourni/mine/jerboa/lib\" automatically.") + "Working on jerboa-db transport tests: calling jerboa_run_tests with file_path=\"tests/test-transport.ss\" immediately fails with \"library (jerboa-db core) not found\". Had to use jerboa_make with target=\"test-transport\" for every run, losing the ability to filter by test name or set per-test timeouts. If jerboa_run_tests accepted project_path=\"/home/example/mine/jerboa-db\" it could read the Makefile's LIBDIRS variable and pass --libdirs \"lib:/home/example/mine/jerboa/lib\" automatically.") ("id" . "run-tests-project-path-libdirs") ("impact" . "medium") ("implemented_in" . "mcp/server.ss") ("implemented_tool" . "jerboa_run_tests") @@ -513,7 +513,7 @@ "~500 tokens per file edit (eliminates the integration-test fallback round-trip when checking new code in a multi-module project)") ("example_scenario" . - "Porting jerbsearch as Jerboa .ss: each module (webapp.ss, search.ss, engines/duckduckgo.ss) imports sibling modules ((jerbsearch engine), (jerbsearch settings)). Calling jerboa_compile_check on any of them fails immediately with 'library (jerbsearch engine) not found'. The actual catchable errors (typo'd export names, wrong arity, missing identifier) only surface when running the integration test — a 30+ second cycle. If jerboa_compile_check accepted project_path=/Users/user/mine/jerboa-websearch (or extra_libdirs=[\"src\"]), it would have caught two arity errors and one missing-export error in this session before they hit the runtime path.") + "Porting jerbsearch as Jerboa .ss: each module (webapp.ss, search.ss, engines/duckduckgo.ss) imports sibling modules ((jerbsearch engine), (jerbsearch settings)). Calling jerboa_compile_check on any of them fails immediately with 'library (jerbsearch engine) not found'. The actual catchable errors (typo'd export names, wrong arity, missing identifier) only surface when running the integration test — a 30+ second cycle. If jerboa_compile_check accepted project_path=/Users/example/mine/jerboa-websearch (or extra_libdirs=[\"src\"]), it would have caught two arity errors and one missing-export error in this session before they hit the runtime path.") ("id" . "compile-check-project-libdirs") ("impact" . "high") ("implemented_in" . "mcp/server.ss") ("implemented_tool" . "jerboa_compile_check") @@ -591,7 +591,7 @@ "~400 tokens per Jerboa source edit, plus avoids a 20-30 second full-build fallback for simple syntax checks.") ("example_scenario" . - "Editing /Users/user/mine/jerboa-shell/glob.ss and running jerboa_verify reported `export form outside of a module or library (export #t)`, so the only useful verification was a full `make jsh-macos-full` build. A verifier mode that follows jerbuild source semantics would have caught syntax/compile errors without a full binary rebuild.") + "Editing /Users/example/mine/jerboa-shell/glob.ss and running jerboa_verify reported `export form outside of a module or library (export #t)`, so the only useful verification was a full `make jsh-macos-full` build. A verifier mode that follows jerbuild source semantics would have caught syntax/compile errors without a full binary rebuild.") ("id" . "verify-jerbuild-export-source-support") ("impact" . "medium") ("implemented_in" . "mcp/server.ss") ("implemented_tool" . "jerboa_verify") @@ -689,7 +689,7 @@ "~400 tokens per edit cycle by avoiding a failed verify call plus fallback build diagnosis.") ("example_scenario" . - "Editing /Users/user/mine/jerboa-dns/lib/jerboa-dns/server.sls and running jerboa_verify reports `library (jerboa-dns protocol) not found`, even though `make build` succeeds with Makefile LIBDIRS. The tool also emitted unrelated divergence warnings after failing to resolve imports.") + "Editing /Users/example/mine/jerboa-dns/lib/jerboa-dns/server.sls and running jerboa_verify reports `library (jerboa-dns protocol) not found`, even though `make build` succeeds with Makefile LIBDIRS. The tool also emitted unrelated divergence warnings after failing to resolve imports.") ("id" . "verify-project-libdirs") ("impact" . "high") ("implemented_in" . "mcp/server.ss") ("implemented_tool" . "jerboa_verify") @@ -976,7 +976,7 @@ "~2,000 tokens per failure by avoiding large crash dumps and fallback shell checks") ("example_scenario" . - "After adding .jerbuild parsing support, jerboa_verify on /Users/user/mine/jerboa/jerbuild.ss returned `Exception in string-ref: 112360 is not a valid index` and printed a huge escaped file body instead of a useful syntax/compile result.") + "After adding .jerbuild parsing support, jerboa_verify on /Users/example/mine/jerboa/jerbuild.ss returned `Exception in string-ref: 112360 is not a valid index` and printed a huge escaped file body instead of a useful syntax/compile result.") ("id" . "jerboa-verify-large-file-diagnostic") ("impact" . "medium") ("implemented_in" . "mcp/server.ss") ("implemented_tool" @@ -999,7 +999,7 @@ "~3000-6000 tokens per large workspace audit") ("example_scenario" . - "Audit /Users/user/mine/chez* and /Users/user/mine/jerboa* while excluding target, vendor, .venv, model artifacts, generated parser output, and bare git backup repos, then generate a fix plan for another agent.") + "Audit /Users/example/mine/chez* and /Users/example/mine/jerboa* while excluding target, vendor, .venv, model artifacts, generated parser output, and bare git backup repos, then generate a fix plan for another agent.") ("id" . "cross-repo-security-review") ("impact" . "high") ("status" . "proposed") ("tags" "security" "multi-repo" "audit" "report") @@ -1204,7 +1204,7 @@ "~500-1500 tokens per failing MCP call; avoids source spelunking to infer the exception.") ("example_scenario" . - "Calling jerboa_howto_add from /Users/user/mine/jerboa-shell failed with 'Tool error: failed for ~a: ~(~a~)' because repo-root defaulted to the current directory and the data directory was not present. The real exception was hidden.") + "Calling jerboa_howto_add from /Users/example/mine/jerboa-shell failed with 'Tool error: failed for ~a: ~(~a~)' because repo-root defaulted to the current directory and the data directory was not present. The real exception was hidden.") ("id" . "fix-mcp-tool-error-formatting") ("impact" . "medium") ("implemented_in" @@ -1392,7 +1392,7 @@ ("estimated_token_reduction" . "") ("example_scenario" . - "Run jerboa_verify with file_path=/Users/user/mine/jerboa-code/src/jcode/ui/tui-sidebar.ss and project_path=/Users/user/mine/jerboa-code. Expected: verify the module. Actual: export form outside of a module or library.") + "Run jerboa_verify with file_path=/Users/example/mine/jerboa-code/src/jcode/ui/tui-sidebar.ss and project_path=/Users/example/mine/jerboa-code. Expected: verify the module. Actual: export form outside of a module or library.") ("id" . "verify-ss-export-module-context") ("impact" . "medium") ("implemented_in" . "mcp/server.ss") ("implemented_tool" . "jerboa_verify") @@ -1841,7 +1841,7 @@ "~500-1500 tokens per long debug session by reducing process-noise checks; also reduces background resource leaks.") ("example_scenario" . - "After multiple monitored runs, ps showed many /Users/user/.local/bin/jmcp processes with PPID 1 plus newer active jmcp/jlsp children. They were not causing the prompt hang directly, but they make live diagnosis noisy and can waste resources.") + "After multiple monitored runs, ps showed many /Users/example/.local/bin/jmcp processes with PPID 1 plus newer active jmcp/jlsp children. They were not causing the prompt hang directly, but they make live diagnosis noisy and can waste resources.") ("id" . "jcode-reap-child-processes-on-exit") ("impact" . "medium") ("status" . "open") ("tags" "jcode" "process-cleanup" "mcp" "watchdog" @@ -2052,7 +2052,7 @@ "~800 tokens per debugging session by avoiding failed verifier retries and manual libdir discovery.") ("example_scenario" . - "Editing src/jcode/core/models.ss and running jerboa_verify with project_path=/Users/user/mine/jerboa-code reports library (jcode core log) not found, while make build succeeds with ./lib and vendor libdirs.") + "Editing src/jcode/core/models.ss and running jerboa_verify with project_path=/Users/example/mine/jerboa-code reports library (jcode core log) not found, while make build succeeds with ./lib and vendor libdirs.") ("id" . "verify-jerbuild-project-libdirs") ("impact" . "medium") ("status" . "proposed") ("tags" "verify" "jerbuild" "libdirs" "project_path") @@ -2213,7 +2213,7 @@ "~1000-3000 tokens on command-verification tasks") ("example_scenario" . - "The model spent many calls searching /opt and Gerbil paths before using /Users/user/mine/jerboa/.chez/bin/scheme; stronger command-result affordances could avoid that.") + "The model spent many calls searching /opt and Gerbil paths before using /Users/example/mine/jerboa/.chez/bin/scheme; stronger command-result affordances could avoid that.") ("id" . "jcode-absolute-command-following-hints") ("impact" . "medium") ("status" . "proposed") ("tags" "jcode" "tool-results" "local-model" "commands") @@ -3198,7 +3198,7 @@ "~300-700 tokens per vendored API exploration by avoiding fallback source reads and duplicate signature probes.") ("example_scenario" . - "For project /Users/user/mine/obersh with extra_libdirs [\"vendor/jerboa-yubikey\"], module_exports for (yubikey oath) reported library not found, but function_signature for oath-set-code succeeded.") + "For project /Users/example/mine/obersh with extra_libdirs [\"vendor/jerboa-yubikey\"], module_exports for (yubikey oath) reported library not found, but function_signature for oath-set-code succeeded.") ("id" . "module-exports-extra-libdirs-parity") ("impact" . "medium") ("implemented_in" . "mcp/server.ss") ("implemented_tool" . "jerboa_module_exports") @@ -3241,7 +3241,7 @@ "~800 tokens per investigation and avoids repeated reruns against the wrong toolchain") ("example_scenario" . - "A DB transport fix in /Users/user/mine/jerboa/lib/std/net/tcp.ss passes when tests run with JERBOA_DIR and SCHEME pointed at the source checkout, but a release-evidence run through /Users/user/mine/jerboa/dist/jerbuild would still exercise the older bundled core and report stale transport status.") + "A DB transport fix in /Users/example/mine/jerboa/lib/std/net/tcp.ss passes when tests run with JERBOA_DIR and SCHEME pointed at the source checkout, but a release-evidence run through /Users/example/mine/jerboa/dist/jerbuild would still exercise the older bundled core and report stale transport status.") ("id" . "release-evidence-detect-stale-core-toolchain") ("impact" . "high") ("status" . "open") ("tags" "release-evidence" "jerbuild" "stale-toolchain" @@ -3496,7 +3496,7 @@ "jerboa_verify on jsh lineedit.ss fails before expansion with invalid character name #\\escape, while the project jerbuild path accepts the file. module_exports/module_reference can locate generated modules with module_exists but then fail to import local libraries such as (jsh ffi). Align verifier/introspection reader and libdir handling with jerbuild so source checks work on repos using Chez character names and generated src libraries.") ("estimated_token_reduction" . 1200) ("example_scenario" . - "In /Users/user/mine/jerboa-shell, lineedit.ss contains (def ESC #\\escape). jerboa_verify reports invalid character name #\\escape, but make jerboa succeeds. module_exists finds /src/jsh/ffi.sls, but module_exports reports library (jsh ffi) not found.") + "In /Users/example/mine/jerboa-shell, lineedit.ss contains (def ESC #\\escape). jerboa_verify reports invalid character name #\\escape, but make jerboa succeeds. module_exists finds /src/jsh/ffi.sls, but module_exports reports library (jsh ffi) not found.") ("id" . "verifier-read-chez-character-names-and-local-libdirs") @@ -3905,7 +3905,7 @@ "When jerboa_run_tests is called with project_path, it can still execute with a jerbuild cache libdir snapshot that differs from the current checkout. In this session it reported typed-rust failing with unsupported-expression while ./bin/jerboa run and make typed-test passed against the live repo after bytevector-u8-set! changes. The tool should either prioritize the checkout libdirs, compare cached source mtimes/content against project files, or make the cache source explicit in the failure with a recommended live-repo command.") ("estimated_token_reduction" . "") ("example_scenario" . - "After editing lib/jerboa/typed/checker.ss and lib/jerboa/typed/rust.ss, jerboa_run_tests tests/test-typed-rust.ss fails from /Users/user/.cache/jerbuild/... while ./bin/jerboa run tests/test-typed-rust.ss and make typed-test pass in /Users/user/mine/jerboa.") + "After editing lib/jerboa/typed/checker.ss and lib/jerboa/typed/rust.ss, jerboa_run_tests tests/test-typed-rust.ss fails from /Users/example/.cache/jerbuild/... while ./bin/jerboa run tests/test-typed-rust.ss and make typed-test pass in /Users/example/mine/jerboa.") ("id" . "run-tests-project-path-cache-staleness-guard") ("impact" . "medium") ("status" . "proposed") ("tags" "tests" "cache" "project-path" "typed" --- a/support/check-release-path-leaks.sh +++ b/support/check-release-path-leaks.sh @@ -47,15 +47,15 @@ scan_file() { : > "$strings_out" strings -a "$file" > "$strings_out" 2>/dev/null || true - failed=0 - scan_stream "$label" HOME "$home_path" "$strings_out" || failed=1 - scan_stream "$label" repo-root "$repo" "$strings_out" || failed=1 + scan_failed=0 + scan_stream "$label" HOME "$home_path" "$strings_out" || scan_failed=1 + scan_stream "$label" repo-root "$repo" "$strings_out" || scan_failed=1 if [ "$repo_physical" != "$repo" ]; then - scan_stream "$label" repo-root-physical "$repo_physical" "$strings_out" || failed=1 + scan_stream "$label" repo-root-physical "$repo_physical" "$strings_out" || scan_failed=1 fi rm -f "$strings_out" - return "$failed" + return "$scan_failed" } scan_tar_gz() { @@ -65,15 +65,15 @@ scan_tar_gz() { mkdir -p "$extract_dir" tar -xzf "$artifact" -C "$extract_dir" - failed=0 + tar_failed=0 while IFS= read -r file; do rel=${file#"$extract_dir"/} - scan_file "$file" "$artifact:$rel" || failed=1 + scan_file "$file" "$artifact:$rel" || tar_failed=1 done <<EOF $(find "$extract_dir" -type f | sort) EOF rm -rf "$extract_dir" - return "$failed" + return "$tar_failed" } checked=0 --- a/support/redact-build-paths.ss +++ b/support/redact-build-paths.ss @@ -87,7 +87,8 @@ (define patterns (unique-strings (list (getenv "JERBOA_HOME") - (getenv "HOME")))) + (getenv "HOME") + (getenv "JERBOA_REDACT_PATH")))) (for-each (lambda (path)