mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-16 03:49:26 +00:00
wip(g2): park change-scoped attempt + full diagnosis (NOT the fix)
Scope+bound (change-first ordering, adaptive budget-fitted portioning, _context_pass scoped to changed files, evidence_pass_bounded degradation) is preserved here but does NOT unblock analysis: query_seconds stayed 0 across every live re-verify. Uncontended measurement proved why -- the evidence pass is ~150s fixed (first-query graph-load + census) + ~93ms/pair, so ~200s fixed overhead (with the 48s build) precedes any analysis and a 300s budget leaves ~100s. Pair-count scoping only trims the ~86s per-pair tail. The warm-session env (OUSAST_ENGINE_SESSION=1) times out at startup under contention and, even working, spares only subsequent batches -- not the first evidence query's load. Parked per decision to finish the G0 baseline first; resume on a clean host. Branch unmerged. 95 model tests pass; no push-suite regression. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
7558951493
commit
f36165a4ed
@@ -93,14 +93,15 @@ def test_portioned_evidence_stops_at_deadline_keeping_the_first_portion():
|
||||
seen.append(len(reqs))
|
||||
return {rid: [] for rid in reqs}
|
||||
|
||||
reqs = {str(i): {"file": "f"} for i in range(2 * scanmod.BOUNDED_EVIDENCE_PORTION + 5)}
|
||||
reqs = {str(i): {"file": "f"} for i in range(50 * scanmod.BOUNDED_EVIDENCE_PORTION)}
|
||||
answered, attempted = scanmod._portioned_evidence(Cpg(), reqs, deadline=_t.monotonic() - 1, portion=scanmod.BOUNDED_EVIDENCE_PORTION)
|
||||
assert seen == [scanmod.BOUNDED_EVIDENCE_PORTION] # only the first portion ran before the (past) deadline
|
||||
assert attempted == scanmod.BOUNDED_EVIDENCE_PORTION
|
||||
assert answered is not None and len(answered) == scanmod.BOUNDED_EVIDENCE_PORTION
|
||||
assert seen == [scanmod.EVIDENCE_PROBE] # a past deadline stops after only the opening probe chunk
|
||||
assert attempted == scanmod.EVIDENCE_PROBE
|
||||
assert answered is not None and len(answered) == scanmod.EVIDENCE_PROBE
|
||||
seen.clear()
|
||||
_, attempted_full = scanmod._portioned_evidence(Cpg(), reqs, deadline=None, portion=scanmod.BOUNDED_EVIDENCE_PORTION)
|
||||
assert attempted_full == len(reqs) and sum(seen) == len(reqs) # no deadline -> the whole population tiers
|
||||
assert all(s <= scanmod.BOUNDED_EVIDENCE_PORTION for s in seen) # in capped chunks
|
||||
|
||||
|
||||
def test_change_scoped_scan_bounds_and_orders_the_evidence_pass_change_first(tmp_path, monkeypatch):
|
||||
|
||||
Reference in New Issue
Block a user