--- name: map-codebase description: Maps a codebase (Python, Rust, C, JavaScript or TypeScript) into a Verification Bench map, records the headline run, and checks whether the code a claim rests on actually ran. Use when verifying a speed, accuracy or feature claim, to see what really executes when the result is produced. --- # Map the codebase The most direct check there is: when the headline number is produced, does the code that's supposed to produce it run? This skill makes a map of the project, records the run that makes the number, and reads the map for the answer. Part of the Verification Bench (case file: see `verify`). Open maps at wrightfunctions.com/misc/verification-bench/; they never leave your browser. ## The mappers They ship in this skill's `scripts/` folder: `map-python.py` (standard library only), `map-treesitter.py` (Rust, C, JS/TS; needs `pip install tree-sitter tree-sitter-rust tree-sitter-c tree-sitter-javascript tree-sitter-typescript`), `trace-hooks.c` (call recording for C) and `record-js.py` (call recording for JavaScript in a page, with Playwright). Copy them next to the project, not into it. ## Steps 1. **Spotlight the claim's code.** From the pinned claim, list the files or functions the claim is about (the algorithm, not the benchmark harness). 2. **Map and record the headline run**, in the sandbox from `clean-reproduce`: | Language | Command | |---|---| | Python | `python3 map-python.py . --run --spotlight --out map.json` | | C | build with `-finstrument-functions -g … trace-hooks.c` (Linux: `-ldl`), run it, then `python3 map-treesitter.py . --trace-chrome vb-trace.json --binary ./app --spotlight --out map.json` | | Rust, C on Linux | debug build, `uftrace record -P . ./app`, `uftrace dump --chrome > trace.json`, then `map-treesitter.py . --trace-chrome trace.json --spotlight --out map.json` | | JavaScript (web page) | `map-treesitter.py . --out map.json`, serve an unminified build, then `python3 record-js.py --map map.json --url --scroll` (`pip install playwright && playwright install chromium`) | 3. **Read the result.** With a recorded run, the mapper prints a report: how many functions ran, how many of the claim's ran, and the claim's functions that never ran. Map a copy of the project: running it can leave files behind (`__pycache__`, build output). A person can also drop map.json on the page and replay it; the verdict line there says the same. 4. **Look for these**, and quote what you find: - The spotlighted code doesn't run, or runs only at import. That's a FAIL for the claim as pinned; hand it to `hardcode-hunt` to find what does. - The headline path calls into a cache, fixture, "expected" file or precomputed table. - A branch that only runs under the benchmark or test (look for calls that appear in the run but not in the map's static lines). - Large parts of the code are dark during the run: dead code padding the project, or a different entry point than the README says. 5. **Read the honesty counters** in the map's header: guesses are dashed and unresolved calls are counted. Say so if the answer leans on them. ## Entry ```markdown ### map-codebase · · PASS | FAIL | INCONCLUSIVE - Ran: ``; recorded: `` - Saw: of functions ran; claim's code: of functions ran - Notes: - Map: verification//map.json ```