mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-18 12:39:28 +00:00
search-with-proof: startup environment and data files, dead-end dedupe, task_spend continues
Demos may set a bounded environment (loader variables denied) and up to 8 small data files under .demo/; the reason step sees conclusions and may not re-propose them; a task spend limit concludes its intent, not the search; finish wins over stray tool calls. Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
67eb629c16
commit
ceeaa66717
@@ -32,8 +32,9 @@ from urllib.parse import urlsplit
|
||||
from ..sandbox import SandboxJob
|
||||
from . import _sandbox, task_storage
|
||||
from .budget import SearchBudget
|
||||
from .demo import MAX_DEMO_BYTES
|
||||
|
||||
MAX_COMMAND_BYTES = 65536
|
||||
MAX_COMMAND_BYTES = MAX_DEMO_BYTES + 65536
|
||||
MAX_RESULT_BYTES = 65536
|
||||
SAFE_ENV = {"PATH": "/venv/bin:/opt/java/openjdk/bin:/usr/local/bin:/usr/bin:/bin", "LANG": "C.UTF-8", "JAVA_HOME": "/opt/java/openjdk"}
|
||||
|
||||
@@ -70,7 +71,7 @@ class Command:
|
||||
if name in self.limits and (type(self.limits[name]) is not int or self.limits[name] < 512):
|
||||
raise ValueError("invalid resource limit")
|
||||
data = json.dumps(asdict(self), sort_keys=True, allow_nan=False).encode()
|
||||
if len(data) > MAX_COMMAND_BYTES:
|
||||
if len(data) > (MAX_COMMAND_BYTES if self.name == "prepare_verification" else 65536):
|
||||
raise ValueError("command too large")
|
||||
return data
|
||||
|
||||
|
||||
Reference in New Issue
Block a user