conversation-session-worker-effective-selection.json 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-worker-effective-selection",
  4. "spec": "./test/e2e/conversation-session/models/conversation-session-worker-effective-selection.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "conversation-session-worker-effective-selection-title-sidecar",
  8. "description": "本例标题旁路响应。",
  9. "metadata": {
  10. "kind": "common",
  11. "source": "synthetic",
  12. "timingPolicy": "fast-text",
  13. "syntheticReason": "运行时证据显示标题旁路缺少响应;在本例显式登记固定标题,避免依赖 legacy 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-title-fixture\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Upstream E2E Fixture\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":125,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":24,\"service_tier\":\"standard\"}}"
  27. }
  28. },
  29. {
  30. "id": "w99-explicit-parent-tool",
  31. "description": "父会话通过真正 Agent 工具触发显式个人套餐意图。",
  32. "metadata": {
  33. "kind": "main",
  34. "timingPolicy": "fast-text",
  35. "source": "synthetic",
  36. "syntheticReason": "确定性触发子执行;验证真实 Worker 解析和请求,不测试模型自主决策。"
  37. },
  38. "maxMatches": 1,
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/messages",
  42. "lastUserMessageIncludes": ["E2E_W99_EXPLICIT_PARENT"],
  43. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  44. },
  45. "response": {
  46. "statusCode": 200,
  47. "toolUse": {
  48. "id": "toolu_w99_explicit",
  49. "name": "Agent",
  50. "input": {
  51. "description": "Run account reviewer",
  52. "subagent_type": "e2e-worker-account-reviewer",
  53. "prompt": "E2E_W99_EXPLICIT_CHILD: Reply with the requested marker."
  54. }
  55. }
  56. }
  57. },
  58. {
  59. "id": "w99-explicit-parent-final",
  60. "description": "消费真实子代理结果后结束父会话。",
  61. "metadata": {
  62. "kind": "main",
  63. "timingPolicy": "fast-text",
  64. "source": "synthetic",
  65. "syntheticReason": "Account 子请求由既有隔离 Coding Plan 数据面返回固定文本;父结果仅证明工具完成。"
  66. },
  67. "maxMatches": 1,
  68. "match": {
  69. "method": "POST",
  70. "pathIncludes": "/messages",
  71. "bodyIncludes": ["E2E_W99_EXPLICIT_PARENT", "coding-plan-e2e-ok"],
  72. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  73. },
  74. "response": {
  75. "statusCode": 200,
  76. "text": {
  77. "id": "w99-parent-final",
  78. "text": "E2E_W99_PARENT_DONE",
  79. "inputTokens": 160,
  80. "outputTokens": 12
  81. }
  82. }
  83. }
  84. ]
  85. }