mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-16 11:49:28 +00:00
revert: JavaScript one-start build did not deliver in the push path (M2 11.6)
Reverts f04a839 on its own measurement. The seven-class profile rerun recorded
joern_parse_census_incomplete on 12 transactions: the faster build was rejected by
its own census gate and the frontend plus overlay pass ran as well, so those
transactions paid two engine starts instead of one. Every workload kept the same
p50 and the verdict stayed NO-GO.
The cause is an asymmetric gate. The frontend path is not census-gated at build
time, so whatever it produces is accepted, while the joern-parse path was gated and
the same shortfall rejected it. Holding the new path to a standard the old one
never has to meet guarantees the fallback fires. The probe tree and the
materialized push snapshot also differ, so equivalence on the checkout did not
transfer to the real path.
What still stands is the underlying timing fact, measured under the production
retention environment on identical graphs, same 44 files, 579 methods, file names,
overlays, Gruntfile and eighteen test files: 11.0 s against 21.0 s. JavaScript does
pay two engine starts where every other language pays one. A future attempt needs a
gate both paths are held to, or a direct comparison against what the frontend would
produce, and must be measured in the push path rather than on a checkout.
The profile also names the remaining cost plainly: a changed-code transaction
spends its budget before any query runs, head build 25.2 s of a 30 s deadline with
query time 0.0 s. Building one new graph per push is the cost, not querying it.
1,401 tests passed, nine skipped. Rollout stays NO-GO.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01EmM1j46qgKMh3zqD1QMwEo
This commit is contained in:
co-authored by
Claude Opus 5
parent
f04a839181
commit
ed0f12b593
@@ -552,36 +552,14 @@ class JoernBackend:
|
||||
execution_diagnostics=lambda: tuple(self._diagnostics),
|
||||
)
|
||||
if language.lower() in {"javascript", "typescript"}:
|
||||
# M2 11.6: `joern-parse` applies the overlays itself, so it is ONE engine start where the
|
||||
# frontend plus a separate overlay pass is two. On the pinned Node tree that is 11.0 s
|
||||
# against 21.0 s, and JavaScript was the only language paying twice.
|
||||
#
|
||||
# The declared frontend stays, because it is what the versioned retention adaptation and
|
||||
# the explicit exclusion policy run through, and a build nine seconds faster that quietly
|
||||
# drops a file is worse rather than better. Measured under the production retention
|
||||
# environment both paths hold the same 44 files and 579 methods, the same file names, the
|
||||
# same overlays, the Gruntfile and all eighteen first-party test files. That is why this
|
||||
# is allowed at all, and the census still decides per build: an incomplete graph is
|
||||
# rebuilt through the frontend rather than trusted.
|
||||
parsed_unparsed: tuple[str, ...] | None = None
|
||||
if not exclude and parse is not None:
|
||||
command = [parse, self._heap_flag(), str(root), "--output", str(cpg_path)]
|
||||
completed = self._run(command, timeout=self.build_timeout, cwd=scratch)
|
||||
if completed is not None and completed.returncode == 0 and cpg_path.is_file():
|
||||
if self._graph_is_complete(cpg_path, root, language):
|
||||
parsed_unparsed = _unparsed_files(completed)
|
||||
else:
|
||||
self._note("joern_parse_census_incomplete")
|
||||
logger.info("joern-parse produced an incomplete graph for %s; rebuilding through the frontend", root)
|
||||
if parsed_unparsed is not None:
|
||||
unparsed = parsed_unparsed
|
||||
else:
|
||||
direct = self._build_with_frontend(root, cpg_path, scratch, language, exclude)
|
||||
if direct is None:
|
||||
dispose()
|
||||
return None
|
||||
self._apply_overlays(cpg_path, scratch)
|
||||
unparsed = direct
|
||||
# Use the declared frontend rather than language autodetection. The versioned
|
||||
# retention adaptation consumes the explicit include_tests subprocess policy.
|
||||
direct = self._build_with_frontend(root, cpg_path, scratch, language, exclude)
|
||||
if direct is None:
|
||||
dispose()
|
||||
return None
|
||||
self._apply_overlays(cpg_path, scratch)
|
||||
unparsed = direct
|
||||
else:
|
||||
command = [parse or "joern-parse", self._heap_flag(), str(root), "--output", str(cpg_path)]
|
||||
completed = self._run(command, timeout=self.build_timeout, cwd=scratch)
|
||||
|
||||
Reference in New Issue
Block a user