Consolidate Odysseus agent harness and tool contracts

This commit is contained in:
pewdiepie-archdaemon
2026-09-17 10:07:40 +00:00
parent 84aa9a91de
commit 218d762427
229 changed files with 28899 additions and 1551 deletions
+29
View File
@@ -158,6 +158,35 @@ def test_native_codec_records_unmatched_tool_result_as_gap():
assert trace.summary()["observation_gaps"] == ["tool_result_call_unmatched", "trace_end_unavailable"]
def test_native_codec_links_explicit_preexecution_rejection():
trace = decode_native_trace(
[
_sse({
"type": "tool_output",
"tool": "inspect_media",
"command": '{"path":"/workspace/result.png"}',
"output": "This exact successful call already returned evidence.",
"exit_code": 1,
"error": True,
"execution_attempted": False,
"blocked": True,
"round": 4,
}),
{"sse": "data: [DONE]\n\n"},
],
run_id="preexecution-rejection",
)
summary = trace.summary()
assert summary["tool_linkage_valid"] is True
assert summary["observation_gaps"] == []
[call] = [event for event in trace.events if event.kind == TraceKind.TOOL_CALL]
[result] = [event for event in trace.events if event.kind == TraceKind.TOOL_RESULT]
assert call.correlation_id == result.correlation_id
assert call.payload["execution_attempted"] is False
assert call.payload["rejected_before_execution"] is True
def test_native_codec_preserves_model_response_reference():
trace = decode_native_trace(
[