conversation-session-anthropic-reasoning-history-replay.json 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-anthropic-reasoning-history-replay",
  4. "spec": "./test/e2e/conversation-session/history/conversation-session-anthropic-reasoning-history-replay.test.ts",
  5. "providerFixtures": [
  6. "./test/e2e/fixtures/upstream/common.json",
  7. "./test/e2e/fixtures/upstream/conversation-session/conversation-session-anthropic-reasoning-history-replay.json"
  8. ],
  9. "fileFixtures": [],
  10. "requests": [
  11. {
  12. "id": "anthropic-reasoning-title",
  13. "kind": "common",
  14. "source": "synthetic",
  15. "timingPolicy": "fast-text",
  16. "syntheticReason": "标题不是本 case 的产品语义;固定响应避免标题请求误命中 reasoning 主请求。"
  17. },
  18. {
  19. "id": "anthropic-reasoning-signature-start-seed",
  20. "kind": "main",
  21. "source": "synthetic",
  22. "timingPolicy": "fast-text",
  23. "syntheticReason": "真实兼容问题的 provider wire shape:start 有签名但没有原生 signature_delta。"
  24. },
  25. {
  26. "id": "anthropic-reasoning-standard-signature-delta-seed",
  27. "kind": "main",
  28. "source": "synthetic",
  29. "timingPolicy": "fast-text",
  30. "syntheticReason": "显式锁定标准原生 signature_delta 解析,避免只覆盖 start-signature 兼容分支。"
  31. },
  32. {
  33. "id": "anthropic-reasoning-native-signature-seed",
  34. "kind": "main",
  35. "source": "synthetic",
  36. "timingPolicy": "fast-text",
  37. "syntheticReason": "同时验证已有原生 delta 不被重复补、三类 reasoning metadata 能进入 live history。"
  38. },
  39. {
  40. "id": "anthropic-reasoning-live-replay",
  41. "kind": "main",
  42. "source": "synthetic",
  43. "timingPolicy": "fast-text",
  44. "syntheticReason": "用独立 provider attempt 证明标准 delta、start fallback 与 native precedence 均已进入多轮 live history。"
  45. },
  46. {
  47. "id": "anthropic-reasoning-cold-replay",
  48. "kind": "main",
  49. "source": "synthetic",
  50. "timingPolicy": "fast-text",
  51. "syntheticReason": "响应只需稳定完成;核心证据是 cold request body 保留历史 metadata 与 provenance。"
  52. },
  53. {
  54. "id": "anthropic-reasoning-cross-model",
  55. "kind": "main",
  56. "source": "synthetic",
  57. "timingPolicy": "fast-text",
  58. "syntheticReason": "matcher 直接锁定跨模型 signed/redacted 被移除、unsigned 被保留的 provider wire。"
  59. },
  60. {
  61. "id": "anthropic-reasoning-orphan-seed",
  62. "kind": "main",
  63. "source": "synthetic",
  64. "timingPolicy": "fast-text",
  65. "syntheticReason": "需要真实持久化 reasoning-only turn,下一逻辑请求才能验证孤立 assistant 清理。"
  66. },
  67. {
  68. "id": "anthropic-reasoning-orphan-follow",
  69. "kind": "main",
  70. "source": "synthetic",
  71. "timingPolicy": "fast-text",
  72. "syntheticReason": "matcher 要求孤立 reasoning marker 已从 provider request 移除。"
  73. },
  74. {
  75. "id": "anthropic-reasoning-empty-envelope-seed",
  76. "kind": "main",
  77. "source": "synthetic",
  78. "timingPolicy": "fast-text",
  79. "syntheticReason": "真实 turn 只产出 signed reasoning,下一轮切模型后应由 core 投影删除这条 assistant。"
  80. },
  81. {
  82. "id": "anthropic-reasoning-empty-envelope-follow",
  83. "kind": "main",
  84. "source": "synthetic",
  85. "timingPolicy": "fast-text",
  86. "syntheticReason": "matcher 约束 signed reasoning 已删除且 seed user 仍在请求里。"
  87. },
  88. {
  89. "id": "anthropic-reasoning-whitespace-seed",
  90. "kind": "main",
  91. "source": "synthetic",
  92. "timingPolicy": "fast-text",
  93. "syntheticReason": "签名思考加空白文字没有可见内容,验证切模型后这条 assistant 被删除、前后两条 user 都在请求里。"
  94. },
  95. {
  96. "id": "anthropic-reasoning-whitespace-follow",
  97. "kind": "main",
  98. "source": "synthetic",
  99. "timingPolicy": "fast-text",
  100. "syntheticReason": "matcher 约束两个普通 user marker 同时存在且无 signed reasoning。"
  101. },
  102. {
  103. "id": "anthropic-reasoning-retry-seed",
  104. "kind": "main",
  105. "source": "synthetic",
  106. "timingPolicy": "fast-text",
  107. "syntheticReason": "修复成功后历史带标记,其余错误分支需要一份未修复过的同样历史,所以在新会话里再播种一次。"
  108. },
  109. {
  110. "id": "anthropic-reasoning-http-signature-400",
  111. "kind": "main",
  112. "source": "synthetic",
  113. "timingPolicy": "fast-text",
  114. "syntheticReason": "确定性触发首 token 前签名拒绝,验证请求副本修复和零退避一次重试。"
  115. },
  116. {
  117. "id": "anthropic-reasoning-http-signature-retry-success",
  118. "kind": "main",
  119. "source": "synthetic",
  120. "timingPolicy": "fast-text",
  121. "syntheticReason": "matcher 证明第二 attempt 只移除 signed/redacted,保留 unsigned 与普通回答。"
  122. },
  123. {
  124. "id": "anthropic-reasoning-retry-stays-stripped",
  125. "kind": "main",
  126. "source": "synthetic",
  127. "timingPolicy": "fast-text",
  128. "syntheticReason": "matcher 证明修复结果记在历史里:下一请求直接按修复后的前缀发送,不会再被拒一次。"
  129. },
  130. {
  131. "id": "anthropic-reasoning-retry-stripped-after-restart",
  132. "kind": "main",
  133. "source": "synthetic",
  134. "timingPolicy": "fast-text",
  135. "syntheticReason": "matcher 证明修复标记随 assistant 持久化,冷恢复后投影不变。"
  136. },
  137. {
  138. "id": "anthropic-reasoning-sse-signature-400",
  139. "kind": "main",
  140. "source": "synthetic",
  141. "timingPolicy": "fast-text",
  142. "syntheticReason": "覆盖错误来自 stream consume 而非 HTTP setup 的同一签名修复入口。"
  143. },
  144. {
  145. "id": "anthropic-reasoning-sse-signature-retry-success",
  146. "kind": "main",
  147. "source": "synthetic",
  148. "timingPolicy": "fast-text",
  149. "syntheticReason": "第二 attempt 的 matcher 与 HTTP 分支相同,保证两条错误入口使用同一修复投影。"
  150. },
  151. {
  152. "id": "anthropic-reasoning-unrelated-400",
  153. "kind": "main",
  154. "source": "synthetic",
  155. "timingPolicy": "fast-text",
  156. "syntheticReason": "验证窄化错误文案匹配,其他 invalid_request 不得修改历史或额外请求。"
  157. },
  158. {
  159. "id": "anthropic-reasoning-double-signature-400-first",
  160. "kind": "main",
  161. "source": "synthetic",
  162. "timingPolicy": "fast-text",
  163. "syntheticReason": "首腿允许 request-local repair,maxMatches 保证下一物理请求进入第二拒绝 fixture。"
  164. },
  165. {
  166. "id": "anthropic-reasoning-double-signature-400-second",
  167. "kind": "main",
  168. "source": "synthetic",
  169. "timingPolicy": "fast-text",
  170. "syntheticReason": "第二腿要求 signed/redacted 已删除,并再次返回相同 400 验证 one-shot 上限。"
  171. },
  172. {
  173. "id": "anthropic-reasoning-visible-signature-error",
  174. "kind": "main",
  175. "source": "synthetic",
  176. "timingPolicy": "controlled-stream",
  177. "syntheticReason": "Bug 根因:覆盖率插桩下 180ms 不足以保证 AI SDK 消费已结束的 text block,错误会先到达并被误判为 pre-output;保留 5s 消费窗口后再注入签名错误,验证已提交可见输出时不得重试。"
  178. },
  179. {
  180. "id": "anthropic-reasoning-unsigned-only-seed",
  181. "kind": "main",
  182. "source": "synthetic",
  183. "timingPolicy": "fast-text",
  184. "syntheticReason": "持久化只有 unsigned reasoning 的旧会话,并在完整重启后验证 cold replay。"
  185. },
  186. {
  187. "id": "anthropic-reasoning-no-change-signature-400",
  188. "kind": "main",
  189. "source": "synthetic",
  190. "timingPolicy": "fast-text",
  191. "syntheticReason": "冷恢复的 unsigned reasoning 会先发给 provider;既有清理无变化,因此必须只有一个物理 attempt。"
  192. }
  193. ]
  194. }