mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-18 04:29:27 +00:00
feat(plane): tie-break pass on disputed candidates; 2-of-3 agreement
The design revisit after plane-increment-1.json (14/20 agreed, 19/20 in either
pass): a third verify pass on the candidates passes a and b dispute, and agree
decides 2-of-3 where pass c asked (the a/b rule elsewhere; c alone never decides).
- verify: optional OUSAST_INPUT_ONLY restricts the hunt to the named candidates
(agree's disputed.json); an empty list is done with 0 units and no model client.
- agree: optional OUSAST_INPUT_PASS_C; metrics keep every key and add tiebreak
{asked, flipped_to_agreed, flipped_to_rejected, rule}; usd_total, hunts and
declared-site metrics are on the final decision.
- generate: per case <case>-vc and <case>-final appended to validation-46; the
first 60 entries stay byte-identical, so a rerun keeps their done state.
- Offline replay over the recorded outputs with an empty pass c reproduces the
recorded agree summaries exactly (14/20 agreed, 23 agreed, 10 disputed).
- Spec: Requirement 6.4, design Measurement, task 8.1.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EmM1j46qgKMh3zqD1QMwEo
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
c5e6ed3221
commit
6e6bcfc40c
@@ -448,6 +448,30 @@ def test_unfinished_stops_dependants_and_rerun_skips_done(fake: Fake, tmp_path:
|
||||
assert statuses("resume") == {"repo-facts": "done", "verify": "done", "agree": "done"}
|
||||
|
||||
|
||||
TIEBREAK = """
|
||||
- name: tiebreak
|
||||
task: verify
|
||||
dependsOn: [agree]
|
||||
inputs: {only: verify/agreed.json, facts: repo-facts/facts.json}
|
||||
outputs: [agreed.json]
|
||||
budget: {usd: 1, calls: 8}
|
||||
"""
|
||||
|
||||
|
||||
def test_a_rerun_of_a_run_that_gained_tasks_runs_only_the_new_ones(fake: Fake, tmp_path: Path) -> None:
|
||||
manifest = write_run(tmp_path, "grow")
|
||||
assert reconciler.run(manifest, ax=str(fake.ax)) == "done"
|
||||
first = state_of("grow")["tasks"]
|
||||
(fake.root / "ax.log").unlink()
|
||||
fake.script({**SCRIPT, "tiebreak": SCRIPT["verify"]})
|
||||
write_run(tmp_path, "grow", CHAIN + TIEBREAK) # the same Run, one task appended (the tie-break pass)
|
||||
assert reconciler.run(manifest, ax=str(fake.ax)) == "done"
|
||||
assert [name for _, name in fake.events("apply")] == ["tiebreak"], "done tasks keep their state; only the new task runs"
|
||||
assert statuses("grow") == {"repo-facts": "done", "verify": "done", "agree": "done", "tiebreak": "done"}
|
||||
assert {k: v for k, v in state_of("grow")["tasks"].items() if k != "tiebreak"} == first
|
||||
assert sorted(n for _, n in fake.events("fetched")) == ["tiebreak FACTS 200", "tiebreak ONLY 200"], "inputs of done producers"
|
||||
|
||||
|
||||
def test_failed_task_halts_the_run(fake: Fake, tmp_path: Path) -> None:
|
||||
script = json.loads(json.dumps(SCRIPT))
|
||||
failed = {"status": "failed", "units_done": 0, "units_total": 3, "reason": "402 insufficient balance"}
|
||||
|
||||
Reference in New Issue
Block a user