conversation-session-tool-error-surface.json 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-tool-error-surface",
  4. "spec": "./test/e2e/conversation-session/conversation-session-tool-error-surface.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "tool-error-surface-title",
  8. "description": "tool error surface case 内的标题生成固定响应。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "标题生成不是本 case 的产品语义,只需要稳定返回,防止标题请求误命中业务 fixture。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "statusMessage": "OK",
  23. "headers": {
  24. "content-type": "application/json; charset=utf-8"
  25. },
  26. "body": "{\"id\":\"upstream-e2e-tool-error-surface-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Tool Error Surface\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":125,\"cache_creation_input_tokens\":0,\"cache_read_tokens\":0,\"output_tokens\":24,\"service_tier\":\"standard\"}}"
  27. }
  28. },
  29. {
  30. "id": "tool-error-surface-parent-agent-tools",
  31. "description": "父 agent 首轮请求返回一个 stale Agent 和一个 healthy Agent,用于覆盖失败展示和 sibling 不被阻断。",
  32. "metadata": {
  33. "kind": "main",
  34. "timingPolicy": "fast-text",
  35. "source": "synthetic",
  36. "syntheticReason": "稳定制造同轮两个 Agent tool_use,其中 stale profile 在 runtime 启动 child 前失败。"
  37. },
  38. "maxMatches": 1,
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/messages",
  42. "lastUserMessageIncludes": ["E2E_TOOL_ERROR_SURFACE_PARENT"],
  43. "bodyIncludes": [
  44. "E2E_TOOL_ERROR_SURFACE_PARENT",
  45. "E2E_TOOL_ERROR_SURFACE_PARENT_DONE",
  46. "E2E_TOOL_ERROR_SURFACE_STALE_CHILD",
  47. "E2E_TOOL_ERROR_SURFACE_HEALTHY_CHILD",
  48. "e2e-stale-error-reviewer",
  49. "e2e-healthy-error-reviewer"
  50. ],
  51. "bodyExcludes": [
  52. "Generate a concise title",
  53. "CRITICAL: Respond with TEXT ONLY"
  54. ]
  55. },
  56. "response": {
  57. "statusCode": 200,
  58. "toolUses": [
  59. {
  60. "id": "toolu_e2e_tool_error_surface_stale_agent",
  61. "name": "Agent",
  62. "input": {
  63. "description": "Run stale provider Agent for error surface coverage",
  64. "prompt": "E2E_TOOL_ERROR_SURFACE_STALE_CHILD: attempt to inspect the workspace. This child should fail before any model request because its profile model uses custom:e2e-stale-provider:e2e-stale-model.",
  65. "subagent_type": "e2e-stale-error-reviewer"
  66. }
  67. },
  68. {
  69. "id": "toolu_e2e_tool_error_surface_healthy_agent",
  70. "name": "Agent",
  71. "input": {
  72. "description": "Run healthy sibling Agent for error surface coverage",
  73. "prompt": "E2E_TOOL_ERROR_SURFACE_HEALTHY_CHILD: reply with exactly E2E_TOOL_ERROR_SURFACE_HEALTHY_OK and no other text.",
  74. "subagent_type": "e2e-healthy-error-reviewer"
  75. }
  76. }
  77. ]
  78. }
  79. },
  80. {
  81. "id": "tool-error-surface-healthy-child-final",
  82. "description": "healthy sibling child subagent 固定回复。",
  83. "metadata": {
  84. "kind": "main",
  85. "timingPolicy": "fast-text",
  86. "source": "synthetic",
  87. "syntheticReason": "该响应证明 stale Agent 失败不会阻断同轮 healthy Agent child 请求。"
  88. },
  89. "maxMatches": 1,
  90. "match": {
  91. "method": "POST",
  92. "pathIncludes": "/messages",
  93. "lastUserMessageIncludes": ["E2E_TOOL_ERROR_SURFACE_HEALTHY_CHILD"],
  94. "bodyIncludes": ["E2E_TOOL_ERROR_SURFACE_HEALTHY_CHILD"],
  95. "bodyExcludes": [
  96. "E2E_TOOL_ERROR_SURFACE_STALE_CHILD",
  97. "Generate a concise title",
  98. "CRITICAL: Respond with TEXT ONLY"
  99. ]
  100. },
  101. "response": {
  102. "statusCode": 200,
  103. "text": {
  104. "id": "upstream-e2e-tool-error-surface-healthy-child-final",
  105. "inputTokens": 128,
  106. "outputTokens": 16,
  107. "text": "E2E_TOOL_ERROR_SURFACE_HEALTHY_OK"
  108. }
  109. }
  110. },
  111. {
  112. "id": "tool-error-surface-parent-final",
  113. "description": "父 agent 收到 stale failed tool_result 和 healthy success tool_result 后的固定最终回复。",
  114. "metadata": {
  115. "kind": "main",
  116. "timingPolicy": "fast-text",
  117. "source": "synthetic",
  118. "syntheticReason": "最终回复用于证明父 continuation 看到的 failed tool_result 已经是具体 provider 根因而不是泛化 Turn failure。"
  119. },
  120. "maxMatches": 1,
  121. "match": {
  122. "method": "POST",
  123. "pathIncludes": "/messages",
  124. "bodyIncludes": [
  125. "E2E_TOOL_ERROR_SURFACE_PARENT",
  126. "toolu_e2e_tool_error_surface_stale_agent",
  127. "toolu_e2e_tool_error_surface_healthy_agent",
  128. "Model provider is not configured: e2e-stale-provider",
  129. "E2E_TOOL_ERROR_SURFACE_HEALTHY_OK"
  130. ],
  131. "bodyExcludes": [
  132. "Turn execution failed",
  133. "Generate a concise title",
  134. "CRITICAL: Respond with TEXT ONLY"
  135. ]
  136. },
  137. "response": {
  138. "statusCode": 200,
  139. "text": {
  140. "id": "upstream-e2e-tool-error-surface-parent-final",
  141. "inputTokens": 180,
  142. "outputTokens": 12,
  143. "text": "E2E_TOOL_ERROR_SURFACE_PARENT_DONE"
  144. }
  145. }
  146. }
  147. ]
  148. }