conversation-session-hook-trust.json 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-hook-trust",
  4. "spec": "./test/e2e/conversation-session/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": [
  20. "E2E_HOOK_TRUST: reply with ok"
  21. ],
  22. "bodyExcludes": [
  23. "Generate a concise title"
  24. ]
  25. },
  26. "response": {
  27. "statusCode": 200,
  28. "text": {
  29. "id": "upstream-e2e-hook-trust-first",
  30. "inputTokens": 60,
  31. "outputTokens": 6,
  32. "text": "ok"
  33. }
  34. }
  35. },
  36. {
  37. "id": "hook-trust-second",
  38. "description": "HK07 same-task turn after trusting UserPromptSubmit: the trusted hook runs without backfilling SessionStart.",
  39. "metadata": {
  40. "kind": "main",
  41. "timingPolicy": "fast-text",
  42. "source": "synthetic",
  43. "syntheticReason": "Execution evidence lives in executions.jsonl; the model reply only needs to complete the turn."
  44. },
  45. "maxMatches": 1,
  46. "match": {
  47. "method": "POST",
  48. "pathIncludes": "/messages",
  49. "bodyIncludes": [
  50. "E2E_HOOK_TRUST second prompt: reply with ok"
  51. ],
  52. "bodyExcludes": [
  53. "Generate a concise title"
  54. ]
  55. },
  56. "response": {
  57. "statusCode": 200,
  58. "text": {
  59. "id": "upstream-e2e-hook-trust-second",
  60. "inputTokens": 80,
  61. "outputTokens": 6,
  62. "text": "ok"
  63. }
  64. }
  65. },
  66. {
  67. "id": "hook-trust-new-task",
  68. "description": "HK07 new-task turn: natural SessionStart runs the trusted declaration once.",
  69. "metadata": {
  70. "kind": "main",
  71. "timingPolicy": "fast-text",
  72. "source": "synthetic",
  73. "syntheticReason": "New-task cold start loads persisted Trust; SessionStart evidence is asserted from executions.jsonl."
  74. },
  75. "maxMatches": 1,
  76. "match": {
  77. "method": "POST",
  78. "pathIncludes": "/messages",
  79. "bodyIncludes": [
  80. "E2E_HOOK_TRUST new task: reply with ok"
  81. ],
  82. "bodyExcludes": [
  83. "Generate a concise title"
  84. ]
  85. },
  86. "response": {
  87. "statusCode": 200,
  88. "text": {
  89. "id": "upstream-e2e-hook-trust-new-task",
  90. "inputTokens": 70,
  91. "outputTokens": 6,
  92. "text": "ok"
  93. }
  94. }
  95. }
  96. ]
  97. }