mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-18 04:29:27 +00:00
bench(valid): a training freeze may cap the history walk at the newest N first-parent commits
ordinary_history(limit=) walks only the newest commits; assemble.freeze(history_limit=) and --history-limit pass it through and the record carries it. The held-out benchmark passes none. Reason: trigger.dev's 7,109-commit walk runs for hours at the per-commit cost of the function and generated checks; the training freeze now walks its newest 1,500. Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
6f9613329e
commit
1d1c87f63b
@@ -670,3 +670,12 @@ def test_partial_clone_lazy_fetch_preserves_extraction_content(history, tmp_path
|
||||
assert partial.files_read > 0 and partial.bytes_read > 0
|
||||
assert json.dumps(result, sort_keys=True).encode() == json.dumps(baseline, sort_keys=True).encode()
|
||||
assert sum("built-in: git fetch " in line for line in trace.read_text().splitlines()) >= 12
|
||||
|
||||
|
||||
def test_history_limit_walks_only_the_newest_commits(history):
|
||||
git, *_ = history
|
||||
full = e.ordinary_history(git, "HEAD")
|
||||
assert len(full) > 2
|
||||
assert e.ordinary_history(git, "HEAD", limit=2) == full[:2] # the newest first-parent commits, same rows
|
||||
with pytest.raises(ValueError, match="positive integer"):
|
||||
e.ordinary_history(git, "HEAD", limit=0)
|
||||
|
||||
Reference in New Issue
Block a user