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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-tool-error-surface",
  4. "spec": "./test/e2e/conversation-session/tools/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": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  52. },
  53. "response": {
  54. "statusCode": 200,
  55. "toolUses": [
  56. {
  57. "id": "toolu_e2e_tool_error_surface_stale_agent",
  58. "name": "Agent",
  59. "input": {
  60. "description": "Run stale provider Agent for error surface coverage",
  61. "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.",
  62. "subagent_type": "e2e-stale-error-reviewer"
  63. }
  64. },
  65. {
  66. "id": "toolu_e2e_tool_error_surface_healthy_agent",
  67. "name": "Agent",
  68. "input": {
  69. "description": "Run healthy sibling Agent for error surface coverage",
  70. "prompt": "E2E_TOOL_ERROR_SURFACE_HEALTHY_CHILD: reply with exactly E2E_TOOL_ERROR_SURFACE_HEALTHY_OK and no other text.",
  71. "subagent_type": "e2e-healthy-error-reviewer"
  72. }
  73. }
  74. ]
  75. }
  76. },
  77. {
  78. "id": "tool-error-surface-healthy-child-final",
  79. "description": "healthy sibling child subagent 固定回复。",
  80. "metadata": {
  81. "kind": "main",
  82. "timingPolicy": "fast-text",
  83. "source": "synthetic",
  84. "syntheticReason": "该响应证明 stale Agent 失败不会阻断同轮 healthy Agent child 请求。"
  85. },
  86. "maxMatches": 1,
  87. "match": {
  88. "method": "POST",
  89. "pathIncludes": "/messages",
  90. "lastUserMessageIncludes": ["E2E_TOOL_ERROR_SURFACE_HEALTHY_CHILD"],
  91. "bodyIncludes": ["E2E_TOOL_ERROR_SURFACE_HEALTHY_CHILD"],
  92. "bodyExcludes": [
  93. "E2E_TOOL_ERROR_SURFACE_STALE_CHILD",
  94. "Generate a concise title",
  95. "CRITICAL: Respond with TEXT ONLY"
  96. ]
  97. },
  98. "response": {
  99. "statusCode": 200,
  100. "text": {
  101. "id": "upstream-e2e-tool-error-surface-healthy-child-final",
  102. "inputTokens": 128,
  103. "outputTokens": 16,
  104. "text": "E2E_TOOL_ERROR_SURFACE_HEALTHY_OK"
  105. }
  106. }
  107. },
  108. {
  109. "id": "tool-error-surface-parent-final",
  110. "description": "父 agent 收到 stale failed tool_result 和 healthy success tool_result 后的固定最终回复。",
  111. "metadata": {
  112. "kind": "main",
  113. "timingPolicy": "fast-text",
  114. "source": "synthetic",
  115. "syntheticReason": "最终回复用于证明父 continuation 看到的 failed tool_result 已经是具体 provider 根因而不是泛化 Turn failure。"
  116. },
  117. "maxMatches": 1,
  118. "match": {
  119. "method": "POST",
  120. "pathIncludes": "/messages",
  121. "bodyIncludes": [
  122. "E2E_TOOL_ERROR_SURFACE_PARENT",
  123. "toolu_e2e_tool_error_surface_stale_agent",
  124. "toolu_e2e_tool_error_surface_healthy_agent",
  125. "reason=provider-not-found; selection=e2e-stale-provider/e2e-stale-model",
  126. "E2E_TOOL_ERROR_SURFACE_HEALTHY_OK"
  127. ],
  128. "bodyExcludes": [
  129. "Turn execution failed",
  130. "Generate a concise title",
  131. "CRITICAL: Respond with TEXT ONLY"
  132. ]
  133. },
  134. "response": {
  135. "statusCode": 200,
  136. "text": {
  137. "id": "upstream-e2e-tool-error-surface-parent-final",
  138. "inputTokens": 180,
  139. "outputTokens": 12,
  140. "text": "E2E_TOOL_ERROR_SURFACE_PARENT_DONE"
  141. }
  142. }
  143. }
  144. ]
  145. }