diff --git a/docs/agent-training/stage1_foundation.json b/docs/agent-training/stage1_foundation.json index 77ef5cc9..50bde605 100644 --- a/docs/agent-training/stage1_foundation.json +++ b/docs/agent-training/stage1_foundation.json @@ -352,6 +352,42 @@ "coverage_report": true, "passing_score": 80 }, + "failure_simulation": [ + { + "test_name": "Insufficient funds error", + "operation": "wallet_send", + "failure_type": "insufficient_funds", + "test_case": { + "wallet": "training-wallet", + "to": "recipient-address", + "amount": "1000000", + "password": "training123" + }, + "expected_error": "Insufficient funds", + "recovery_operation": "wallet_balance" + }, + { + "test_name": "Invalid password error", + "operation": "wallet_send", + "failure_type": "invalid_password", + "test_case": { + "wallet": "training-wallet", + "to": "recipient-address", + "amount": "10", + "password": "wrong-password" + }, + "expected_error": "Invalid password" + }, + { + "test_name": "Invalid wallet error", + "operation": "wallet_balance", + "failure_type": "invalid_resource", + "test_case": { + "wallet": "non-existent-wallet" + }, + "expected_error": "Wallet not found" + } + ], "mock_data": { "wallets": ["test-wallet-1", "test-wallet-2"], "addresses": ["0x1234567890abcdef", "0x0987654321fedcba"], diff --git a/docs/agent-training/training_schema.json b/docs/agent-training/training_schema.json index 427d5022..56bcb306 100644 --- a/docs/agent-training/training_schema.json +++ b/docs/agent-training/training_schema.json @@ -238,6 +238,40 @@ "type": "object", "required": ["exam_tests", "passing_score"], "properties": { + "failure_simulation": { + "type": "array", + "description": "Failure simulation tests to verify error handling", + "items": { + "type": "object", + "properties": { + "test_name": { + "type": "string", + "description": "Failure simulation test name" + }, + "operation": { + "type": "string", + "description": "Operation to test with failure conditions" + }, + "failure_type": { + "type": "string", + "enum": ["insufficient_funds", "invalid_password", "network_failure", "invalid_resource", "permission_denied", "timeout"], + "description": "Type of failure to simulate" + }, + "test_case": { + "type": "object", + "description": "Test input parameters designed to trigger failure" + }, + "expected_error": { + "type": "string", + "description": "Expected error message or error code" + }, + "recovery_operation": { + "type": "string", + "description": "Operation to recover from failure (optional)" + } + } + } + }, "exam_tests": { "type": "array", "items": {