conversation-session-hook-trust.json 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-hook-trust",
  4. "spec": "./test/e2e/conversation-session/hooks/conversation-session-hook-trust.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "hook-trust-first",
  8. "description": "HK05 soft-gate turn: pending hooks are skipped without blocking the reply.",
  9. "metadata": {
  10. "kind": "main",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "The turn only proves the soft gate does not block; hook behavior is asserted from executions.jsonl on disk."
  14. },
  15. "maxMatches": 1,
  16. "match": {
  17. "method": "POST",
  18. "pathIncludes": "/messages",
  19. "bodyIncludes": ["E2E_HOOK_TRUST: reply with ok"],
  20. "bodyExcludes": ["Generate a concise title"]
  21. },
  22. "response": {
  23. "statusCode": 200,
  24. "text": {
  25. "id": "upstream-e2e-hook-trust-first",
  26. "inputTokens": 60,
  27. "outputTokens": 6,
  28. "text": "ok"
  29. }
  30. }
  31. },
  32. {
  33. "id": "hook-trust-second",
  34. "description": "HK07 same-task turn after trusting UserPromptSubmit: the trusted hook runs without backfilling SessionStart.",
  35. "metadata": {
  36. "kind": "main",
  37. "timingPolicy": "fast-text",
  38. "source": "synthetic",
  39. "syntheticReason": "Execution evidence lives in executions.jsonl; the model reply only needs to complete the turn."
  40. },
  41. "maxMatches": 1,
  42. "match": {
  43. "method": "POST",
  44. "pathIncludes": "/messages",
  45. "bodyIncludes": ["E2E_HOOK_TRUST second prompt: reply with ok"],
  46. "bodyExcludes": ["Generate a concise title"]
  47. },
  48. "response": {
  49. "statusCode": 200,
  50. "text": {
  51. "id": "upstream-e2e-hook-trust-second",
  52. "inputTokens": 80,
  53. "outputTokens": 6,
  54. "text": "ok"
  55. }
  56. }
  57. },
  58. {
  59. "id": "hook-trust-new-task",
  60. "description": "HK07 new-task turn: natural SessionStart runs the trusted declaration once.",
  61. "metadata": {
  62. "kind": "main",
  63. "timingPolicy": "fast-text",
  64. "source": "synthetic",
  65. "syntheticReason": "New-task cold start loads persisted Trust; SessionStart evidence is asserted from executions.jsonl."
  66. },
  67. "maxMatches": 1,
  68. "match": {
  69. "method": "POST",
  70. "pathIncludes": "/messages",
  71. "bodyIncludes": ["E2E_HOOK_TRUST new task: reply with ok"],
  72. "bodyExcludes": ["Generate a concise title"]
  73. },
  74. "response": {
  75. "statusCode": 200,
  76. "text": {
  77. "id": "upstream-e2e-hook-trust-new-task",
  78. "inputTokens": 70,
  79. "outputTokens": 6,
  80. "text": "ok"
  81. }
  82. }
  83. }
  84. ]
  85. }