fix(bench,cpg): the position benchmark builds in the recipe's language and reports per repository; a doubly-failed build disposes its scratch

WP Statistics's first region is JavaScript, and a build asked for as JavaScript went looking for
jssrc2cpg, failed both launchers, lost the whole run's output and left a 9.6 MB scratch directory behind.
Also notes upstream: joern#6281 is fixed in v4.0.625.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01T7XD7x5KonMdmGRkp63EQG
This commit is contained in:
Marius Ciepluch
2026-09-11 11:30:12 +02:00
co-authored by Claude Fable 5.1
parent c955721f92
commit b6cccd1444
4 changed files with 41 additions and 5 deletions
+1
View File
@@ -305,6 +305,7 @@ class JoernBackend:
logger.warning("cpg build failed for %s: %s", root, detail)
retried = self._build_with_frontend(root, cpg_path, scratch, language)
if retried is None:
dispose() # a failed build's scratch is nobody's to sweep six hours later
return None
self._apply_overlays(cpg_path, scratch)
unparsed = retried