mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-06 06:52:20 +02:00
match completion writes to requested artifact paths
This commit is contained in:
@@ -1374,8 +1374,6 @@ def runtime_required_artifacts(user_text, client_runtime_context):
|
||||
|
||||
def execution_targets_required_artifact(tool_name, arguments, required_artifacts):
|
||||
"""Return true only when a successful mutation names a required output."""
|
||||
if canonical(tool_name) == 'write_file':
|
||||
return True
|
||||
serialized = (
|
||||
arguments if isinstance(arguments, str)
|
||||
else json.dumps(arguments or {}, ensure_ascii=False)
|
||||
|
||||
@@ -466,6 +466,9 @@ def test_read_only_python_does_not_satisfy_required_artifact():
|
||||
assert execution_targets_required_artifact(
|
||||
'write_file', {'path': '/workspace/output.html', 'content': '<html />'}, required,
|
||||
)
|
||||
assert not execution_targets_required_artifact(
|
||||
'write_file', {'path': '/workspace/analyze.py', 'content': 'print(1)'}, required,
|
||||
)
|
||||
|
||||
|
||||
def test_read_only_gate_blocks_mutation_and_network_shell():
|
||||
|
||||
Reference in New Issue
Block a user