conversation-session-ask-user-question-answer-visible.json 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-ask-user-question-answer-visible",
  4. "spec": "./test/e2e/conversation-session/permissions/conversation-session-ask-user-question-answer-visible.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "conversation-session-ask-user-question-answer-visible-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": "upstream-conversation-ask-user-question-answer-visible-call",
  31. "description": "AskUserQuestion answer visible repro: 首轮返回单题问答工具调用。",
  32. "metadata": {
  33. "kind": "main",
  34. "timingPolicy": "fast-text",
  35. "source": "synthetic",
  36. "syntheticReason": "稳定制造 AskUserQuestion 单题等待态,避免真实模型是否提问影响 UI 投影复现。"
  37. },
  38. "maxMatches": 1,
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/messages",
  42. "lastUserMessageIncludes": ["E2E_ASK_USER_QUESTION_ANSWER_VISIBLE"],
  43. "bodyIncludes": [
  44. "E2E_ASK_USER_QUESTION_ANSWER_VISIBLE",
  45. "E2E_TOOL_CROSS_PRODUCT_ASK_USER_QUESTION"
  46. ],
  47. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  48. },
  49. "response": {
  50. "statusCode": 200,
  51. "toolUse": {
  52. "id": "toolu_e2e_tool_cross_product_ask_user_question",
  53. "name": "AskUserQuestion",
  54. "input": {
  55. "questions": [
  56. {
  57. "question": "E2E_TOOL_CROSS_PRODUCT_ASK_USER_QUESTION: choose an answer?",
  58. "header": "E2E",
  59. "options": [
  60. {
  61. "label": "Use default",
  62. "description": "Continue the e2e run with the default answer."
  63. },
  64. {
  65. "label": "Use fallback",
  66. "description": "Continue the e2e run with the fallback answer."
  67. }
  68. ]
  69. }
  70. ]
  71. }
  72. }
  73. }
  74. },
  75. {
  76. "id": "upstream-conversation-ask-user-question-answer-visible-final",
  77. "description": "AskUserQuestion answer visible repro: 用户回答进入下一次模型请求后的最终回复。",
  78. "metadata": {
  79. "kind": "main",
  80. "timingPolicy": "fast-text",
  81. "source": "synthetic",
  82. "syntheticReason": "该响应只证明问答回答已被 agent 消费,核心断言在 UI 是否保留用户可见记录。"
  83. },
  84. "maxMatches": 1,
  85. "match": {
  86. "method": "POST",
  87. "pathIncludes": "/messages",
  88. "bodyIncludes": [
  89. "E2E_ASK_USER_QUESTION_CUSTOM_ANSWER",
  90. "E2E_TOOL_CROSS_PRODUCT_ASK_USER_QUESTION",
  91. "toolu_e2e_tool_cross_product_ask_user_question"
  92. ],
  93. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  94. },
  95. "response": {
  96. "statusCode": 200,
  97. "text": "upstream-e2e-ok"
  98. }
  99. }
  100. ]
  101. }