@clowder-ai/plugin-contract 0.1.0-beta.2 → 0.1.0-beta.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/dist/codegen/generate-contract.d.ts +10 -0
  2. package/dist/codegen/generate-contract.d.ts.map +1 -1
  3. package/dist/codegen/generate-contract.js +201 -19
  4. package/dist/codegen/generate-contract.js.map +1 -1
  5. package/dist/conformance/fixtures.d.ts +11 -0
  6. package/dist/conformance/fixtures.d.ts.map +1 -0
  7. package/dist/conformance/fixtures.js +9 -0
  8. package/dist/conformance/fixtures.js.map +1 -0
  9. package/dist/conformance/index.d.ts +4 -0
  10. package/dist/conformance/index.d.ts.map +1 -1
  11. package/dist/conformance/index.js +3 -0
  12. package/dist/conformance/index.js.map +1 -1
  13. package/dist/conformance/messaging-behavior-fixture.d.ts +12 -0
  14. package/dist/conformance/messaging-behavior-fixture.d.ts.map +1 -0
  15. package/dist/conformance/messaging-behavior-fixture.js +30 -0
  16. package/dist/conformance/messaging-behavior-fixture.js.map +1 -0
  17. package/dist/conformance/runner.d.ts.map +1 -1
  18. package/dist/conformance/runner.js +22 -2
  19. package/dist/conformance/runner.js.map +1 -1
  20. package/dist/conformance/stdio-harness/child-process-harness.d.ts +65 -0
  21. package/dist/conformance/stdio-harness/child-process-harness.d.ts.map +1 -0
  22. package/dist/conformance/stdio-harness/child-process-harness.js +296 -0
  23. package/dist/conformance/stdio-harness/child-process-harness.js.map +1 -0
  24. package/dist/conformance/stdio-harness/dual-transport-oracle.d.ts +26 -0
  25. package/dist/conformance/stdio-harness/dual-transport-oracle.d.ts.map +1 -0
  26. package/dist/conformance/stdio-harness/dual-transport-oracle.js +32 -0
  27. package/dist/conformance/stdio-harness/dual-transport-oracle.js.map +1 -0
  28. package/dist/conformance/stdio-harness/harness-process-spawn.d.ts +27 -0
  29. package/dist/conformance/stdio-harness/harness-process-spawn.d.ts.map +1 -0
  30. package/dist/conformance/stdio-harness/harness-process-spawn.js +43 -0
  31. package/dist/conformance/stdio-harness/harness-process-spawn.js.map +1 -0
  32. package/dist/conformance/stdio-harness/index.d.ts +5 -0
  33. package/dist/conformance/stdio-harness/index.d.ts.map +1 -0
  34. package/dist/conformance/stdio-harness/index.js +4 -0
  35. package/dist/conformance/stdio-harness/index.js.map +1 -0
  36. package/dist/conformance/stdio-harness/ndjson-frame.d.ts +31 -0
  37. package/dist/conformance/stdio-harness/ndjson-frame.d.ts.map +1 -0
  38. package/dist/conformance/stdio-harness/ndjson-frame.js +125 -0
  39. package/dist/conformance/stdio-harness/ndjson-frame.js.map +1 -0
  40. package/dist/conformance/stdio-harness/node-process-tree-runtime.d.ts +15 -0
  41. package/dist/conformance/stdio-harness/node-process-tree-runtime.d.ts.map +1 -0
  42. package/dist/conformance/stdio-harness/node-process-tree-runtime.js +78 -0
  43. package/dist/conformance/stdio-harness/node-process-tree-runtime.js.map +1 -0
  44. package/dist/conformance/stdio-harness/process-tree-controller.d.ts +51 -0
  45. package/dist/conformance/stdio-harness/process-tree-controller.d.ts.map +1 -0
  46. package/dist/conformance/stdio-harness/process-tree-controller.js +162 -0
  47. package/dist/conformance/stdio-harness/process-tree-controller.js.map +1 -0
  48. package/dist/conformance/stdio-harness/windows-sentinel.d.ts +15 -0
  49. package/dist/conformance/stdio-harness/windows-sentinel.d.ts.map +1 -0
  50. package/dist/conformance/stdio-harness/windows-sentinel.js +160 -0
  51. package/dist/conformance/stdio-harness/windows-sentinel.js.map +1 -0
  52. package/dist/conformance/stdio-harness/wire-shape.d.ts +18 -0
  53. package/dist/conformance/stdio-harness/wire-shape.d.ts.map +1 -0
  54. package/dist/conformance/stdio-harness/wire-shape.js +2 -0
  55. package/dist/conformance/stdio-harness/wire-shape.js.map +1 -0
  56. package/dist/docx-materialization.d.ts +8 -0
  57. package/dist/docx-materialization.d.ts.map +1 -0
  58. package/dist/docx-materialization.js +19 -0
  59. package/dist/docx-materialization.js.map +1 -0
  60. package/dist/generated/contract.generated.d.ts +984 -12
  61. package/dist/generated/contract.generated.d.ts.map +1 -1
  62. package/dist/generated/contract.generated.js +9 -1
  63. package/dist/generated/contract.generated.js.map +1 -1
  64. package/dist/index.d.ts +3 -1
  65. package/dist/index.d.ts.map +1 -1
  66. package/dist/index.js +5 -1
  67. package/dist/index.js.map +1 -1
  68. package/dist/validation/catalog.d.ts +21 -0
  69. package/dist/validation/catalog.d.ts.map +1 -0
  70. package/dist/validation/catalog.js +140 -0
  71. package/dist/validation/catalog.js.map +1 -0
  72. package/dist/validation/companion-bridge.d.ts +6 -0
  73. package/dist/validation/companion-bridge.d.ts.map +1 -0
  74. package/dist/validation/companion-bridge.js +70 -0
  75. package/dist/validation/companion-bridge.js.map +1 -0
  76. package/dist/validation/docx-materialization.d.ts +6 -0
  77. package/dist/validation/docx-materialization.d.ts.map +1 -0
  78. package/dist/validation/docx-materialization.js +36 -0
  79. package/dist/validation/docx-materialization.js.map +1 -0
  80. package/dist/validation/index.d.ts +6 -0
  81. package/dist/validation/index.d.ts.map +1 -1
  82. package/dist/validation/index.js +6 -0
  83. package/dist/validation/index.js.map +1 -1
  84. package/dist/validation/manifest.d.ts +23 -0
  85. package/dist/validation/manifest.d.ts.map +1 -0
  86. package/dist/validation/manifest.js +160 -0
  87. package/dist/validation/manifest.js.map +1 -0
  88. package/dist/validation/messaging-semantic.d.ts.map +1 -1
  89. package/dist/validation/messaging-semantic.js +49 -0
  90. package/dist/validation/messaging-semantic.js.map +1 -1
  91. package/dist/validation/messaging-wire.d.ts +38 -0
  92. package/dist/validation/messaging-wire.d.ts.map +1 -0
  93. package/dist/validation/messaging-wire.js +164 -0
  94. package/dist/validation/messaging-wire.js.map +1 -0
  95. package/dist/validation/signals.d.ts +26 -0
  96. package/dist/validation/signals.d.ts.map +1 -0
  97. package/dist/validation/signals.js +206 -0
  98. package/dist/validation/signals.js.map +1 -0
  99. package/dist/wire/constants.d.ts +36 -0
  100. package/dist/wire/constants.d.ts.map +1 -0
  101. package/dist/wire/constants.js +36 -0
  102. package/dist/wire/constants.js.map +1 -0
  103. package/dist/wire/disposition-fixtures.d.ts +118 -0
  104. package/dist/wire/disposition-fixtures.d.ts.map +1 -0
  105. package/dist/wire/disposition-fixtures.js +1881 -0
  106. package/dist/wire/disposition-fixtures.js.map +1 -0
  107. package/dist/wire/disposition.d.ts +102 -0
  108. package/dist/wire/disposition.d.ts.map +1 -0
  109. package/dist/wire/disposition.js +217 -0
  110. package/dist/wire/disposition.js.map +1 -0
  111. package/dist/wire/envelope.d.ts +253 -0
  112. package/dist/wire/envelope.d.ts.map +1 -0
  113. package/dist/wire/envelope.js +19 -0
  114. package/dist/wire/envelope.js.map +1 -0
  115. package/dist/wire/errors.d.ts +222 -0
  116. package/dist/wire/errors.d.ts.map +1 -0
  117. package/dist/wire/errors.js +153 -0
  118. package/dist/wire/errors.js.map +1 -0
  119. package/dist/wire/grants.d.ts +57 -0
  120. package/dist/wire/grants.d.ts.map +1 -0
  121. package/dist/wire/grants.js +59 -0
  122. package/dist/wire/grants.js.map +1 -0
  123. package/dist/wire/handshake-byte-bounds.d.ts +69 -0
  124. package/dist/wire/handshake-byte-bounds.d.ts.map +1 -0
  125. package/dist/wire/handshake-byte-bounds.js +173 -0
  126. package/dist/wire/handshake-byte-bounds.js.map +1 -0
  127. package/dist/wire/handshake.d.ts +146 -0
  128. package/dist/wire/handshake.d.ts.map +1 -0
  129. package/dist/wire/handshake.js +189 -0
  130. package/dist/wire/handshake.js.map +1 -0
  131. package/dist/wire/index.d.ts +37 -0
  132. package/dist/wire/index.d.ts.map +1 -0
  133. package/dist/wire/index.js +61 -0
  134. package/dist/wire/index.js.map +1 -0
  135. package/dist/wire/lifecycle-byte-bounds.d.ts +55 -0
  136. package/dist/wire/lifecycle-byte-bounds.d.ts.map +1 -0
  137. package/dist/wire/lifecycle-byte-bounds.js +209 -0
  138. package/dist/wire/lifecycle-byte-bounds.js.map +1 -0
  139. package/dist/wire/messaging-byte-bounds.d.ts +61 -0
  140. package/dist/wire/messaging-byte-bounds.d.ts.map +1 -0
  141. package/dist/wire/messaging-byte-bounds.js +459 -0
  142. package/dist/wire/messaging-byte-bounds.js.map +1 -0
  143. package/dist/wire/registry.d.ts +294 -0
  144. package/dist/wire/registry.d.ts.map +1 -0
  145. package/dist/wire/registry.js +256 -0
  146. package/dist/wire/registry.js.map +1 -0
  147. package/dist/wire/request-id.d.ts +34 -0
  148. package/dist/wire/request-id.d.ts.map +1 -0
  149. package/dist/wire/request-id.js +40 -0
  150. package/dist/wire/request-id.js.map +1 -0
  151. package/dist/wire/row-shapes.d.ts +217 -0
  152. package/dist/wire/row-shapes.d.ts.map +1 -0
  153. package/dist/wire/row-shapes.js +75 -0
  154. package/dist/wire/row-shapes.js.map +1 -0
  155. package/dist/wire/signal-byte-bounds.d.ts +97 -0
  156. package/dist/wire/signal-byte-bounds.d.ts.map +1 -0
  157. package/dist/wire/signal-byte-bounds.js +229 -0
  158. package/dist/wire/signal-byte-bounds.js.map +1 -0
  159. package/dist/wire/wire-uint53.d.ts +26 -0
  160. package/dist/wire/wire-uint53.d.ts.map +1 -0
  161. package/dist/wire/wire-uint53.js +32 -0
  162. package/dist/wire/wire-uint53.js.map +1 -0
  163. package/fixtures/behavior/messaging/adversarial-invariants.json +85 -0
  164. package/fixtures/manifest/invalid/duplicate-signal-type.json +33 -0
  165. package/fixtures/manifest/invalid/icon-package-escape.json +22 -0
  166. package/fixtures/manifest/valid/localized-product-metadata.json +27 -0
  167. package/fixtures/messaging/valid/subscription-delivery.json +1 -1
  168. package/fixtures/signals/invalid/destination-injection.json +15 -0
  169. package/fixtures/signals/invalid/dynamic-schema-url.json +10 -0
  170. package/fixtures/signals/invalid/forbidden-raw-privacy.json +10 -0
  171. package/fixtures/signals/invalid/non-utc-occurred-at.json +12 -0
  172. package/fixtures/signals/valid/feishu-meeting-artifact.json +18 -0
  173. package/fixtures/signals/valid/remote-service-declaration.json +10 -0
  174. package/package.json +19 -6
  175. package/src/schemas/behavior-fixture.schema.json +262 -2
  176. package/src/schemas/catalog.schema.json +91 -0
  177. package/src/schemas/companion-bridge.schema.json +1011 -0
  178. package/src/schemas/docx-materialization.schema.json +302 -0
  179. package/src/schemas/manifest.schema.json +490 -4
  180. package/src/schemas/messaging.schema.json +209 -32
  181. package/src/schemas/physical-limb.schema.json +319 -0
  182. package/src/schemas/plugin-metadata.schema.json +62 -0
  183. package/src/schemas/signal.schema.json +129 -0
@@ -0,0 +1,1881 @@
1
+ /**
2
+ * Disposition conformance fixture vectors — machine-readable test data
3
+ * for the pre-dispatch disposition table (T-A through T-M).
4
+ *
5
+ * Mechanized VERBATIM from §3.8-1 of the #1165 frozen plan (rev11,
6
+ * SHA 7e26e5af). Each vector carries:
7
+ * - A raw frame (the input to a pre-dispatch classifier)
8
+ * - Machine-readable pre-state with correlation records + cross-frame oracle
9
+ * - The expected unique T-class assignment
10
+ * - For respond classes: a type-checked closed-arm error envelope
11
+ * - For close/accept classes: null response markers
12
+ *
13
+ * These are DATA — they do not classify. A future classifier
14
+ * implementation would be tested against these vectors.
15
+ *
16
+ * Coverage per §3.8-1 (frozen enumerations, not arbitrary counts):
17
+ * - 9 response-candidate sub-cases (RESPONSE_CANDIDATE_CASES)
18
+ * "your R9 correction #5's five required cases plus four controls"
19
+ * - 7 notification-partition sub-cases (NOTIFICATION_PARTITION_CASES)
20
+ * "your correction #4's five, the idless-envelope fixture,
21
+ * and the R8 row-10 value-failure fixture"
22
+ * - All 13 T-classes have ≥1 vector
23
+ * - Pre-state mutual-exclusivity proof pairs:
24
+ * ping nonce (T-H-3 / T-L-2), row-9 deliveryId (T-H-9 / T-L-4)
25
+ *
26
+ * Response frames are DERIVED from type-checked ClosedWireErrorResponse
27
+ * objects, not hand-written strings.
28
+ *
29
+ * Partition records carry {vectorId, expectedClass} per case (FC-70-4).
30
+ * Tests verify both existence AND class correctness per key.
31
+ */
32
+ import { BINDING_NONCE_MAX_LENGTH, PLUGIN_ID_MAX_LENGTH, } from './handshake.js';
33
+ import { VALID_CAPABILITIES } from './grants.js';
34
+ import { PING_NONCE_MAX_LENGTH } from './row-shapes.js';
35
+ import { WIRE_UINT53_MAX } from './wire-uint53.js';
36
+ import { PARSE_ERROR_CODE, PARSE_ERROR_MESSAGE, INVALID_REQUEST_CODE, INVALID_REQUEST_MESSAGE, METHOD_NOT_FOUND_CODE, METHOD_NOT_FOUND_MESSAGE, INVALID_PARAMS_CODE, INVALID_PARAMS_MESSAGE, HANDSHAKE_REJECTED_CODE, HANDSHAKE_REJECTED_MESSAGE, DEADLINE_EXPIRED_CODE, DEADLINE_EXPIRED_MESSAGE, } from './errors.js';
37
+ // ---------------------------------------------------------------------------
38
+ // Closed error arm names — the 11 concrete envelope types from envelope.ts
39
+ // ---------------------------------------------------------------------------
40
+ export const CLOSED_ERROR_ARM_NAMES = [
41
+ 'ParseErrorEnvelope',
42
+ 'InvalidRequestNullIdEnvelope',
43
+ 'InvalidRequestValidIdEnvelope',
44
+ 'MethodNotFoundEnvelope',
45
+ 'InvalidParamsEnvelope',
46
+ 'InternalErrorEnvelope',
47
+ 'HandshakeRejectedEnvelope',
48
+ 'DeliveryRejectedEnvelope',
49
+ 'DomainErrorEnvelope',
50
+ 'DeadlineExpiredEnvelope',
51
+ 'SnapshotUnavailableEnvelope',
52
+ ];
53
+ // ---------------------------------------------------------------------------
54
+ // Type-checked response envelopes
55
+ // ---------------------------------------------------------------------------
56
+ const RESPONSE_PARSE_ERROR = {
57
+ jsonrpc: '2.0',
58
+ id: null,
59
+ error: { code: PARSE_ERROR_CODE, message: PARSE_ERROR_MESSAGE },
60
+ };
61
+ const RESPONSE_INVALID_REQUEST_NULL = {
62
+ jsonrpc: '2.0',
63
+ id: null,
64
+ error: { code: INVALID_REQUEST_CODE, message: INVALID_REQUEST_MESSAGE },
65
+ };
66
+ const RESPONSE_INVALID_REQUEST_A = {
67
+ jsonrpc: '2.0',
68
+ id: 'a',
69
+ error: { code: INVALID_REQUEST_CODE, message: INVALID_REQUEST_MESSAGE },
70
+ };
71
+ const RESPONSE_METHOD_NOT_FOUND_A = {
72
+ jsonrpc: '2.0',
73
+ id: 'a',
74
+ error: { code: METHOD_NOT_FOUND_CODE, message: METHOD_NOT_FOUND_MESSAGE },
75
+ };
76
+ const RESPONSE_INVALID_PARAMS_A = {
77
+ jsonrpc: '2.0',
78
+ id: 'a',
79
+ error: { code: INVALID_PARAMS_CODE, message: INVALID_PARAMS_MESSAGE },
80
+ };
81
+ const RESPONSE_HANDSHAKE_REJECTED_AUTHORITY_A = {
82
+ jsonrpc: '2.0',
83
+ id: 'a',
84
+ error: {
85
+ code: HANDSHAKE_REJECTED_CODE,
86
+ message: HANDSHAKE_REJECTED_MESSAGE,
87
+ data: { reason: 'AUTHORITY_VIOLATION' },
88
+ },
89
+ };
90
+ const RESPONSE_DEADLINE_EXPIRED_DRAIN = {
91
+ jsonrpc: '2.0',
92
+ id: 'drain-deadline',
93
+ error: {
94
+ code: DEADLINE_EXPIRED_CODE,
95
+ message: DEADLINE_EXPIRED_MESSAGE,
96
+ data: {},
97
+ },
98
+ };
99
+ const BETA8_HELLO = {
100
+ pluginId: 'example.loopback',
101
+ packageDigest: `sha512-${'A'.repeat(86)}==`,
102
+ contractVersion: '0.1.0-beta.8',
103
+ wireVersion: '0.1.0',
104
+ };
105
+ const RAW_UTF8_BOUNDARY_CODE_POINTS = {
106
+ ascii: 'a',
107
+ multibyte: '😀',
108
+ escaping: '\u0000',
109
+ };
110
+ const ALL_CAPABILITY_VALUES = [...VALID_CAPABILITIES];
111
+ const BETA8_BINDING = {
112
+ ...BETA8_HELLO,
113
+ pluginInstanceId: 'instance-1',
114
+ brokerSessionId: 'session-1',
115
+ grantRevision: 0,
116
+ effectiveGrants: [],
117
+ bindingNonce: 'nonce-1',
118
+ };
119
+ const RESPONSE_HANDSHAKE_REJECTED_HELLO = {
120
+ jsonrpc: '2.0',
121
+ id: 'hello-error',
122
+ error: {
123
+ code: HANDSHAKE_REJECTED_CODE,
124
+ message: HANDSHAKE_REJECTED_MESSAGE,
125
+ data: { reason: 'PACKAGE_MISMATCH' },
126
+ },
127
+ };
128
+ function helloRequestFrame(id, input) {
129
+ return JSON.stringify({
130
+ jsonrpc: '2.0',
131
+ id,
132
+ method: 'broker.hello',
133
+ params: { meta: { deadlineUnixMs: 1 }, input },
134
+ });
135
+ }
136
+ function readyRequestFrame(id, input) {
137
+ return JSON.stringify({
138
+ jsonrpc: '2.0',
139
+ id,
140
+ method: 'broker.ready',
141
+ params: { meta: { deadlineUnixMs: 1 }, input },
142
+ });
143
+ }
144
+ function helloResultFrame(id, result) {
145
+ return JSON.stringify({ jsonrpc: '2.0', id, result });
146
+ }
147
+ function lifecycleRequestFrame(id, method, input) {
148
+ return JSON.stringify({
149
+ jsonrpc: '2.0',
150
+ id,
151
+ method,
152
+ params: { meta: { deadlineUnixMs: WIRE_UINT53_MAX }, input },
153
+ });
154
+ }
155
+ function grantsChangedNotificationFrame(effectiveGrants) {
156
+ return JSON.stringify({
157
+ jsonrpc: '2.0',
158
+ method: 'host.grants.changed',
159
+ params: {
160
+ meta: { deadlineUnixMs: WIRE_UINT53_MAX },
161
+ input: { grantRevision: WIRE_UINT53_MAX, effectiveGrants },
162
+ },
163
+ });
164
+ }
165
+ function messagingRequestFrame(id, method, input) {
166
+ return JSON.stringify({
167
+ jsonrpc: '2.0',
168
+ id,
169
+ method,
170
+ params: { meta: { deadlineUnixMs: WIRE_UINT53_MAX }, input },
171
+ });
172
+ }
173
+ const M0C_DRAFT = {
174
+ address: { kind: 'thread_handle', handle: 'thread-handle-1' },
175
+ idempotencyKey: 'send-1',
176
+ payload: {
177
+ provenance: { epistemicStatus: 'inference' },
178
+ elements: [
179
+ { elementId: 'element-1', kind: 'text', payload: { text: 'hello' } },
180
+ ],
181
+ },
182
+ };
183
+ const M0C_ENVELOPE = {
184
+ messageId: 'message-1',
185
+ revision: 1,
186
+ threadId: 'thread-1',
187
+ actor: { kind: 'user', id: 'user-1' },
188
+ audience: { kind: 'public' },
189
+ occurredAt: '2026-08-18T03:00:00.000Z',
190
+ payload: {
191
+ provenance: {
192
+ origin: { kind: 'host' },
193
+ epistemicStatus: 'user_intent',
194
+ },
195
+ elements: [
196
+ { elementId: 'element-1', kind: 'text', payload: { text: 'hello' } },
197
+ ],
198
+ },
199
+ };
200
+ const M0C_PUBLISH_EVENT = {
201
+ eventId: 'event-1',
202
+ sequence: 1,
203
+ type: 'message.publish',
204
+ envelope: M0C_ENVELOPE,
205
+ };
206
+ /**
207
+ * 9 response-candidate sub-cases per §3.8-1:
208
+ * "your R9 correction #5's five required cases plus four controls"
209
+ *
210
+ * A "response candidate" enters the response lane: no method + at least
211
+ * one of result/error. Controls prove the boundary: frames with method
212
+ * that exit to T-F/T-K/T-D despite carrying result/error.
213
+ */
214
+ export const RESPONSE_CANDIDATE_CASES = {
215
+ /** §3.8-1 RC required #1: missing-id success shape → T-H close */
216
+ 'rc-1-missing-id-success': { vectorId: 'T-H-7', expectedClass: 'T-H' },
217
+ /** §3.8-1 RC required #2: missing-id error shape → T-H close */
218
+ 'rc-2-missing-id-error': { vectorId: 'T-H-8', expectedClass: 'T-H' },
219
+ /** §3.8-1 RC required #3: invalid/malformed-id → T-H close */
220
+ 'rc-3-invalid-id': { vectorId: 'T-H-6', expectedClass: 'T-H' },
221
+ /** §3.8-1 RC required #4: schema-valid correlated WireSuccessResponse → T-L */
222
+ 'rc-4-settled-valid': { vectorId: 'T-L-1', expectedClass: 'T-L' },
223
+ /** §3.8-1 RC required #5: row-9 ack wrong deliveryId → T-H, never T-L */
224
+ 'rc-5-row9-wrong-deliveryid': { vectorId: 'T-H-9', expectedClass: 'T-H' },
225
+ /** §3.8-1 RC control #6: method-bearing Request + extra result → T-F */
226
+ 'rc-6-request-extra-result': { vectorId: 'T-F-4', expectedClass: 'T-F' },
227
+ /** §3.8-1 RC control #7: idless Notification + extra error → T-K */
228
+ 'rc-7-notification-extra-error': { vectorId: 'T-K-4', expectedClass: 'T-K' },
229
+ /** §3.8-1 RC control #8: structurally-invalid method:0+result → T-D */
230
+ 'rc-8-invalid-method-result': { vectorId: 'T-D-3', expectedClass: 'T-D' },
231
+ /** §3.8-1 RC control #9: idless {"jsonrpc":"1.0","method":"x"} → T-D */
232
+ 'rc-9-idless-version-control': { vectorId: 'T-D-5', expectedClass: 'T-D' },
233
+ };
234
+ /**
235
+ * 7 notification-partition sub-cases per §3.8-1:
236
+ * "your correction #4's five, the idless-envelope fixture,
237
+ * and the R8 row-10 value-failure fixture"
238
+ */
239
+ export const NOTIFICATION_PARTITION_CASES = {
240
+ /** §3.8-1 NT #1: legal row-10 notification → T-J accept */
241
+ 'nt-1-legal-row10': { vectorId: 'T-J-1', expectedClass: 'T-J' },
242
+ /** §3.8-1 NT #2: request-only method without id → T-K close */
243
+ 'nt-2-request-method': { vectorId: 'T-K-1', expectedClass: 'T-K' },
244
+ /** §3.8-1 NT #3: unknown method without id → T-K close */
245
+ 'nt-3-unknown-method': { vectorId: 'T-K-3', expectedClass: 'T-K' },
246
+ /** §3.8-1 NT #4: structurally valid notification, invalid params → T-K */
247
+ 'nt-4-invalid-params': { vectorId: 'T-K-6', expectedClass: 'T-K' },
248
+ /** §3.8-1 NT #5: idless notification extra/missing envelope member → T-K */
249
+ 'nt-5-envelope-violation': { vectorId: 'T-K-5', expectedClass: 'T-K' },
250
+ /** §3.8-1 NT #6: row-10 deadlineUnixMs:0 value failure (H7/H8) → T-K */
251
+ 'nt-6-value-failure': { vectorId: 'T-K-7', expectedClass: 'T-K' },
252
+ /** §3.8-1 NT #7: structurally invalid idless object → T-D respond */
253
+ 'nt-7-structurally-invalid': { vectorId: 'T-D-1', expectedClass: 'T-D' },
254
+ };
255
+ // ---------------------------------------------------------------------------
256
+ // The fixture vectors (35 total)
257
+ // ---------------------------------------------------------------------------
258
+ export const DISPOSITION_FIXTURE_VECTORS = [
259
+ // ═════════════════════════════════════════════════════════════════════════
260
+ // PRE-STRUCTURAL (T-A, T-B, T-C)
261
+ // ═════════════════════════════════════════════════════════════════════════
262
+ {
263
+ id: 'T-A-1',
264
+ rawFrame: 'ff',
265
+ rawFrameEncoding: 'hex',
266
+ preState: { inFlightRequests: [] },
267
+ expectedClass: 'T-A',
268
+ expectedOutcome: 'close',
269
+ expectedErrorArm: null,
270
+ expectedErrorCode: null,
271
+ expectedResponseFrame: null,
272
+ description: 'transport/framing failure: invalid UTF-8 byte 0xFF',
273
+ },
274
+ {
275
+ id: 'T-B-1',
276
+ rawFrame: '{invalid json',
277
+ rawFrameEncoding: 'utf8',
278
+ preState: { inFlightRequests: [] },
279
+ expectedClass: 'T-B',
280
+ expectedOutcome: 'respond',
281
+ expectedErrorArm: 'ParseErrorEnvelope',
282
+ expectedErrorCode: -32700,
283
+ expectedResponseFrame: JSON.stringify(RESPONSE_PARSE_ERROR),
284
+ description: 'JSON parse error: malformed JSON input',
285
+ },
286
+ {
287
+ id: 'T-C-1',
288
+ rawFrame: '{ "jsonrpc":"2.0" }',
289
+ rawFrameEncoding: 'utf8',
290
+ preState: { inFlightRequests: [] },
291
+ expectedClass: 'T-C',
292
+ expectedOutcome: 'close',
293
+ expectedErrorArm: null,
294
+ expectedErrorCode: null,
295
+ expectedResponseFrame: null,
296
+ description: 'frame-canonicality failure: whitespace in compact JSON',
297
+ },
298
+ {
299
+ id: 'T-C-2',
300
+ rawFrame: helloResultFrame('hello-h7-negative', {
301
+ ...BETA8_BINDING,
302
+ grantRevision: -1,
303
+ }),
304
+ rawFrameEncoding: 'utf8',
305
+ preState: { inFlightRequests: [{ id: 'hello-h7-negative', method: 'broker.hello', requestSnapshot: { candidateHello: BETA8_HELLO } }] },
306
+ expectedClass: 'T-C',
307
+ expectedOutcome: 'close',
308
+ expectedErrorArm: null,
309
+ expectedErrorCode: null,
310
+ expectedResponseFrame: null,
311
+ zeroSideEffects: true,
312
+ description: '[beta.8 H7 raw token] negative SessionBinding grantRevision is rejected at canonicality before correlation',
313
+ },
314
+ {
315
+ id: 'T-C-3',
316
+ rawFrame: messagingRequestFrame('read-fractional', 'messaging.read', {
317
+ subscriptionId: 'subscription-1',
318
+ limit: 1.5,
319
+ }),
320
+ rawFrameEncoding: 'utf8',
321
+ preState: { inFlightRequests: [] },
322
+ expectedClass: 'T-C',
323
+ expectedOutcome: 'close',
324
+ expectedErrorArm: null,
325
+ expectedErrorCode: null,
326
+ expectedResponseFrame: null,
327
+ zeroSideEffects: true,
328
+ description: '[beta.11 messaging] fractional read limit is rejected at canonicality before method validation',
329
+ },
330
+ // ═════════════════════════════════════════════════════════════════════════
331
+ // T-D: canonical idless NON-response-candidate, NOT a valid Request
332
+ // object (missing/non-string jsonrpc/method)
333
+ //
334
+ // §3.8-1: "not a valid JSON-RPC Request object at all"
335
+ // Frozen vectors: NT-7 (T-D-1), RC-8 (T-D-3), RC-9 (T-D-5)
336
+ // Additional: T-D-2 (wrong jsonrpc version variant)
337
+ // ═════════════════════════════════════════════════════════════════════════
338
+ {
339
+ id: 'T-D-1',
340
+ rawFrame: '{"jsonrpc":"2.0","method":0}',
341
+ rawFrameEncoding: 'utf8',
342
+ preState: { inFlightRequests: [] },
343
+ expectedClass: 'T-D',
344
+ expectedOutcome: 'respond',
345
+ expectedErrorArm: 'InvalidRequestNullIdEnvelope',
346
+ expectedErrorCode: -32600,
347
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_REQUEST_NULL),
348
+ description: '[NT-7] structurally invalid: method is number, not string',
349
+ },
350
+ {
351
+ id: 'T-D-2',
352
+ rawFrame: '{"jsonrpc":"1.0","method":"broker.hello","params":{"meta":{"deadlineUnixMs":1},"input":{}}}',
353
+ rawFrameEncoding: 'utf8',
354
+ preState: { inFlightRequests: [] },
355
+ expectedClass: 'T-D',
356
+ expectedOutcome: 'respond',
357
+ expectedErrorArm: 'InvalidRequestNullIdEnvelope',
358
+ expectedErrorCode: -32600,
359
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_REQUEST_NULL),
360
+ description: 'structurally invalid: wrong jsonrpc version "1.0" (additional NT-7 variant)',
361
+ },
362
+ {
363
+ id: 'T-D-3',
364
+ rawFrame: '{"jsonrpc":"2.0","method":0,"result":null}',
365
+ rawFrameEncoding: 'utf8',
366
+ preState: { inFlightRequests: [] },
367
+ expectedClass: 'T-D',
368
+ expectedOutcome: 'respond',
369
+ expectedErrorArm: 'InvalidRequestNullIdEnvelope',
370
+ expectedErrorCode: -32600,
371
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_REQUEST_NULL),
372
+ description: '[RC-8] response-candidate boundary: method:0+result, method routes to T-D',
373
+ },
374
+ {
375
+ id: 'T-D-5',
376
+ rawFrame: '{"jsonrpc":"1.0","method":"x"}',
377
+ rawFrameEncoding: 'utf8',
378
+ preState: { inFlightRequests: [] },
379
+ expectedClass: 'T-D',
380
+ expectedOutcome: 'respond',
381
+ expectedErrorArm: 'InvalidRequestNullIdEnvelope',
382
+ expectedErrorCode: -32600,
383
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_REQUEST_NULL),
384
+ description: '[RC-9] response-candidate control: idless {"jsonrpc":"1.0","method":"x"} → T-D (not a response candidate)',
385
+ },
386
+ // ═════════════════════════════════════════════════════════════════════════
387
+ // T-E: profile-invalid id on request/notification path
388
+ // ═════════════════════════════════════════════════════════════════════════
389
+ {
390
+ id: 'T-E-1',
391
+ rawFrame: '{"jsonrpc":"2.0","id":"","method":"broker.hello","params":{"meta":{"deadlineUnixMs":1},"input":{}}}',
392
+ rawFrameEncoding: 'utf8',
393
+ preState: { inFlightRequests: [] },
394
+ expectedClass: 'T-E',
395
+ expectedOutcome: 'close',
396
+ expectedErrorArm: null,
397
+ expectedErrorCode: null,
398
+ expectedResponseFrame: null,
399
+ description: 'profile-invalid id on request: empty string violates min length 1',
400
+ },
401
+ // ═════════════════════════════════════════════════════════════════════════
402
+ // T-F: envelope violation (valid id, structural problem)
403
+ // Frozen: RC-6 (T-F-4). Additional: T-F-1, T-F-2, T-F-3.
404
+ // ═════════════════════════════════════════════════════════════════════════
405
+ {
406
+ id: 'T-F-1',
407
+ rawFrame: '{"jsonrpc":"2.0","id":"a","method":"broker.hello"}',
408
+ rawFrameEncoding: 'utf8',
409
+ preState: { inFlightRequests: [] },
410
+ expectedClass: 'T-F',
411
+ expectedOutcome: 'respond',
412
+ expectedErrorArm: 'InvalidRequestValidIdEnvelope',
413
+ expectedErrorCode: -32600,
414
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_REQUEST_A),
415
+ description: 'envelope violation: missing required params field',
416
+ },
417
+ {
418
+ id: 'T-F-2',
419
+ rawFrame: '{"jsonrpc":"2.0","id":"a","method":"unknown.method","params":{"meta":{"deadlineUnixMs":1},"input":{}}}',
420
+ rawFrameEncoding: 'utf8',
421
+ preState: { inFlightRequests: [] },
422
+ expectedClass: 'T-F',
423
+ expectedOutcome: 'respond',
424
+ expectedErrorArm: 'MethodNotFoundEnvelope',
425
+ expectedErrorCode: -32601,
426
+ expectedResponseFrame: JSON.stringify(RESPONSE_METHOD_NOT_FOUND_A),
427
+ description: 'envelope violation: unknown method not in 13-row registry',
428
+ },
429
+ {
430
+ id: 'T-F-3',
431
+ rawFrame: '{"jsonrpc":"2.0","id":"a","method":"broker.hello","params":[]}',
432
+ rawFrameEncoding: 'utf8',
433
+ preState: { inFlightRequests: [] },
434
+ expectedClass: 'T-F',
435
+ expectedOutcome: 'respond',
436
+ expectedErrorArm: 'InvalidParamsEnvelope',
437
+ expectedErrorCode: -32602,
438
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
439
+ description: 'envelope violation: params is array, must be object',
440
+ },
441
+ {
442
+ id: 'T-F-4',
443
+ rawFrame: '{"jsonrpc":"2.0","id":"a","method":"broker.hello","params":{"meta":{"deadlineUnixMs":1},"input":{}},"result":null}',
444
+ rawFrameEncoding: 'utf8',
445
+ preState: { inFlightRequests: [] },
446
+ expectedClass: 'T-F',
447
+ expectedOutcome: 'respond',
448
+ expectedErrorArm: 'InvalidRequestValidIdEnvelope',
449
+ expectedErrorCode: -32600,
450
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_REQUEST_A),
451
+ description: '[RC-6] response-candidate control: Request with extra result member → T-F',
452
+ },
453
+ // ═════════════════════════════════════════════════════════════════════════
454
+ // T-G: value violation (valid envelope, bad params values)
455
+ // ═════════════════════════════════════════════════════════════════════════
456
+ {
457
+ id: 'T-G-1',
458
+ rawFrame: '{"jsonrpc":"2.0","id":"a","method":"host.lifecycle.ping","params":{"meta":{"deadlineUnixMs":1},"input":{"nonce":""}}}',
459
+ rawFrameEncoding: 'utf8',
460
+ preState: { inFlightRequests: [] },
461
+ expectedClass: 'T-G',
462
+ expectedOutcome: 'respond',
463
+ expectedErrorArm: 'InvalidParamsEnvelope',
464
+ expectedErrorCode: -32602,
465
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
466
+ zeroSideEffects: true,
467
+ description: 'value violation: nonce empty string violates minLength 1',
468
+ },
469
+ // ═════════════════════════════════════════════════════════════════════════
470
+ // T-I: in-flight id collision
471
+ // ═════════════════════════════════════════════════════════════════════════
472
+ {
473
+ id: 'T-I-1',
474
+ rawFrame: '{"jsonrpc":"2.0","id":"dup","method":"broker.hello","params":{"meta":{"deadlineUnixMs":1},"input":{}}}',
475
+ rawFrameEncoding: 'utf8',
476
+ preState: { inFlightRequests: [{ id: 'dup', method: 'broker.hello' }] },
477
+ expectedClass: 'T-I',
478
+ expectedOutcome: 'close',
479
+ expectedErrorArm: null,
480
+ expectedErrorCode: null,
481
+ expectedResponseFrame: null,
482
+ description: 'in-flight id collision: id "dup" already in preState',
483
+ },
484
+ // ═════════════════════════════════════════════════════════════════════════
485
+ // NOTIFICATION PARTITION — frozen 7 cases + additional coverage
486
+ //
487
+ // §3.8-1: "once a canonical object is classified as a Notification,
488
+ // no JSON-RPC Response is emitted for any downstream method/params/
489
+ // profile rejection."
490
+ //
491
+ // Frozen cases: T-J-1 (NT-1), T-K-1 (NT-2), T-K-3 (NT-3),
492
+ // T-K-6 (NT-4), T-K-5 (NT-5), T-K-7 (NT-6), T-D-1 (NT-7).
493
+ // Additional: T-J-2, T-K-2.
494
+ // ═════════════════════════════════════════════════════════════════════════
495
+ {
496
+ id: 'T-J-1',
497
+ rawFrame: '{"jsonrpc":"2.0","method":"host.grants.changed","params":{"meta":{"deadlineUnixMs":1},"input":{"grantRevision":0,"effectiveGrants":[]}}}',
498
+ rawFrameEncoding: 'utf8',
499
+ preState: { inFlightRequests: [] },
500
+ expectedClass: 'T-J',
501
+ expectedOutcome: 'accept',
502
+ expectedErrorArm: null,
503
+ expectedErrorCode: null,
504
+ expectedResponseFrame: null,
505
+ description: '[NT-1] legal row-10 grants.changed notification, empty grants',
506
+ },
507
+ {
508
+ id: 'T-J-2',
509
+ rawFrame: '{"jsonrpc":"2.0","method":"host.grants.changed","params":{"meta":{"deadlineUnixMs":1},"input":{"grantRevision":1,"effectiveGrants":["message.event.subscribe"]}}}',
510
+ rawFrameEncoding: 'utf8',
511
+ preState: { inFlightRequests: [] },
512
+ expectedClass: 'T-J',
513
+ expectedOutcome: 'accept',
514
+ expectedErrorArm: null,
515
+ expectedErrorCode: null,
516
+ expectedResponseFrame: null,
517
+ description: 'legal row-10 grants.changed, non-empty grants (additional NT-1 variant)',
518
+ },
519
+ {
520
+ id: 'T-K-1',
521
+ rawFrame: '{"jsonrpc":"2.0","method":"host.lifecycle.ping","params":{"meta":{"deadlineUnixMs":1},"input":{"nonce":"x"}}}',
522
+ rawFrameEncoding: 'utf8',
523
+ preState: { inFlightRequests: [] },
524
+ expectedClass: 'T-K',
525
+ expectedOutcome: 'close',
526
+ expectedErrorArm: null,
527
+ expectedErrorCode: null,
528
+ expectedResponseFrame: null,
529
+ zeroSideEffects: true,
530
+ description: '[NT-2] request-only method (ping, row 11) as notification → v0 violation',
531
+ },
532
+ {
533
+ id: 'T-K-2',
534
+ rawFrame: '{"jsonrpc":"2.0","method":"broker.hello","params":{"meta":{"deadlineUnixMs":1},"input":{}}}',
535
+ rawFrameEncoding: 'utf8',
536
+ preState: { inFlightRequests: [] },
537
+ expectedClass: 'T-K',
538
+ expectedOutcome: 'close',
539
+ expectedErrorArm: null,
540
+ expectedErrorCode: null,
541
+ expectedResponseFrame: null,
542
+ description: 'request-only method (hello, row 1) as notification (additional NT-2 variant)',
543
+ },
544
+ {
545
+ id: 'T-K-3',
546
+ rawFrame: '{"jsonrpc":"2.0","method":"unknown.rpc","params":{"meta":{"deadlineUnixMs":1},"input":{}}}',
547
+ rawFrameEncoding: 'utf8',
548
+ preState: { inFlightRequests: [] },
549
+ expectedClass: 'T-K',
550
+ expectedOutcome: 'close',
551
+ expectedErrorArm: null,
552
+ expectedErrorCode: null,
553
+ expectedResponseFrame: null,
554
+ description: '[NT-3] unknown method as notification → v0 violation',
555
+ },
556
+ {
557
+ id: 'T-K-4',
558
+ rawFrame: '{"jsonrpc":"2.0","method":"host.grants.changed","params":{"meta":{"deadlineUnixMs":1},"input":{"grantRevision":0,"effectiveGrants":[]}},"error":{"code":-32600,"message":"Invalid Request"}}',
559
+ rawFrameEncoding: 'utf8',
560
+ preState: { inFlightRequests: [] },
561
+ expectedClass: 'T-K',
562
+ expectedOutcome: 'close',
563
+ expectedErrorArm: null,
564
+ expectedErrorCode: null,
565
+ expectedResponseFrame: null,
566
+ zeroSideEffects: true,
567
+ description: '[RC-7 / NT-5 variant] Notification with extra error member → T-K close',
568
+ },
569
+ {
570
+ id: 'T-K-5',
571
+ rawFrame: '{"jsonrpc":"2.0","method":"host.grants.changed"}',
572
+ rawFrameEncoding: 'utf8',
573
+ preState: { inFlightRequests: [] },
574
+ expectedClass: 'T-K',
575
+ expectedOutcome: 'close',
576
+ expectedErrorArm: null,
577
+ expectedErrorCode: null,
578
+ expectedResponseFrame: null,
579
+ zeroSideEffects: true,
580
+ description: '[NT-5] Notification missing params → idless envelope violation → T-K close',
581
+ },
582
+ {
583
+ id: 'T-K-6',
584
+ rawFrame: '{"jsonrpc":"2.0","method":"host.grants.changed","params":{"meta":{"deadlineUnixMs":1},"input":{"grantRevision":"not-a-number","effectiveGrants":[]}}}',
585
+ rawFrameEncoding: 'utf8',
586
+ preState: { inFlightRequests: [] },
587
+ expectedClass: 'T-K',
588
+ expectedOutcome: 'close',
589
+ expectedErrorArm: null,
590
+ expectedErrorCode: null,
591
+ expectedResponseFrame: null,
592
+ zeroSideEffects: true,
593
+ description: '[NT-4] structurally valid Notification, invocation-level invalid params (grantRevision wrong type)',
594
+ },
595
+ {
596
+ id: 'T-K-7',
597
+ rawFrame: '{"jsonrpc":"2.0","method":"host.grants.changed","params":{"meta":{"deadlineUnixMs":0},"input":{"grantRevision":0,"effectiveGrants":[]}}}',
598
+ rawFrameEncoding: 'utf8',
599
+ preState: { inFlightRequests: [] },
600
+ expectedClass: 'T-K',
601
+ expectedOutcome: 'close',
602
+ expectedErrorArm: null,
603
+ expectedErrorCode: null,
604
+ expectedResponseFrame: null,
605
+ zeroSideEffects: true,
606
+ description: '[NT-6] row-10 notification with deadlineUnixMs:0 → value failure (H7), T-K close',
607
+ },
608
+ // ═════════════════════════════════════════════════════════════════════════
609
+ // RESPONSE-CANDIDATE PARTITION — frozen 9 cases + additional coverage
610
+ //
611
+ // §3.8-1: "an object with no method and at least one of result/error
612
+ // is a response candidate and enters the response lane BEFORE any
613
+ // Request/Notification or ID-profile routing"
614
+ //
615
+ // Frozen cases: T-H-7 (RC-1), T-H-8 (RC-2), T-H-6 (RC-3),
616
+ // T-L-1 (RC-4), T-H-9 (RC-5), T-F-4 (RC-6), T-K-4 (RC-7),
617
+ // T-D-3 (RC-8), T-D-5 (RC-9).
618
+ // Additional coverage: T-H-1..T-H-5, T-L-2..T-L-4 (proof pairs + extras)
619
+ // ═════════════════════════════════════════════════════════════════════════
620
+ // ── T-H: response-candidate validation/correlation failure ────────────
621
+ {
622
+ id: 'T-H-1',
623
+ rawFrame: '{"jsonrpc":"2.0","id":"phantom","result":null}',
624
+ rawFrameEncoding: 'utf8',
625
+ preState: { inFlightRequests: [] },
626
+ expectedClass: 'T-H',
627
+ expectedOutcome: 'close',
628
+ expectedErrorArm: null,
629
+ expectedErrorCode: null,
630
+ expectedResponseFrame: null,
631
+ description: 'response-candidate: phantom id, uncorrelated (additional coverage)',
632
+ },
633
+ {
634
+ id: 'T-H-2',
635
+ rawFrame: '{"jsonrpc":"2.0","id":"x","result":null,"error":{"code":-32603,"message":"Internal error"}}',
636
+ rawFrameEncoding: 'utf8',
637
+ preState: { inFlightRequests: [{ id: 'x', method: 'messaging.subscribe' }] },
638
+ expectedClass: 'T-H',
639
+ expectedOutcome: 'close',
640
+ expectedErrorArm: null,
641
+ expectedErrorCode: null,
642
+ expectedResponseFrame: null,
643
+ zeroSideEffects: true,
644
+ description: 'response-candidate: both result AND error present (additional coverage)',
645
+ },
646
+ // ── MUTUAL-EXCLUSIVITY PROOF PAIR ─────────────────────────────────────
647
+ // T-H-3 and T-L-2 share IDENTICAL rawFrame with schema-valid ping
648
+ // result. Only preState differs. FC-70-3 fix: rawFrame now has valid
649
+ // PingResult {nonce:"x"} instead of null.
650
+ {
651
+ id: 'T-H-3',
652
+ rawFrame: '{"jsonrpc":"2.0","id":"corr-test","result":{"nonce":"x"}}',
653
+ rawFrameEncoding: 'utf8',
654
+ preState: { inFlightRequests: [] },
655
+ expectedClass: 'T-H',
656
+ expectedOutcome: 'close',
657
+ expectedErrorArm: null,
658
+ expectedErrorCode: null,
659
+ expectedResponseFrame: null,
660
+ zeroSideEffects: true,
661
+ description: 'proof pair: "corr-test" NOT in-flight → T-H (see T-L-2)',
662
+ },
663
+ {
664
+ id: 'T-H-4',
665
+ rawFrame: '{"jsonrpc":"2.0","id":"lost-req","error":{"code":-32602,"message":"Invalid params"}}',
666
+ rawFrameEncoding: 'utf8',
667
+ preState: { inFlightRequests: [] },
668
+ expectedClass: 'T-H',
669
+ expectedOutcome: 'close',
670
+ expectedErrorArm: null,
671
+ expectedErrorCode: null,
672
+ expectedResponseFrame: null,
673
+ description: 'response-candidate: uncorrelated error (additional coverage)',
674
+ },
675
+ {
676
+ id: 'T-H-5',
677
+ rawFrame: '{"jsonrpc":"2.0","id":"r1","error":"not an object"}',
678
+ rawFrameEncoding: 'utf8',
679
+ preState: { inFlightRequests: [{ id: 'r1', method: 'messaging.subscribe' }] },
680
+ expectedClass: 'T-H',
681
+ expectedOutcome: 'close',
682
+ expectedErrorArm: null,
683
+ expectedErrorCode: null,
684
+ expectedResponseFrame: null,
685
+ zeroSideEffects: true,
686
+ description: 'response-candidate: error body is string not object (additional coverage)',
687
+ },
688
+ {
689
+ id: 'T-H-6',
690
+ rawFrame: '{"jsonrpc":"2.0","id":42,"result":null}',
691
+ rawFrameEncoding: 'utf8',
692
+ preState: { inFlightRequests: [] },
693
+ expectedClass: 'T-H',
694
+ expectedOutcome: 'close',
695
+ expectedErrorArm: null,
696
+ expectedErrorCode: null,
697
+ expectedResponseFrame: null,
698
+ description: '[RC-3] invalid/malformed-id response candidate: numeric id → T-H',
699
+ },
700
+ {
701
+ id: 'T-H-7',
702
+ rawFrame: '{"jsonrpc":"2.0","result":null}',
703
+ rawFrameEncoding: 'utf8',
704
+ preState: { inFlightRequests: [] },
705
+ expectedClass: 'T-H',
706
+ expectedOutcome: 'close',
707
+ expectedErrorArm: null,
708
+ expectedErrorCode: null,
709
+ expectedResponseFrame: null,
710
+ description: '[RC-1] missing-id success shape: result present, no id → T-H',
711
+ },
712
+ {
713
+ id: 'T-H-8',
714
+ rawFrame: '{"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params"}}',
715
+ rawFrameEncoding: 'utf8',
716
+ preState: { inFlightRequests: [] },
717
+ expectedClass: 'T-H',
718
+ expectedOutcome: 'close',
719
+ expectedErrorArm: null,
720
+ expectedErrorCode: null,
721
+ expectedResponseFrame: null,
722
+ description: '[RC-2] missing-id error shape: error present, no id → T-H',
723
+ },
724
+ {
725
+ id: 'T-H-9',
726
+ rawFrame: '{"jsonrpc":"2.0","id":"del-1","result":{"deliveryId":"wrong-id"}}',
727
+ rawFrameEncoding: 'utf8',
728
+ preState: { inFlightRequests: [{ id: 'del-1', method: 'host.messaging.deliver', requestSnapshot: { deliveryId: 'correct-id' } }] },
729
+ expectedClass: 'T-H',
730
+ expectedOutcome: 'close',
731
+ expectedErrorArm: null,
732
+ expectedErrorCode: null,
733
+ expectedResponseFrame: null,
734
+ zeroSideEffects: true,
735
+ description: '[RC-5] row-9 ack with wrong deliveryId: byte-equality fails → T-H, never T-L',
736
+ },
737
+ // ── T-L: valid correlated response (settlement) ──────────────────────
738
+ {
739
+ id: 'T-L-1',
740
+ rawFrame: '{"jsonrpc":"2.0","id":"req-1","result":{"nonce":"x"}}',
741
+ rawFrameEncoding: 'utf8',
742
+ preState: { inFlightRequests: [{ id: 'req-1', method: 'host.lifecycle.ping', requestSnapshot: { nonce: 'x' } }] },
743
+ expectedClass: 'T-L',
744
+ expectedOutcome: 'accept',
745
+ expectedErrorArm: null,
746
+ expectedErrorCode: null,
747
+ expectedResponseFrame: null,
748
+ description: '[RC-4] schema-valid correlated WireSuccessResponse: ping nonce echoed byte-equal',
749
+ },
750
+ // ── PAIR with T-H-3 ──────────────────────────────────────────────────
751
+ {
752
+ id: 'T-L-2',
753
+ rawFrame: '{"jsonrpc":"2.0","id":"corr-test","result":{"nonce":"x"}}',
754
+ rawFrameEncoding: 'utf8',
755
+ preState: { inFlightRequests: [{ id: 'corr-test', method: 'host.lifecycle.ping', requestSnapshot: { nonce: 'x' } }] },
756
+ expectedClass: 'T-L',
757
+ expectedOutcome: 'accept',
758
+ expectedErrorArm: null,
759
+ expectedErrorCode: null,
760
+ expectedResponseFrame: null,
761
+ description: 'proof pair: "corr-test" IS in-flight (ping), nonce matches → T-L (see T-H-3)',
762
+ },
763
+ {
764
+ id: 'T-L-3',
765
+ rawFrame: '{"jsonrpc":"2.0","id":"req-err","error":{"code":-32602,"message":"Invalid params"}}',
766
+ rawFrameEncoding: 'utf8',
767
+ preState: { inFlightRequests: [{ id: 'req-err', method: 'host.lifecycle.ping' }] },
768
+ expectedClass: 'T-L',
769
+ expectedOutcome: 'accept',
770
+ expectedErrorArm: null,
771
+ expectedErrorCode: null,
772
+ expectedResponseFrame: null,
773
+ description: 'correlated error settlement: valid WireErrorResponse (additional coverage)',
774
+ },
775
+ // ── ROW-9 DELIVERYID EXCLUSIVE PAIR (R47) ────────────────────────────
776
+ // T-H-9 and T-L-4 share the same method/preState structure for
777
+ // host.messaging.deliver. Only the result.deliveryId differs:
778
+ // T-H-9: result.deliveryId="wrong-id" ≠ snapshot.deliveryId="correct-id" → T-H
779
+ // T-L-4: result.deliveryId="correct-id" = snapshot.deliveryId="correct-id" → T-L
780
+ // This locks the byte-equality oracle's success AND failure sides.
781
+ {
782
+ id: 'T-L-4',
783
+ rawFrame: '{"jsonrpc":"2.0","id":"del-1","result":{"deliveryId":"correct-id"}}',
784
+ rawFrameEncoding: 'utf8',
785
+ preState: { inFlightRequests: [{ id: 'del-1', method: 'host.messaging.deliver', requestSnapshot: { deliveryId: 'correct-id' } }] },
786
+ expectedClass: 'T-L',
787
+ expectedOutcome: 'accept',
788
+ expectedErrorArm: null,
789
+ expectedErrorCode: null,
790
+ expectedResponseFrame: null,
791
+ description: '[R47 pair] row-9 ack with correct deliveryId: byte-equality passes → T-L (see T-H-9)',
792
+ },
793
+ // ── T-M: legal Request on a ready row ─────────────────────────────────
794
+ {
795
+ id: 'T-M-1',
796
+ rawFrame: '{"jsonrpc":"2.0","id":"hello-1","method":"broker.hello","params":{"meta":{"deadlineUnixMs":1},"input":{"pluginId":"example.loopback","packageDigest":"sha512-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==","contractVersion":"0.1.0-beta.8","wireVersion":"0.1.0"}}}',
797
+ rawFrameEncoding: 'utf8',
798
+ preState: { inFlightRequests: [] },
799
+ expectedClass: 'T-M',
800
+ expectedOutcome: 'accept',
801
+ expectedErrorArm: null,
802
+ expectedErrorCode: null,
803
+ expectedResponseFrame: null,
804
+ zeroSideEffects: true,
805
+ description: 'legal broker.hello Request after beta.8 closes and readies row 1',
806
+ },
807
+ {
808
+ id: 'T-M-2',
809
+ rawFrame: '{"jsonrpc":"2.0","id":"ready-1","method":"broker.ready","params":{"meta":{"deadlineUnixMs":1},"input":{"bindingNonce":"nonce-1"}}}',
810
+ rawFrameEncoding: 'utf8',
811
+ preState: { inFlightRequests: [] },
812
+ expectedClass: 'T-M',
813
+ expectedOutcome: 'accept',
814
+ expectedErrorArm: null,
815
+ expectedErrorCode: null,
816
+ expectedResponseFrame: null,
817
+ zeroSideEffects: true,
818
+ description: 'legal broker.ready activation request reaches dispatch but does not activate during classification',
819
+ },
820
+ {
821
+ id: 'T-G-2',
822
+ rawFrame: '{"jsonrpc":"2.0","id":"a","method":"broker.hello","params":{"meta":{"deadlineUnixMs":1},"input":{"pluginId":"example.loopback","packageDigest":"sha512-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==","contractVersion":"0.1.0-beta.8","wireVersion":"0.1.0","pluginInstanceId":"caller-injected"}}}',
823
+ rawFrameEncoding: 'utf8',
824
+ preState: { inFlightRequests: [] },
825
+ expectedClass: 'T-G',
826
+ expectedOutcome: 'respond',
827
+ expectedErrorArm: 'HandshakeRejectedEnvelope',
828
+ expectedErrorCode: HANDSHAKE_REJECTED_CODE,
829
+ expectedResponseFrame: JSON.stringify(RESPONSE_HANDSHAKE_REJECTED_AUTHORITY_A),
830
+ zeroSideEffects: true,
831
+ description: 'broker.hello authority injection is rejected before dispatch with zero side effects',
832
+ },
833
+ {
834
+ id: 'T-M-3',
835
+ rawFrame: helloRequestFrame('a', {
836
+ ...BETA8_HELLO,
837
+ pluginId: RAW_UTF8_BOUNDARY_CODE_POINTS.ascii.repeat(PLUGIN_ID_MAX_LENGTH),
838
+ }),
839
+ rawFrameEncoding: 'utf8',
840
+ preState: { inFlightRequests: [] },
841
+ expectedClass: 'T-M',
842
+ expectedOutcome: 'accept',
843
+ expectedErrorArm: null,
844
+ expectedErrorCode: null,
845
+ expectedResponseFrame: null,
846
+ zeroSideEffects: true,
847
+ description: '[beta.8 H1 raw-byte N] maximum pluginId request is legal before dispatch',
848
+ },
849
+ {
850
+ id: 'T-G-3',
851
+ rawFrame: helloRequestFrame('a', { ...BETA8_HELLO, pluginId: '' }),
852
+ rawFrameEncoding: 'utf8',
853
+ preState: { inFlightRequests: [] },
854
+ expectedClass: 'T-G',
855
+ expectedOutcome: 'respond',
856
+ expectedErrorArm: 'InvalidParamsEnvelope',
857
+ expectedErrorCode: INVALID_PARAMS_CODE,
858
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
859
+ zeroSideEffects: true,
860
+ description: '[beta.8 H1] empty pluginId is rejected before dispatch',
861
+ },
862
+ {
863
+ id: 'T-G-4',
864
+ rawFrame: helloRequestFrame('a', { ...BETA8_HELLO, packageDigest: 'sha512-invalid==' }),
865
+ rawFrameEncoding: 'utf8',
866
+ preState: { inFlightRequests: [] },
867
+ expectedClass: 'T-G',
868
+ expectedOutcome: 'respond',
869
+ expectedErrorArm: 'InvalidParamsEnvelope',
870
+ expectedErrorCode: INVALID_PARAMS_CODE,
871
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
872
+ zeroSideEffects: true,
873
+ description: '[beta.8 H2] malformed package digest is rejected before dispatch',
874
+ },
875
+ {
876
+ id: 'T-G-5',
877
+ rawFrame: helloRequestFrame('a', { ...BETA8_HELLO, contractVersion: 'beta.8' }),
878
+ rawFrameEncoding: 'utf8',
879
+ preState: { inFlightRequests: [] },
880
+ expectedClass: 'T-G',
881
+ expectedOutcome: 'respond',
882
+ expectedErrorArm: 'InvalidParamsEnvelope',
883
+ expectedErrorCode: INVALID_PARAMS_CODE,
884
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
885
+ zeroSideEffects: true,
886
+ description: '[beta.8 H3] non-SemVer contractVersion is rejected before dispatch',
887
+ },
888
+ {
889
+ id: 'T-G-6',
890
+ rawFrame: helloRequestFrame('a', { ...BETA8_HELLO, wireVersion: 'wire-v1' }),
891
+ rawFrameEncoding: 'utf8',
892
+ preState: { inFlightRequests: [] },
893
+ expectedClass: 'T-G',
894
+ expectedOutcome: 'respond',
895
+ expectedErrorArm: 'InvalidParamsEnvelope',
896
+ expectedErrorCode: INVALID_PARAMS_CODE,
897
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
898
+ zeroSideEffects: true,
899
+ description: '[beta.8 H4] non-SemVer wireVersion is rejected before dispatch',
900
+ },
901
+ {
902
+ id: 'T-G-7',
903
+ rawFrame: helloRequestFrame('a', {
904
+ ...BETA8_HELLO,
905
+ pluginId: RAW_UTF8_BOUNDARY_CODE_POINTS.ascii.repeat(PLUGIN_ID_MAX_LENGTH + 1),
906
+ }),
907
+ rawFrameEncoding: 'utf8',
908
+ preState: { inFlightRequests: [] },
909
+ expectedClass: 'T-G',
910
+ expectedOutcome: 'respond',
911
+ expectedErrorArm: 'InvalidParamsEnvelope',
912
+ expectedErrorCode: INVALID_PARAMS_CODE,
913
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
914
+ zeroSideEffects: true,
915
+ description: '[beta.8 H1 raw-byte N+1] oversize pluginId is rejected before dispatch',
916
+ },
917
+ {
918
+ id: 'T-M-4',
919
+ rawFrame: helloRequestFrame('a', {
920
+ ...BETA8_HELLO,
921
+ pluginId: RAW_UTF8_BOUNDARY_CODE_POINTS.multibyte.repeat(PLUGIN_ID_MAX_LENGTH),
922
+ }),
923
+ rawFrameEncoding: 'utf8',
924
+ preState: { inFlightRequests: [] },
925
+ expectedClass: 'T-M',
926
+ expectedOutcome: 'accept',
927
+ expectedErrorArm: null,
928
+ expectedErrorCode: null,
929
+ expectedResponseFrame: null,
930
+ zeroSideEffects: true,
931
+ description: '[beta.8 H1 multibyte N] maximum pluginId request is legal before dispatch',
932
+ },
933
+ {
934
+ id: 'T-G-11',
935
+ rawFrame: helloRequestFrame('a', {
936
+ ...BETA8_HELLO,
937
+ pluginId: RAW_UTF8_BOUNDARY_CODE_POINTS.multibyte.repeat(PLUGIN_ID_MAX_LENGTH + 1),
938
+ }),
939
+ rawFrameEncoding: 'utf8',
940
+ preState: { inFlightRequests: [] },
941
+ expectedClass: 'T-G',
942
+ expectedOutcome: 'respond',
943
+ expectedErrorArm: 'InvalidParamsEnvelope',
944
+ expectedErrorCode: INVALID_PARAMS_CODE,
945
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
946
+ zeroSideEffects: true,
947
+ description: '[beta.8 H1 multibyte N+1] oversize pluginId is rejected before dispatch',
948
+ },
949
+ {
950
+ id: 'T-M-5',
951
+ rawFrame: helloRequestFrame('a', {
952
+ ...BETA8_HELLO,
953
+ pluginId: RAW_UTF8_BOUNDARY_CODE_POINTS.escaping.repeat(PLUGIN_ID_MAX_LENGTH),
954
+ }),
955
+ rawFrameEncoding: 'utf8',
956
+ preState: { inFlightRequests: [] },
957
+ expectedClass: 'T-M',
958
+ expectedOutcome: 'accept',
959
+ expectedErrorArm: null,
960
+ expectedErrorCode: null,
961
+ expectedResponseFrame: null,
962
+ zeroSideEffects: true,
963
+ description: '[beta.8 H1 JSON-escaping N] maximum pluginId request is legal before dispatch',
964
+ },
965
+ {
966
+ id: 'T-G-12',
967
+ rawFrame: helloRequestFrame('a', {
968
+ ...BETA8_HELLO,
969
+ pluginId: RAW_UTF8_BOUNDARY_CODE_POINTS.escaping.repeat(PLUGIN_ID_MAX_LENGTH + 1),
970
+ }),
971
+ rawFrameEncoding: 'utf8',
972
+ preState: { inFlightRequests: [] },
973
+ expectedClass: 'T-G',
974
+ expectedOutcome: 'respond',
975
+ expectedErrorArm: 'InvalidParamsEnvelope',
976
+ expectedErrorCode: INVALID_PARAMS_CODE,
977
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
978
+ zeroSideEffects: true,
979
+ description: '[beta.8 H1 JSON-escaping N+1] oversize pluginId is rejected before dispatch',
980
+ },
981
+ {
982
+ id: 'T-G-8',
983
+ rawFrame: readyRequestFrame('a', { bindingNonce: 1 }),
984
+ rawFrameEncoding: 'utf8',
985
+ preState: { inFlightRequests: [] },
986
+ expectedClass: 'T-G',
987
+ expectedOutcome: 'respond',
988
+ expectedErrorArm: 'InvalidParamsEnvelope',
989
+ expectedErrorCode: INVALID_PARAMS_CODE,
990
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
991
+ zeroSideEffects: true,
992
+ description: '[beta.8 H9] broker.ready wrong-type bindingNonce is rejected before activation',
993
+ },
994
+ {
995
+ id: 'T-G-9',
996
+ rawFrame: readyRequestFrame('a', {
997
+ bindingNonce: RAW_UTF8_BOUNDARY_CODE_POINTS.ascii.repeat(BINDING_NONCE_MAX_LENGTH + 1),
998
+ }),
999
+ rawFrameEncoding: 'utf8',
1000
+ preState: { inFlightRequests: [] },
1001
+ expectedClass: 'T-G',
1002
+ expectedOutcome: 'respond',
1003
+ expectedErrorArm: 'InvalidParamsEnvelope',
1004
+ expectedErrorCode: INVALID_PARAMS_CODE,
1005
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1006
+ zeroSideEffects: true,
1007
+ description: '[beta.8 H9 code-point N+1] oversize broker.ready bindingNonce is rejected before activation',
1008
+ },
1009
+ {
1010
+ id: 'T-M-6',
1011
+ rawFrame: readyRequestFrame('a', {
1012
+ bindingNonce: RAW_UTF8_BOUNDARY_CODE_POINTS.ascii.repeat(BINDING_NONCE_MAX_LENGTH),
1013
+ }),
1014
+ rawFrameEncoding: 'utf8',
1015
+ preState: { inFlightRequests: [] },
1016
+ expectedClass: 'T-M',
1017
+ expectedOutcome: 'accept',
1018
+ expectedErrorArm: null,
1019
+ expectedErrorCode: null,
1020
+ expectedResponseFrame: null,
1021
+ zeroSideEffects: true,
1022
+ description: '[beta.8 H9 ASCII N] maximum broker.ready bindingNonce is legal before activation',
1023
+ },
1024
+ {
1025
+ id: 'T-M-7',
1026
+ rawFrame: readyRequestFrame('a', {
1027
+ bindingNonce: RAW_UTF8_BOUNDARY_CODE_POINTS.multibyte.repeat(BINDING_NONCE_MAX_LENGTH),
1028
+ }),
1029
+ rawFrameEncoding: 'utf8',
1030
+ preState: { inFlightRequests: [] },
1031
+ expectedClass: 'T-M',
1032
+ expectedOutcome: 'accept',
1033
+ expectedErrorArm: null,
1034
+ expectedErrorCode: null,
1035
+ expectedResponseFrame: null,
1036
+ zeroSideEffects: true,
1037
+ description: '[beta.8 H9 multibyte N] maximum broker.ready bindingNonce is legal before activation',
1038
+ },
1039
+ {
1040
+ id: 'T-G-13',
1041
+ rawFrame: readyRequestFrame('a', {
1042
+ bindingNonce: RAW_UTF8_BOUNDARY_CODE_POINTS.multibyte.repeat(BINDING_NONCE_MAX_LENGTH + 1),
1043
+ }),
1044
+ rawFrameEncoding: 'utf8',
1045
+ preState: { inFlightRequests: [] },
1046
+ expectedClass: 'T-G',
1047
+ expectedOutcome: 'respond',
1048
+ expectedErrorArm: 'InvalidParamsEnvelope',
1049
+ expectedErrorCode: INVALID_PARAMS_CODE,
1050
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1051
+ zeroSideEffects: true,
1052
+ description: '[beta.8 H9 multibyte N+1] oversize broker.ready bindingNonce is rejected before activation',
1053
+ },
1054
+ {
1055
+ id: 'T-M-8',
1056
+ rawFrame: readyRequestFrame('a', {
1057
+ bindingNonce: RAW_UTF8_BOUNDARY_CODE_POINTS.escaping.repeat(BINDING_NONCE_MAX_LENGTH),
1058
+ }),
1059
+ rawFrameEncoding: 'utf8',
1060
+ preState: { inFlightRequests: [] },
1061
+ expectedClass: 'T-M',
1062
+ expectedOutcome: 'accept',
1063
+ expectedErrorArm: null,
1064
+ expectedErrorCode: null,
1065
+ expectedResponseFrame: null,
1066
+ zeroSideEffects: true,
1067
+ description: '[beta.8 H9 JSON-escaping N] maximum broker.ready bindingNonce is legal before activation',
1068
+ },
1069
+ {
1070
+ id: 'T-G-14',
1071
+ rawFrame: readyRequestFrame('a', {
1072
+ bindingNonce: RAW_UTF8_BOUNDARY_CODE_POINTS.escaping.repeat(BINDING_NONCE_MAX_LENGTH + 1),
1073
+ }),
1074
+ rawFrameEncoding: 'utf8',
1075
+ preState: { inFlightRequests: [] },
1076
+ expectedClass: 'T-G',
1077
+ expectedOutcome: 'respond',
1078
+ expectedErrorArm: 'InvalidParamsEnvelope',
1079
+ expectedErrorCode: INVALID_PARAMS_CODE,
1080
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1081
+ zeroSideEffects: true,
1082
+ description: '[beta.8 H9 JSON-escaping N+1] oversize broker.ready bindingNonce is rejected before activation',
1083
+ },
1084
+ {
1085
+ id: 'T-G-10',
1086
+ rawFrame: readyRequestFrame('a', {
1087
+ bindingNonce: 'nonce-1',
1088
+ pluginInstanceId: 'caller-injected',
1089
+ }),
1090
+ rawFrameEncoding: 'utf8',
1091
+ preState: { inFlightRequests: [] },
1092
+ expectedClass: 'T-G',
1093
+ expectedOutcome: 'respond',
1094
+ expectedErrorArm: 'HandshakeRejectedEnvelope',
1095
+ expectedErrorCode: HANDSHAKE_REJECTED_CODE,
1096
+ expectedResponseFrame: JSON.stringify(RESPONSE_HANDSHAKE_REJECTED_AUTHORITY_A),
1097
+ zeroSideEffects: true,
1098
+ description: '[beta.8 authority] broker.ready Host instance injection is rejected before activation',
1099
+ },
1100
+ {
1101
+ id: 'T-H-10',
1102
+ rawFrame: helloResultFrame('hello-h5-n-plus-1', {
1103
+ ...BETA8_BINDING,
1104
+ pluginInstanceId: 'a'.repeat(513),
1105
+ }),
1106
+ rawFrameEncoding: 'utf8',
1107
+ preState: { inFlightRequests: [{ id: 'hello-h5-n-plus-1', method: 'broker.hello', requestSnapshot: { candidateHello: BETA8_HELLO } }] },
1108
+ expectedClass: 'T-H',
1109
+ expectedOutcome: 'close',
1110
+ expectedErrorArm: null,
1111
+ expectedErrorCode: null,
1112
+ expectedResponseFrame: null,
1113
+ zeroSideEffects: true,
1114
+ description: '[beta.8 H5 raw-byte N+1] oversize Host instance id is rejected with a correlated hello snapshot',
1115
+ },
1116
+ {
1117
+ id: 'T-H-11',
1118
+ rawFrame: helloResultFrame('hello-h6-n-plus-1', {
1119
+ ...BETA8_BINDING,
1120
+ brokerSessionId: 'a'.repeat(513),
1121
+ }),
1122
+ rawFrameEncoding: 'utf8',
1123
+ preState: { inFlightRequests: [{ id: 'hello-h6-n-plus-1', method: 'broker.hello', requestSnapshot: { candidateHello: BETA8_HELLO } }] },
1124
+ expectedClass: 'T-H',
1125
+ expectedOutcome: 'close',
1126
+ expectedErrorArm: null,
1127
+ expectedErrorCode: null,
1128
+ expectedResponseFrame: null,
1129
+ zeroSideEffects: true,
1130
+ description: '[beta.8 H6 raw-byte N+1] oversize Host session id is rejected with a correlated hello snapshot',
1131
+ },
1132
+ {
1133
+ id: 'T-L-5',
1134
+ rawFrame: helloResultFrame('hello-binding', BETA8_BINDING),
1135
+ rawFrameEncoding: 'utf8',
1136
+ preState: { inFlightRequests: [{ id: 'hello-binding', method: 'broker.hello', requestSnapshot: { candidateHello: BETA8_HELLO } }] },
1137
+ expectedClass: 'T-L',
1138
+ expectedOutcome: 'accept',
1139
+ expectedErrorArm: null,
1140
+ expectedErrorCode: null,
1141
+ expectedResponseFrame: null,
1142
+ zeroSideEffects: true,
1143
+ description: '[beta.8 result] SessionBinding settles only with the correlated CandidateHello echo',
1144
+ },
1145
+ {
1146
+ id: 'T-L-6',
1147
+ rawFrame: JSON.stringify(RESPONSE_HANDSHAKE_REJECTED_HELLO),
1148
+ rawFrameEncoding: 'utf8',
1149
+ preState: { inFlightRequests: [{ id: 'hello-error', method: 'broker.hello', requestSnapshot: { candidateHello: BETA8_HELLO } }] },
1150
+ expectedClass: 'T-L',
1151
+ expectedOutcome: 'accept',
1152
+ expectedErrorArm: null,
1153
+ expectedErrorCode: null,
1154
+ expectedResponseFrame: null,
1155
+ zeroSideEffects: true,
1156
+ description: '[beta.8 error] closed HANDSHAKE_REJECTED error settles the correlated hello',
1157
+ },
1158
+ {
1159
+ id: 'T-M-9',
1160
+ rawFrame: '{"jsonrpc":"2.0","id":"publish-1","method":"events.publish","params":{"meta":{"deadlineUnixMs":1},"input":{"signalType":"feishu.meeting_artifact.generated.v1","eventId":"feishu-minute-om_abc123-v7","idempotencyKey":"feishu:minute:om_abc123:7","occurredAt":"2026-08-09T04:12:31Z","payload":{"artifactId":"om_abc123","revision":"7"},"source":{"handle":"feishu://meeting-artifacts/minute/om_abc123?revision=7"}}}}',
1161
+ rawFrameEncoding: 'utf8',
1162
+ preState: { inFlightRequests: [] },
1163
+ expectedClass: 'T-M',
1164
+ expectedOutcome: 'accept',
1165
+ expectedErrorArm: null,
1166
+ expectedErrorCode: null,
1167
+ expectedResponseFrame: null,
1168
+ zeroSideEffects: true,
1169
+ description: '[beta.9 C-2] declared-shape events.publish request reaches Host dispatch without a destination',
1170
+ },
1171
+ {
1172
+ id: 'T-G-15',
1173
+ rawFrame: '{"jsonrpc":"2.0","id":"a","method":"events.publish","params":{"meta":{"deadlineUnixMs":1},"input":{"signalType":"feishu.meeting_artifact.generated.v1","eventId":"event-1","idempotencyKey":"event-1","occurredAt":"2026-08-09T04:12:31Z","payload":{},"destination":{"threadId":"thread-1"}}}}',
1174
+ rawFrameEncoding: 'utf8',
1175
+ preState: { inFlightRequests: [] },
1176
+ expectedClass: 'T-G',
1177
+ expectedOutcome: 'respond',
1178
+ expectedErrorArm: 'InvalidParamsEnvelope',
1179
+ expectedErrorCode: INVALID_PARAMS_CODE,
1180
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1181
+ zeroSideEffects: true,
1182
+ description: '[beta.9 C-2] plugin-supplied destination is rejected before Host routing',
1183
+ },
1184
+ {
1185
+ id: 'T-H-12',
1186
+ rawFrame: '{"jsonrpc":"2.0","id":"publish-result","result":{"publicationId":"publication-1","disposition":"accepted","destination":"thread-1"}}',
1187
+ rawFrameEncoding: 'utf8',
1188
+ preState: { inFlightRequests: [{ id: 'publish-result', method: 'events.publish' }] },
1189
+ expectedClass: 'T-H',
1190
+ expectedOutcome: 'close',
1191
+ expectedErrorArm: null,
1192
+ expectedErrorCode: null,
1193
+ expectedResponseFrame: null,
1194
+ zeroSideEffects: true,
1195
+ description: '[beta.9 C-2] open Host receipt is rejected as a protocol violation',
1196
+ },
1197
+ {
1198
+ id: 'T-L-7',
1199
+ rawFrame: '{"jsonrpc":"2.0","id":"publish-result","result":{"publicationId":"publication-1","disposition":"duplicate"}}',
1200
+ rawFrameEncoding: 'utf8',
1201
+ preState: { inFlightRequests: [{ id: 'publish-result', method: 'events.publish' }] },
1202
+ expectedClass: 'T-L',
1203
+ expectedOutcome: 'accept',
1204
+ expectedErrorArm: null,
1205
+ expectedErrorCode: null,
1206
+ expectedResponseFrame: null,
1207
+ zeroSideEffects: true,
1208
+ description: '[beta.9 C-2] duplicate receipt legally settles a correlated publication',
1209
+ },
1210
+ {
1211
+ id: 'T-J-3',
1212
+ rawFrame: grantsChangedNotificationFrame(ALL_CAPABILITY_VALUES),
1213
+ rawFrameEncoding: 'utf8',
1214
+ preState: { inFlightRequests: [] },
1215
+ expectedClass: 'T-J',
1216
+ expectedOutcome: 'accept',
1217
+ expectedErrorArm: null,
1218
+ expectedErrorCode: null,
1219
+ expectedResponseFrame: null,
1220
+ description: '[beta.10 lifecycle] maximum legal grant snapshot notification reaches dispatch without a response',
1221
+ },
1222
+ {
1223
+ id: 'T-K-8',
1224
+ rawFrame: grantsChangedNotificationFrame([
1225
+ ...ALL_CAPABILITY_VALUES,
1226
+ ALL_CAPABILITY_VALUES[0],
1227
+ ]),
1228
+ rawFrameEncoding: 'utf8',
1229
+ preState: { inFlightRequests: [] },
1230
+ expectedClass: 'T-K',
1231
+ expectedOutcome: 'close',
1232
+ expectedErrorArm: null,
1233
+ expectedErrorCode: null,
1234
+ expectedResponseFrame: null,
1235
+ zeroSideEffects: true,
1236
+ description: '[beta.10 lifecycle] N+1 grant snapshot notification closes before dispatch',
1237
+ },
1238
+ {
1239
+ id: 'T-K-9',
1240
+ rawFrame: grantsChangedNotificationFrame([
1241
+ ALL_CAPABILITY_VALUES[0],
1242
+ ALL_CAPABILITY_VALUES[0],
1243
+ ]),
1244
+ rawFrameEncoding: 'utf8',
1245
+ preState: { inFlightRequests: [] },
1246
+ expectedClass: 'T-K',
1247
+ expectedOutcome: 'close',
1248
+ expectedErrorArm: null,
1249
+ expectedErrorCode: null,
1250
+ expectedResponseFrame: null,
1251
+ zeroSideEffects: true,
1252
+ description: '[beta.10 lifecycle] duplicate grants within the cardinality bound close before dispatch',
1253
+ },
1254
+ {
1255
+ id: 'T-K-10',
1256
+ rawFrame: grantsChangedNotificationFrame(['unknown.capability']),
1257
+ rawFrameEncoding: 'utf8',
1258
+ preState: { inFlightRequests: [] },
1259
+ expectedClass: 'T-K',
1260
+ expectedOutcome: 'close',
1261
+ expectedErrorArm: null,
1262
+ expectedErrorCode: null,
1263
+ expectedResponseFrame: null,
1264
+ zeroSideEffects: true,
1265
+ description: '[beta.10 lifecycle] unknown grant closes before dispatch',
1266
+ },
1267
+ {
1268
+ id: 'T-M-10',
1269
+ rawFrame: lifecycleRequestFrame('a', 'host.lifecycle.ping', {
1270
+ nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.ascii.repeat(PING_NONCE_MAX_LENGTH),
1271
+ }),
1272
+ rawFrameEncoding: 'utf8',
1273
+ preState: { inFlightRequests: [] },
1274
+ expectedClass: 'T-M',
1275
+ expectedOutcome: 'accept',
1276
+ expectedErrorArm: null,
1277
+ expectedErrorCode: null,
1278
+ expectedResponseFrame: null,
1279
+ description: '[beta.10 lifecycle] maximum ASCII ping nonce reaches dispatch',
1280
+ },
1281
+ {
1282
+ id: 'T-G-16',
1283
+ rawFrame: lifecycleRequestFrame('a', 'host.lifecycle.ping', {
1284
+ nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.ascii.repeat(PING_NONCE_MAX_LENGTH + 1),
1285
+ }),
1286
+ rawFrameEncoding: 'utf8',
1287
+ preState: { inFlightRequests: [] },
1288
+ expectedClass: 'T-G',
1289
+ expectedOutcome: 'respond',
1290
+ expectedErrorArm: 'InvalidParamsEnvelope',
1291
+ expectedErrorCode: INVALID_PARAMS_CODE,
1292
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1293
+ zeroSideEffects: true,
1294
+ description: '[beta.10 lifecycle] ASCII ping nonce N+1 rejects before dispatch',
1295
+ },
1296
+ {
1297
+ id: 'T-M-11',
1298
+ rawFrame: lifecycleRequestFrame('a', 'host.lifecycle.ping', {
1299
+ nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.multibyte.repeat(PING_NONCE_MAX_LENGTH),
1300
+ }),
1301
+ rawFrameEncoding: 'utf8',
1302
+ preState: { inFlightRequests: [] },
1303
+ expectedClass: 'T-M',
1304
+ expectedOutcome: 'accept',
1305
+ expectedErrorArm: null,
1306
+ expectedErrorCode: null,
1307
+ expectedResponseFrame: null,
1308
+ description: '[beta.10 lifecycle] maximum multibyte ping nonce reaches dispatch',
1309
+ },
1310
+ {
1311
+ id: 'T-G-17',
1312
+ rawFrame: lifecycleRequestFrame('a', 'host.lifecycle.ping', {
1313
+ nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.multibyte.repeat(PING_NONCE_MAX_LENGTH + 1),
1314
+ }),
1315
+ rawFrameEncoding: 'utf8',
1316
+ preState: { inFlightRequests: [] },
1317
+ expectedClass: 'T-G',
1318
+ expectedOutcome: 'respond',
1319
+ expectedErrorArm: 'InvalidParamsEnvelope',
1320
+ expectedErrorCode: INVALID_PARAMS_CODE,
1321
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1322
+ zeroSideEffects: true,
1323
+ description: '[beta.10 lifecycle] multibyte ping nonce N+1 rejects before dispatch',
1324
+ },
1325
+ {
1326
+ id: 'T-M-12',
1327
+ rawFrame: lifecycleRequestFrame('a', 'host.lifecycle.ping', {
1328
+ nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.escaping.repeat(PING_NONCE_MAX_LENGTH),
1329
+ }),
1330
+ rawFrameEncoding: 'utf8',
1331
+ preState: { inFlightRequests: [] },
1332
+ expectedClass: 'T-M',
1333
+ expectedOutcome: 'accept',
1334
+ expectedErrorArm: null,
1335
+ expectedErrorCode: null,
1336
+ expectedResponseFrame: null,
1337
+ description: '[beta.10 lifecycle] maximum JSON-escaping ping nonce reaches dispatch',
1338
+ },
1339
+ {
1340
+ id: 'T-G-18',
1341
+ rawFrame: lifecycleRequestFrame('a', 'host.lifecycle.ping', {
1342
+ nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.escaping.repeat(PING_NONCE_MAX_LENGTH + 1),
1343
+ }),
1344
+ rawFrameEncoding: 'utf8',
1345
+ preState: { inFlightRequests: [] },
1346
+ expectedClass: 'T-G',
1347
+ expectedOutcome: 'respond',
1348
+ expectedErrorArm: 'InvalidParamsEnvelope',
1349
+ expectedErrorCode: INVALID_PARAMS_CODE,
1350
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1351
+ zeroSideEffects: true,
1352
+ description: '[beta.10 lifecycle] JSON-escaping ping nonce N+1 rejects before dispatch',
1353
+ },
1354
+ {
1355
+ id: 'T-L-8',
1356
+ rawFrame: JSON.stringify({
1357
+ jsonrpc: '2.0',
1358
+ id: 'ping-max',
1359
+ result: { nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.multibyte.repeat(PING_NONCE_MAX_LENGTH) },
1360
+ }),
1361
+ rawFrameEncoding: 'utf8',
1362
+ preState: {
1363
+ inFlightRequests: [{
1364
+ id: 'ping-max',
1365
+ method: 'host.lifecycle.ping',
1366
+ requestSnapshot: {
1367
+ nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.multibyte.repeat(PING_NONCE_MAX_LENGTH),
1368
+ },
1369
+ }],
1370
+ },
1371
+ expectedClass: 'T-L',
1372
+ expectedOutcome: 'accept',
1373
+ expectedErrorArm: null,
1374
+ expectedErrorCode: null,
1375
+ expectedResponseFrame: null,
1376
+ description: '[beta.10 lifecycle] maximum ping nonce settles only when echoed byte-equal',
1377
+ },
1378
+ {
1379
+ id: 'T-H-13',
1380
+ rawFrame: JSON.stringify({
1381
+ jsonrpc: '2.0',
1382
+ id: 'ping-mismatch',
1383
+ result: { nonce: 'different' },
1384
+ }),
1385
+ rawFrameEncoding: 'utf8',
1386
+ preState: {
1387
+ inFlightRequests: [{
1388
+ id: 'ping-mismatch',
1389
+ method: 'host.lifecycle.ping',
1390
+ requestSnapshot: { nonce: 'expected' },
1391
+ }],
1392
+ },
1393
+ expectedClass: 'T-H',
1394
+ expectedOutcome: 'close',
1395
+ expectedErrorArm: null,
1396
+ expectedErrorCode: null,
1397
+ expectedResponseFrame: null,
1398
+ zeroSideEffects: true,
1399
+ description: '[beta.10 lifecycle] ping result with a non-equal nonce closes without settlement',
1400
+ },
1401
+ {
1402
+ id: 'T-M-13',
1403
+ rawFrame: lifecycleRequestFrame('drain-max', 'host.lifecycle.drain', {
1404
+ deadlineUnixMs: WIRE_UINT53_MAX,
1405
+ }),
1406
+ rawFrameEncoding: 'utf8',
1407
+ preState: { inFlightRequests: [] },
1408
+ expectedClass: 'T-M',
1409
+ expectedOutcome: 'accept',
1410
+ expectedErrorArm: null,
1411
+ expectedErrorCode: null,
1412
+ expectedResponseFrame: null,
1413
+ description: '[beta.10 lifecycle] maximum legal drain deadline reaches dispatch',
1414
+ },
1415
+ {
1416
+ id: 'T-G-19',
1417
+ rawFrame: lifecycleRequestFrame('a', 'host.lifecycle.drain', {
1418
+ deadlineUnixMs: WIRE_UINT53_MAX + 1,
1419
+ }),
1420
+ rawFrameEncoding: 'utf8',
1421
+ preState: { inFlightRequests: [] },
1422
+ expectedClass: 'T-G',
1423
+ expectedOutcome: 'respond',
1424
+ expectedErrorArm: 'InvalidParamsEnvelope',
1425
+ expectedErrorCode: INVALID_PARAMS_CODE,
1426
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1427
+ zeroSideEffects: true,
1428
+ description: '[beta.10 lifecycle] drain WireUInt53 N+1 rejects before dispatch',
1429
+ },
1430
+ {
1431
+ id: 'T-G-20',
1432
+ rawFrame: lifecycleRequestFrame('a', 'host.lifecycle.drain', {
1433
+ deadlineUnixMs: 0,
1434
+ }),
1435
+ rawFrameEncoding: 'utf8',
1436
+ preState: { inFlightRequests: [] },
1437
+ expectedClass: 'T-G',
1438
+ expectedOutcome: 'respond',
1439
+ expectedErrorArm: 'InvalidParamsEnvelope',
1440
+ expectedErrorCode: INVALID_PARAMS_CODE,
1441
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1442
+ zeroSideEffects: true,
1443
+ description: '[beta.10 lifecycle] zero drain deadline rejects before dispatch',
1444
+ },
1445
+ {
1446
+ id: 'T-L-9',
1447
+ rawFrame: '{"jsonrpc":"2.0","id":"drain-null","result":null}',
1448
+ rawFrameEncoding: 'utf8',
1449
+ preState: {
1450
+ inFlightRequests: [{ id: 'drain-null', method: 'host.lifecycle.drain' }],
1451
+ },
1452
+ expectedClass: 'T-L',
1453
+ expectedOutcome: 'accept',
1454
+ expectedErrorArm: null,
1455
+ expectedErrorCode: null,
1456
+ expectedResponseFrame: null,
1457
+ description: '[beta.10 lifecycle] exact null drain result settles its request',
1458
+ },
1459
+ {
1460
+ id: 'T-L-10',
1461
+ rawFrame: JSON.stringify(RESPONSE_DEADLINE_EXPIRED_DRAIN),
1462
+ rawFrameEncoding: 'utf8',
1463
+ preState: {
1464
+ inFlightRequests: [{ id: 'drain-deadline', method: 'host.lifecycle.drain' }],
1465
+ },
1466
+ expectedClass: 'T-L',
1467
+ expectedOutcome: 'accept',
1468
+ expectedErrorArm: null,
1469
+ expectedErrorCode: null,
1470
+ expectedResponseFrame: null,
1471
+ description: '[beta.10 lifecycle] DEADLINE_EXPIRED legally settles a drain request',
1472
+ },
1473
+ {
1474
+ id: 'T-M-14',
1475
+ rawFrame: messagingRequestFrame('send-1', 'messaging.send', M0C_DRAFT),
1476
+ rawFrameEncoding: 'utf8',
1477
+ preState: { inFlightRequests: [] },
1478
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1479
+ expectedErrorCode: null, expectedResponseFrame: null,
1480
+ description: '[beta.11 messaging] legal send reaches Host dispatch',
1481
+ },
1482
+ {
1483
+ id: 'T-G-21',
1484
+ rawFrame: messagingRequestFrame('a', 'messaging.send', { ...M0C_DRAFT, authority: 'host' }),
1485
+ rawFrameEncoding: 'utf8',
1486
+ preState: { inFlightRequests: [] },
1487
+ expectedClass: 'T-G', expectedOutcome: 'respond', expectedErrorArm: 'InvalidParamsEnvelope',
1488
+ expectedErrorCode: INVALID_PARAMS_CODE, expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1489
+ zeroSideEffects: true,
1490
+ description: '[beta.11 messaging] authority-bearing send rejects before dispatch',
1491
+ },
1492
+ {
1493
+ id: 'T-M-15',
1494
+ rawFrame: messagingRequestFrame('append-1', 'messaging.appendElements', {
1495
+ handle: { kind: 'message', token: 'message-handle-1' },
1496
+ operationId: 'append-1',
1497
+ baseRevision: 1,
1498
+ elements: [{ elementId: 'element-2', kind: 'text', payload: { text: 'more' } }],
1499
+ }),
1500
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1501
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1502
+ expectedErrorCode: null, expectedResponseFrame: null,
1503
+ description: '[beta.11 messaging] legal append reaches Host dispatch',
1504
+ },
1505
+ {
1506
+ id: 'T-G-22',
1507
+ rawFrame: messagingRequestFrame('a', 'messaging.appendElements', {
1508
+ handle: 'raw-handle', operationId: 'append-1', elements: [],
1509
+ }),
1510
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1511
+ expectedClass: 'T-G', expectedOutcome: 'respond', expectedErrorArm: 'InvalidParamsEnvelope',
1512
+ expectedErrorCode: INVALID_PARAMS_CODE, expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1513
+ zeroSideEffects: true,
1514
+ description: '[beta.11 messaging] malformed append rejects before dispatch',
1515
+ },
1516
+ {
1517
+ id: 'T-M-16',
1518
+ rawFrame: messagingRequestFrame('subscribe-1', 'messaging.subscribe', { handle: 'thread-handle-1' }),
1519
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1520
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1521
+ expectedErrorCode: null, expectedResponseFrame: null,
1522
+ description: '[beta.11 messaging] legal subscribe reaches Host dispatch',
1523
+ },
1524
+ {
1525
+ id: 'T-G-23',
1526
+ rawFrame: messagingRequestFrame('a', 'messaging.subscribe', { handle: '' }),
1527
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1528
+ expectedClass: 'T-G', expectedOutcome: 'respond', expectedErrorArm: 'InvalidParamsEnvelope',
1529
+ expectedErrorCode: INVALID_PARAMS_CODE, expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1530
+ zeroSideEffects: true,
1531
+ description: '[beta.11 messaging] empty subscribe handle rejects before dispatch',
1532
+ },
1533
+ {
1534
+ id: 'T-M-17',
1535
+ rawFrame: messagingRequestFrame('read-1', 'messaging.read', { subscriptionId: 'subscription-1', limit: 2 }),
1536
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1537
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1538
+ expectedErrorCode: null, expectedResponseFrame: null,
1539
+ description: '[beta.11 messaging] legal read reaches Host dispatch',
1540
+ },
1541
+ {
1542
+ id: 'T-G-24',
1543
+ rawFrame: messagingRequestFrame('a', 'messaging.read', { subscriptionId: 'subscription-1', limit: 33 }),
1544
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1545
+ expectedClass: 'T-G', expectedOutcome: 'respond', expectedErrorArm: 'InvalidParamsEnvelope',
1546
+ expectedErrorCode: INVALID_PARAMS_CODE, expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1547
+ zeroSideEffects: true,
1548
+ description: '[beta.11 messaging] read limit N+1 rejects before dispatch',
1549
+ },
1550
+ {
1551
+ id: 'T-M-18',
1552
+ rawFrame: messagingRequestFrame('ack-1', 'messaging.ack', { subscriptionId: 'subscription-1', ackToken: 'ack-1' }),
1553
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1554
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1555
+ expectedErrorCode: null, expectedResponseFrame: null,
1556
+ description: '[beta.11 messaging] legal acknowledgement reaches Host dispatch',
1557
+ },
1558
+ {
1559
+ id: 'T-G-25',
1560
+ rawFrame: messagingRequestFrame('a', 'messaging.ack', { subscriptionId: 'subscription-1', ackToken: '' }),
1561
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1562
+ expectedClass: 'T-G', expectedOutcome: 'respond', expectedErrorArm: 'InvalidParamsEnvelope',
1563
+ expectedErrorCode: INVALID_PARAMS_CODE, expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1564
+ zeroSideEffects: true,
1565
+ description: '[beta.11 messaging] empty acknowledgement token rejects before dispatch',
1566
+ },
1567
+ {
1568
+ id: 'T-M-19',
1569
+ rawFrame: messagingRequestFrame('snapshot-1', 'messaging.snapshot', { subscriptionId: 'subscription-1', maxItems: 2 }),
1570
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1571
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1572
+ expectedErrorCode: null, expectedResponseFrame: null,
1573
+ description: '[beta.11 messaging] legal snapshot page reaches Host dispatch',
1574
+ },
1575
+ {
1576
+ id: 'T-G-26',
1577
+ rawFrame: messagingRequestFrame('a', 'messaging.snapshot', { subscriptionId: 'subscription-1', maxItems: 0 }),
1578
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1579
+ expectedClass: 'T-G', expectedOutcome: 'respond', expectedErrorArm: 'InvalidParamsEnvelope',
1580
+ expectedErrorCode: INVALID_PARAMS_CODE, expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1581
+ zeroSideEffects: true,
1582
+ description: '[beta.11 messaging] zero snapshot maxItems rejects before dispatch',
1583
+ },
1584
+ {
1585
+ id: 'T-M-20',
1586
+ rawFrame: messagingRequestFrame('deliver-1', 'host.messaging.deliver', {
1587
+ deliveryId: 'delivery-1',
1588
+ threadHandle: { kind: 'thread_handle', handle: 'thread-handle-1' },
1589
+ envelope: M0C_ENVELOPE,
1590
+ }),
1591
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1592
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1593
+ expectedErrorCode: null, expectedResponseFrame: null,
1594
+ description: '[beta.11 messaging] legal Host delivery reaches plugin dispatch',
1595
+ },
1596
+ {
1597
+ id: 'T-M-21',
1598
+ rawFrame: messagingRequestFrame('send-exponent', 'messaging.send', {
1599
+ address: { kind: 'thread_handle', handle: 'thread-handle-1' },
1600
+ idempotencyKey: 'send-exp',
1601
+ payload: {
1602
+ provenance: { epistemicStatus: 'inference' },
1603
+ elements: [
1604
+ { elementId: 'element-1', kind: 'rich_block', payload: { data: 1e+21 } },
1605
+ ],
1606
+ },
1607
+ }),
1608
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1609
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1610
+ expectedErrorCode: null, expectedResponseFrame: null,
1611
+ description: '[beta.11 messaging] V8-canonical exponent in open payload is legal at T-C',
1612
+ },
1613
+ {
1614
+ id: 'T-G-27',
1615
+ rawFrame: messagingRequestFrame('a', 'host.messaging.deliver', {
1616
+ deliveryId: 'delivery-1',
1617
+ threadHandle: { kind: 'thread_handle', handle: 'thread-handle-1' },
1618
+ envelope: { ...M0C_ENVELOPE, occurredAt: '2026-08-18T03:00:00Z' },
1619
+ }),
1620
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1621
+ expectedClass: 'T-G', expectedOutcome: 'respond', expectedErrorArm: 'InvalidParamsEnvelope',
1622
+ expectedErrorCode: INVALID_PARAMS_CODE, expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1623
+ zeroSideEffects: true,
1624
+ description: '[beta.11 messaging] non-canonical stored timestamp rejects before callback dispatch',
1625
+ },
1626
+ {
1627
+ id: 'T-C-4',
1628
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'read-publish-rev', result: {
1629
+ events: [{ ...M0C_PUBLISH_EVENT, envelope: { ...M0C_ENVELOPE, revision: 1.5 } }],
1630
+ ackToken: 'ack-1', stale: false,
1631
+ } }),
1632
+ rawFrameEncoding: 'utf8',
1633
+ preState: { inFlightRequests: [{ id: 'read-publish-rev', method: 'messaging.read', requestSnapshot: { readLimit: 2 } }] },
1634
+ expectedClass: 'T-C', expectedOutcome: 'close', expectedErrorArm: null,
1635
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1636
+ description: '[beta.11 messaging] fractional publish envelope revision in read response is rejected at canonicality',
1637
+ },
1638
+ {
1639
+ id: 'T-C-5',
1640
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'read-append-rev', result: {
1641
+ events: [{
1642
+ eventId: 'event-append-1', sequence: 1, type: 'message.elements.append',
1643
+ messageId: 'message-1', threadId: 'thread-1', operationId: 'op-1',
1644
+ revision: 1.5, elements: [],
1645
+ }],
1646
+ ackToken: 'ack-1', stale: false,
1647
+ } }),
1648
+ rawFrameEncoding: 'utf8',
1649
+ preState: { inFlightRequests: [{ id: 'read-append-rev', method: 'messaging.read', requestSnapshot: { readLimit: 2 } }] },
1650
+ expectedClass: 'T-C', expectedOutcome: 'close', expectedErrorArm: null,
1651
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1652
+ description: '[beta.11 messaging] fractional append event revision in read response is rejected at canonicality',
1653
+ },
1654
+ {
1655
+ id: 'T-C-6',
1656
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'read-append-baserev', result: {
1657
+ events: [{
1658
+ eventId: 'event-append-2', sequence: 1, type: 'message.elements.append',
1659
+ messageId: 'message-1', threadId: 'thread-1', operationId: 'op-1',
1660
+ baseRevision: 1.5, revision: 2, elements: [],
1661
+ }],
1662
+ ackToken: 'ack-1', stale: false,
1663
+ } }),
1664
+ rawFrameEncoding: 'utf8',
1665
+ preState: { inFlightRequests: [{ id: 'read-append-baserev', method: 'messaging.read', requestSnapshot: { readLimit: 2 } }] },
1666
+ expectedClass: 'T-C', expectedOutcome: 'close', expectedErrorArm: null,
1667
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1668
+ description: '[beta.11 messaging] fractional append event baseRevision in read response is rejected at canonicality',
1669
+ },
1670
+ {
1671
+ id: 'T-L-11',
1672
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'send-result', result: {
1673
+ messageId: 'message-1', threadId: 'thread-1', revision: 1,
1674
+ messageHandle: { kind: 'message', token: 'message-handle-1' },
1675
+ } }),
1676
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'send-result', method: 'messaging.send' }] },
1677
+ expectedClass: 'T-L', expectedOutcome: 'accept', expectedErrorArm: null,
1678
+ expectedErrorCode: null, expectedResponseFrame: null,
1679
+ description: '[beta.11 messaging] closed send receipt settles the request',
1680
+ },
1681
+ {
1682
+ id: 'T-H-14',
1683
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'send-legacy', result: {
1684
+ messageId: 'message-1', threadId: 'thread-1', revision: 1,
1685
+ handle: { kind: 'message', token: 'message-handle-1' },
1686
+ } }),
1687
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'send-legacy', method: 'messaging.send' }] },
1688
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1689
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1690
+ description: '[beta.11 messaging] legacy send receipt closes without settlement',
1691
+ },
1692
+ {
1693
+ id: 'T-L-12',
1694
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'append-result', result: {
1695
+ messageId: 'message-1', revision: 2, appliedElementIds: ['element-2'],
1696
+ } }),
1697
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'append-result', method: 'messaging.appendElements', requestSnapshot: { appendElementIds: ['element-2'] } }] },
1698
+ expectedClass: 'T-L', expectedOutcome: 'accept', expectedErrorArm: null,
1699
+ expectedErrorCode: null, expectedResponseFrame: null,
1700
+ description: '[beta.11 messaging] closed append receipt settles the request',
1701
+ },
1702
+ {
1703
+ id: 'T-H-15',
1704
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'append-empty', result: {
1705
+ messageId: 'message-1', revision: 2, appliedElementIds: [],
1706
+ } }),
1707
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'append-empty', method: 'messaging.appendElements', requestSnapshot: { appendElementIds: ['element-2'] } }] },
1708
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1709
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1710
+ description: '[beta.11 messaging] empty append receipt closes without settlement',
1711
+ },
1712
+ {
1713
+ id: 'T-L-13',
1714
+ rawFrame: '{"jsonrpc":"2.0","id":"subscribe-result","result":{"subscriptionId":"subscription-1"}}',
1715
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'subscribe-result', method: 'messaging.subscribe' }] },
1716
+ expectedClass: 'T-L', expectedOutcome: 'accept', expectedErrorArm: null,
1717
+ expectedErrorCode: null, expectedResponseFrame: null,
1718
+ description: '[beta.11 messaging] closed subscription receipt settles the request',
1719
+ },
1720
+ {
1721
+ id: 'T-H-16',
1722
+ rawFrame: '{"jsonrpc":"2.0","id":"subscribe-open","result":{"subscriptionId":"subscription-1","extra":true}}',
1723
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'subscribe-open', method: 'messaging.subscribe' }] },
1724
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1725
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1726
+ description: '[beta.11 messaging] open subscription receipt closes without settlement',
1727
+ },
1728
+ {
1729
+ id: 'T-L-14',
1730
+ rawFrame: '{"jsonrpc":"2.0","id":"read-result","result":{"events":[],"ackToken":null,"stale":false}}',
1731
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'read-result', method: 'messaging.read', requestSnapshot: { readLimit: 2 } }] },
1732
+ expectedClass: 'T-L', expectedOutcome: 'accept', expectedErrorArm: null,
1733
+ expectedErrorCode: null, expectedResponseFrame: null,
1734
+ description: '[beta.11 messaging] empty read page settles the request',
1735
+ },
1736
+ {
1737
+ id: 'T-H-17',
1738
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'read-over-limit', result: {
1739
+ events: [M0C_PUBLISH_EVENT, { ...M0C_PUBLISH_EVENT, eventId: 'event-2', sequence: 2 }],
1740
+ ackToken: 'ack-2', stale: false,
1741
+ } }),
1742
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'read-over-limit', method: 'messaging.read', requestSnapshot: { readLimit: 1 } }] },
1743
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1744
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1745
+ description: '[beta.11 messaging] read page beyond the request limit closes without cursor progress',
1746
+ },
1747
+ {
1748
+ id: 'T-L-15', rawFrame: '{"jsonrpc":"2.0","id":"ack-result","result":null}',
1749
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'ack-result', method: 'messaging.ack' }] },
1750
+ expectedClass: 'T-L', expectedOutcome: 'accept', expectedErrorArm: null,
1751
+ expectedErrorCode: null, expectedResponseFrame: null,
1752
+ description: '[beta.11 messaging] null acknowledgement settles the request',
1753
+ },
1754
+ {
1755
+ id: 'T-H-18', rawFrame: '{"jsonrpc":"2.0","id":"ack-open","result":{}}',
1756
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'ack-open', method: 'messaging.ack' }] },
1757
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1758
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1759
+ description: '[beta.11 messaging] non-null acknowledgement closes without cursor progress',
1760
+ },
1761
+ {
1762
+ id: 'T-L-16',
1763
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'snapshot-result', result: {
1764
+ items: [], nextPageToken: null, snapshotAckToken: 'snapshot-ack-1',
1765
+ } }),
1766
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'snapshot-result', method: 'messaging.snapshot', requestSnapshot: { snapshotMaxItems: 2 } }] },
1767
+ expectedClass: 'T-L', expectedOutcome: 'accept', expectedErrorArm: null,
1768
+ expectedErrorCode: null, expectedResponseFrame: null,
1769
+ description: '[beta.11 messaging] final snapshot page settles the traversal request',
1770
+ },
1771
+ {
1772
+ id: 'T-H-19',
1773
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'snapshot-over-limit', result: {
1774
+ items: [M0C_ENVELOPE, { ...M0C_ENVELOPE, messageId: 'message-2' }],
1775
+ nextPageToken: null, snapshotAckToken: 'snapshot-ack-2',
1776
+ } }),
1777
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'snapshot-over-limit', method: 'messaging.snapshot', requestSnapshot: { snapshotMaxItems: 1 } }] },
1778
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1779
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1780
+ description: '[beta.11 messaging] snapshot page beyond request maxItems closes without progress',
1781
+ },
1782
+ {
1783
+ id: 'T-L-17',
1784
+ rawFrame: '{"jsonrpc":"2.0","id":"deliver-result","result":{"deliveryId":"delivery-1"}}',
1785
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'deliver-result', method: 'host.messaging.deliver', requestSnapshot: { deliveryId: 'delivery-1' } }] },
1786
+ expectedClass: 'T-L', expectedOutcome: 'accept', expectedErrorArm: null,
1787
+ expectedErrorCode: null, expectedResponseFrame: null,
1788
+ description: '[beta.11 messaging] byte-equal delivery acknowledgement settles the callback',
1789
+ },
1790
+ {
1791
+ id: 'T-H-20',
1792
+ rawFrame: '{"jsonrpc":"2.0","id":"deliver-mismatch","result":{"deliveryId":"wrong-delivery"}}',
1793
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'deliver-mismatch', method: 'host.messaging.deliver', requestSnapshot: { deliveryId: 'delivery-1' } }] },
1794
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1795
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1796
+ description: '[beta.11 messaging] mismatched delivery acknowledgement closes without settlement',
1797
+ },
1798
+ {
1799
+ id: 'T-H-21',
1800
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'append-provenance', result: {
1801
+ messageId: 'message-1', revision: 2, appliedElementIds: ['wrong-element'],
1802
+ } }),
1803
+ rawFrameEncoding: 'utf8',
1804
+ preState: { inFlightRequests: [{ id: 'append-provenance', method: 'messaging.appendElements', requestSnapshot: { appendElementIds: ['element-2'] } }] },
1805
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1806
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1807
+ description: '[beta.11 messaging] append receipt with foreign element IDs closes without settlement',
1808
+ },
1809
+ {
1810
+ id: 'T-H-22',
1811
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'append-no-snapshot', result: {
1812
+ messageId: 'message-1', revision: 2, appliedElementIds: ['element-2'],
1813
+ } }),
1814
+ rawFrameEncoding: 'utf8',
1815
+ preState: { inFlightRequests: [{ id: 'append-no-snapshot', method: 'messaging.appendElements' }] },
1816
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1817
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1818
+ description: '[beta.11 messaging] append receipt without provenance snapshot closes without settlement',
1819
+ },
1820
+ ];
1821
+ /** Complete beta.8 handshake safety surface exported for downstream runners. */
1822
+ export const BETA8_HANDSHAKE_VECTOR_IDS = [
1823
+ 'T-C-2',
1824
+ 'T-M-1', 'T-M-2', 'T-M-3', 'T-M-4', 'T-M-5', 'T-M-6', 'T-M-7', 'T-M-8',
1825
+ 'T-G-2', 'T-G-3', 'T-G-4', 'T-G-5', 'T-G-6', 'T-G-7', 'T-G-8', 'T-G-9', 'T-G-10',
1826
+ 'T-G-11', 'T-G-12', 'T-G-13', 'T-G-14',
1827
+ 'T-H-10', 'T-H-11',
1828
+ 'T-L-5', 'T-L-6',
1829
+ ];
1830
+ /** Complete beta.9 C-2 publish safety surface exported for downstream runners. */
1831
+ export const BETA9_EVENTS_PUBLISH_VECTOR_IDS = [
1832
+ 'T-M-9',
1833
+ 'T-G-15',
1834
+ 'T-H-12',
1835
+ 'T-L-7',
1836
+ ];
1837
+ /** Complete beta.10 M0-B lifecycle safety surface for rows 10 through 12. */
1838
+ export const BETA10_LIFECYCLE_VECTOR_IDS = [
1839
+ 'T-G-1',
1840
+ 'T-J-1',
1841
+ 'T-J-2',
1842
+ 'T-K-1',
1843
+ 'T-K-4',
1844
+ 'T-K-5',
1845
+ 'T-K-6',
1846
+ 'T-K-7',
1847
+ 'T-H-3',
1848
+ 'T-L-1',
1849
+ 'T-L-2',
1850
+ 'T-L-3',
1851
+ 'T-J-3',
1852
+ 'T-K-8',
1853
+ 'T-K-9',
1854
+ 'T-K-10',
1855
+ 'T-M-10',
1856
+ 'T-G-16',
1857
+ 'T-M-11',
1858
+ 'T-G-17',
1859
+ 'T-M-12',
1860
+ 'T-G-18',
1861
+ 'T-L-8',
1862
+ 'T-H-13',
1863
+ 'T-M-13',
1864
+ 'T-G-19',
1865
+ 'T-G-20',
1866
+ 'T-L-9',
1867
+ 'T-L-10',
1868
+ ];
1869
+ /** Complete beta.11 M0-C messaging safety surface for rows 3 through 9. */
1870
+ export const BETA11_MESSAGING_VECTOR_IDS = [
1871
+ 'T-C-3',
1872
+ 'T-H-2', 'T-H-5', 'T-H-9', 'T-L-4',
1873
+ 'T-M-14', 'T-G-21', 'T-M-15', 'T-G-22', 'T-M-16', 'T-G-23',
1874
+ 'T-M-17', 'T-G-24', 'T-M-18', 'T-G-25', 'T-M-19', 'T-G-26',
1875
+ 'T-M-20', 'T-M-21', 'T-G-27',
1876
+ 'T-C-4', 'T-C-5', 'T-C-6',
1877
+ 'T-L-11', 'T-H-14', 'T-L-12', 'T-H-15', 'T-L-13', 'T-H-16',
1878
+ 'T-L-14', 'T-H-17', 'T-L-15', 'T-H-18', 'T-L-16', 'T-H-19',
1879
+ 'T-L-17', 'T-H-20', 'T-H-21', 'T-H-22',
1880
+ ];
1881
+ //# sourceMappingURL=disposition-fixtures.js.map