Files
temp/features/fixtures/validation/malformed_tool_output.json

101 lines
2.9 KiB
JSON

{
"fixtures": [
{
"name": "missing_required_status_field",
"description": "Tool output missing the required 'status' field entirely",
"input": {
"tool_name": "code_analyzer",
"output": {
"result": "analysis complete",
"artifacts": ["report.json"]
}
},
"expected_error": "missing required field: status"
},
{
"name": "wrong_type_for_status",
"description": "Tool output has 'status' as integer instead of string",
"input": {
"tool_name": "code_analyzer",
"output": {
"status": 200,
"result": "ok"
}
},
"expected_error": "invalid type for field 'status': expected string, got int"
},
{
"name": "null_result_payload",
"description": "Tool output has null as the result payload",
"input": {
"tool_name": "code_analyzer",
"output": {
"status": "success",
"result": null
}
},
"expected_error": "result payload must not be null"
},
{
"name": "extra_null_fields",
"description": "Tool output contains multiple unexpected null fields",
"input": {
"tool_name": "file_writer",
"output": {
"status": "success",
"result": "written",
"metadata": null,
"trace_id": null,
"parent_id": null
}
},
"expected_error": "unexpected null fields: metadata, trace_id, parent_id"
},
{
"name": "empty_output_object",
"description": "Tool output is an empty object with no fields",
"input": {
"tool_name": "code_analyzer",
"output": {}
},
"expected_error": "tool output must contain at least 'status' and 'result'"
},
{
"name": "nested_wrong_types",
"description": "Tool output has deeply nested fields with wrong types",
"input": {
"tool_name": "code_analyzer",
"output": {
"status": "success",
"result": {
"files_processed": "not_a_number",
"errors": "should_be_list",
"metadata": [1, 2, 3]
}
}
},
"expected_error": "nested type mismatch in result: files_processed expected int, errors expected list"
},
{
"name": "output_is_string_not_object",
"description": "Tool output is a raw string instead of a structured object",
"input": {
"tool_name": "code_analyzer",
"output": "just a string"
},
"expected_error": "tool output must be an object, got string"
},
{
"name": "missing_tool_name",
"description": "Tool invocation missing the tool_name entirely",
"input": {
"output": {
"status": "success",
"result": "done"
}
},
"expected_error": "missing required field: tool_name"
}
]
}