Repository navigation
fix(bench): decode XML-escaped paths and names before comparing them - #723
Conversation
…719) run_arb.py's query_files/trace_files regex-captured <f p=>, <frame p=> and <hop p=> and passed them to norm_path undecoded, so src/a&b.py ranked as src/a&b.py and never matched its gold path. One xml_path helper (xml_unescape, the exact inverse of serialize.h escapeXml, then norm_path) now serves all three; the same capture shape is fixed in tgrep-h2h rw_hitset, tokenaudit derive_targets, bench_proof files_in and spec_trace's seed. test/benchxmlpathcheck.sh drives them with a fake binary. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…counts snapshot (#719) benchxmlpathcheck drives bench Python against a fake script it writes itself and never binds the ripwire binary, so binoverridecheck's sentinel cannot turn it red: pinned in EXEMPT like its siblings. docs/counts_snapshot.py refresh clears gendocsmergecheck (D)'s drift bound (11 > 10). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@coderabbitai review |
Action performed
|
|
CodeRabbit round on #723 (review on 197afc7): no actionable comments. Commits after the reviewed head:
Verification at a5bb08e: CI 37 of 37 pass; |
main moved again before the final build: #723 (#719, bench XML-escaped path/name decode, its new gate test/benchxmlpathcheck.sh and binoverridecheck exemption). No source or parser change, so kParserVer stays 342. Conflicts: README.md, docs/EVALS.md, docs/LIMITS.md, docs/TUNING.md, docs/counts.tsv, present/deck5_ripwire_build.js — all the generated counts-snapshot regions both sides refreshed. Kept the train's side, then `python3 docs/counts_snapshot.py refresh` on the merged tree (tool-written), never text-merged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixes #719
Reported by @soarkit, who traced it to
bench/arb/run_arb.py:query_filesandtrace_filestook<f p=>,<frame p=>and<hop p=>out with regexes and passed the raw value tonorm_path. ripwire's emitter escapes& < > " '(and tab/newline/CR as numeric references), sosrc/a&b.pywas ranked assrc/a&b.pyand could never match the decoded gold path.affected_testsalready decoded; these two did not.Change
run_arb.py: onexml_path(raw, snap) = norm_path(xml_unescape(raw), snap)used by all three regexes.xml_unescapeis the file's existing decoder, the exact inverse ofserialize.hescapeXml(five named entities plus numeric references).bench/for the same capture-then-use shape: fixedtgrep-h2h/arms.py(rw_hitset, joined with rg's decoded paths),tokenaudit/sweep.py(derived symbol and file ride back in as CLI args),bench_proof.py(files_in, the path is opened),spec_trace.py(seed symbol). Sites that cannot fail (display-only, dead code, emitter-vs-emitter comparison, identifier-only names) are left; the list is in the lane notes.test/benchxmlpathcheck.sh(registered inregression.sh) drives each fixed reader with a fake ripwire binary emitting<f p="src/a&b.py">, frame and hop forms, and< > " '.changelog.d/719-bench-xml-unescape.md.Evidence
origin/main'sbench/fails 4 arms (src/a&b.pycame back undecoded); the fifth arm is theaffected_testscontrol and passes on both. Green after.scripts/qd_range.sh origin/main: PASS, 0 gating rows.bench/external/arb/) are untracked and were not available, so no gold path could be checked and nothing was re-run.Credit: thanks @soarkit for the report and the exact locations.
🤖 Generated with Claude Code
Summary by CodeRabbit