mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-16 03:49:26 +00:00
unseen: configurable pool size and slice count (--pool-size / --slices)
The draw hardcoded 300 repos / 3 slices. At the measured lazy-fetch rate the full 300 projects ~2.5 days; a 100-repo single slice (slice 1, all the G0 baseline needs) is ~20h. Add --pool-size (default 300) and --slices (default 3), validated (>=1, slices<=pool_size, evenly divisible). Generalize assign_slices' stratified allocation from a literal 3 to `slices`, the run() break / insufficient check / report (changes = pool_size*13) to pool_size, and record both in the journal inputs. Remove bisect's three-slice assumption; freeze reads the size from the draft. Defaults (300/3) reproduce prior output exactly. With --pool-size 100 --slices 1 the pool is the first 100 accepted repos in seed order, all in slice 1 (deterministic, byte-identical across worker counts). 280 unseen tests pass, ruff clean. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
f0bcbe08b5
commit
5ea28ca9f8
@@ -14,7 +14,7 @@ d = importlib.import_module("benchmarks.unseen.draft")
|
||||
b = importlib.import_module("benchmarks.unseen.bisect_guard")
|
||||
|
||||
|
||||
def draft_pair(tmp_path, count=9):
|
||||
def draft_pair(tmp_path, count=9, slices=3):
|
||||
root, cache = tmp_path / "tree", tmp_path / "cache"
|
||||
root.mkdir()
|
||||
cache.mkdir()
|
||||
@@ -29,7 +29,7 @@ def draft_pair(tmp_path, count=9):
|
||||
"url": "https://" + f"github.com/synthetic/candidate-{i}",
|
||||
"license_class": "private" if i % 2 else "permissive",
|
||||
"license_spdx": "GPL-3.0" if i % 2 else "MIT",
|
||||
"slice": i % 3 + 1,
|
||||
"slice": i % slices + 1,
|
||||
"changes": changes,
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user