mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-18 04:29:27 +00:00
search-with-proof: 1 GiB spooled verifier archive, tolerant text replies, transport retries
Built projects spool to /workspace without package caches (cap 1 GiB, both sides); a plain-text model reply is fed back once; mailbox PUT/GET retry for up to 90 s with idempotent re-send by seq; executor tasks are deleted on every exit path. Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
30cbc1ac76
commit
72ab4c8925
@@ -457,3 +457,27 @@ def test_finish_wins_over_other_calls_without_executing_them(tmp_path, finish_fi
|
||||
assert result["fact"]["text"] == "Confirmed app source"
|
||||
assert worker.metrics["warnings"] == 1
|
||||
assert worker.evidence == {"tool:1"}
|
||||
|
||||
|
||||
def test_plain_text_gets_one_reminder_then_can_finish(tmp_path):
|
||||
model = StubModel([{"content": "I will inspect"}, tool("finish", failure="no evidence")])
|
||||
result = Worker(model, repo=tmp_path, demo=tmp_path / "demo", max_steps=2)(task("explore"))
|
||||
assert result["failure"] == "no evidence"
|
||||
assert len(model.calls) == 2
|
||||
assert model.calls[1]["messages"][-1] == {"role": "user", "content": "Use a tool or call finish; plain text is not accepted."}
|
||||
|
||||
|
||||
def test_second_plain_text_records_first_300_characters(tmp_path):
|
||||
text = "second response " * 40
|
||||
model = StubModel([{"content": "first"}, {"content": text}])
|
||||
result = Worker(model, repo=tmp_path, demo=tmp_path / "demo", max_steps=3)(task("explore"))
|
||||
assert result["status"] == "execution_failure"
|
||||
assert result["failure"] == "second plain-text reply: " + text[:300]
|
||||
assert len(model.calls) == 2
|
||||
|
||||
|
||||
def test_plain_text_consumes_step(tmp_path):
|
||||
model = StubModel([{"content": "first"}])
|
||||
result = Worker(model, repo=tmp_path, demo=tmp_path / "demo", max_steps=1)(task("explore"))
|
||||
assert result["end_detail"] == "worker_steps"
|
||||
assert len(model.calls) == 1
|
||||
|
||||
Reference in New Issue
Block a user