@clowder-ai/plugin-contract 0.1.0-beta.3 → 0.1.0-beta.37

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 (159) 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 +362 -21
  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 -1
  10. package/dist/conformance/index.d.ts.map +1 -1
  11. package/dist/conformance/index.js +3 -1
  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 +23 -3
  19. package/dist/conformance/runner.js.map +1 -1
  20. package/dist/conformance/stdio-harness/child-process-harness.d.ts +6 -0
  21. package/dist/conformance/stdio-harness/child-process-harness.d.ts.map +1 -1
  22. package/dist/conformance/stdio-harness/child-process-harness.js +26 -9
  23. package/dist/conformance/stdio-harness/child-process-harness.js.map +1 -1
  24. package/dist/conformance/stdio-harness/index.d.ts +1 -1
  25. package/dist/conformance/stdio-harness/index.d.ts.map +1 -1
  26. package/dist/conformance/stdio-harness/index.js +1 -1
  27. package/dist/conformance/stdio-harness/index.js.map +1 -1
  28. package/dist/conformance/stdio-harness/ndjson-frame.d.ts +6 -1
  29. package/dist/conformance/stdio-harness/ndjson-frame.d.ts.map +1 -1
  30. package/dist/conformance/stdio-harness/ndjson-frame.js +7 -1
  31. package/dist/conformance/stdio-harness/ndjson-frame.js.map +1 -1
  32. package/dist/conformance/stdio-harness/wire-shape.d.ts +1 -1
  33. package/dist/docx-materialization.d.ts +8 -0
  34. package/dist/docx-materialization.d.ts.map +1 -0
  35. package/dist/docx-materialization.js +19 -0
  36. package/dist/docx-materialization.js.map +1 -0
  37. package/dist/generated/contract.generated.d.ts +1793 -32
  38. package/dist/generated/contract.generated.d.ts.map +1 -1
  39. package/dist/generated/contract.generated.js +72 -3
  40. package/dist/generated/contract.generated.js.map +1 -1
  41. package/dist/index.d.ts +2 -1
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.js +2 -1
  44. package/dist/index.js.map +1 -1
  45. package/dist/validation/catalog.d.ts +21 -0
  46. package/dist/validation/catalog.d.ts.map +1 -0
  47. package/dist/validation/catalog.js +140 -0
  48. package/dist/validation/catalog.js.map +1 -0
  49. package/dist/validation/cloud-conversation-host.d.ts +18 -0
  50. package/dist/validation/cloud-conversation-host.d.ts.map +1 -0
  51. package/dist/validation/cloud-conversation-host.js +83 -0
  52. package/dist/validation/cloud-conversation-host.js.map +1 -0
  53. package/dist/validation/companion-bridge.d.ts +6 -0
  54. package/dist/validation/companion-bridge.d.ts.map +1 -0
  55. package/dist/validation/companion-bridge.js +198 -0
  56. package/dist/validation/companion-bridge.js.map +1 -0
  57. package/dist/validation/docx-materialization.d.ts +6 -0
  58. package/dist/validation/docx-materialization.d.ts.map +1 -0
  59. package/dist/validation/docx-materialization.js +36 -0
  60. package/dist/validation/docx-materialization.js.map +1 -0
  61. package/dist/validation/index.d.ts +10 -0
  62. package/dist/validation/index.d.ts.map +1 -1
  63. package/dist/validation/index.js +10 -0
  64. package/dist/validation/index.js.map +1 -1
  65. package/dist/validation/manifest.d.ts +23 -0
  66. package/dist/validation/manifest.d.ts.map +1 -0
  67. package/dist/validation/manifest.js +273 -0
  68. package/dist/validation/manifest.js.map +1 -0
  69. package/dist/validation/members.d.ts +4 -0
  70. package/dist/validation/members.d.ts.map +1 -0
  71. package/dist/validation/members.js +11 -0
  72. package/dist/validation/members.js.map +1 -0
  73. package/dist/validation/messaging-semantic.d.ts.map +1 -1
  74. package/dist/validation/messaging-semantic.js +98 -0
  75. package/dist/validation/messaging-semantic.js.map +1 -1
  76. package/dist/validation/messaging-wire.d.ts +42 -0
  77. package/dist/validation/messaging-wire.d.ts.map +1 -0
  78. package/dist/validation/messaging-wire.js +184 -0
  79. package/dist/validation/messaging-wire.js.map +1 -0
  80. package/dist/validation/operation-rows.d.ts +25 -0
  81. package/dist/validation/operation-rows.d.ts.map +1 -0
  82. package/dist/validation/operation-rows.js +135 -0
  83. package/dist/validation/operation-rows.js.map +1 -0
  84. package/dist/validation/signals.d.ts +17 -0
  85. package/dist/validation/signals.d.ts.map +1 -0
  86. package/dist/validation/signals.js +32 -0
  87. package/dist/validation/signals.js.map +1 -0
  88. package/dist/wire/constants.d.ts +2 -1
  89. package/dist/wire/constants.d.ts.map +1 -1
  90. package/dist/wire/constants.js +2 -1
  91. package/dist/wire/constants.js.map +1 -1
  92. package/dist/wire/dispatch.d.ts +49 -0
  93. package/dist/wire/dispatch.d.ts.map +1 -0
  94. package/dist/wire/dispatch.js +880 -0
  95. package/dist/wire/dispatch.js.map +1 -0
  96. package/dist/wire/disposition-fixtures.d.ts +19 -2
  97. package/dist/wire/disposition-fixtures.d.ts.map +1 -1
  98. package/dist/wire/disposition-fixtures.js +1110 -77
  99. package/dist/wire/disposition-fixtures.js.map +1 -1
  100. package/dist/wire/disposition.d.ts +10 -8
  101. package/dist/wire/disposition.d.ts.map +1 -1
  102. package/dist/wire/disposition.js +20 -8
  103. package/dist/wire/disposition.js.map +1 -1
  104. package/dist/wire/envelope.d.ts +31 -0
  105. package/dist/wire/envelope.d.ts.map +1 -1
  106. package/dist/wire/envelope.js +48 -1
  107. package/dist/wire/envelope.js.map +1 -1
  108. package/dist/wire/errors.d.ts +31 -1
  109. package/dist/wire/errors.d.ts.map +1 -1
  110. package/dist/wire/errors.js +36 -0
  111. package/dist/wire/errors.js.map +1 -1
  112. package/dist/wire/grants.d.ts +4 -4
  113. package/dist/wire/grants.js +3 -3
  114. package/dist/wire/handshake-byte-bounds.d.ts +69 -0
  115. package/dist/wire/handshake-byte-bounds.d.ts.map +1 -0
  116. package/dist/wire/handshake-byte-bounds.js +176 -0
  117. package/dist/wire/handshake-byte-bounds.js.map +1 -0
  118. package/dist/wire/handshake.d.ts +59 -7
  119. package/dist/wire/handshake.d.ts.map +1 -1
  120. package/dist/wire/handshake.js +132 -10
  121. package/dist/wire/handshake.js.map +1 -1
  122. package/dist/wire/index.d.ts +18 -7
  123. package/dist/wire/index.d.ts.map +1 -1
  124. package/dist/wire/index.js +35 -6
  125. package/dist/wire/index.js.map +1 -1
  126. package/dist/wire/lifecycle-byte-bounds.d.ts +40 -0
  127. package/dist/wire/lifecycle-byte-bounds.d.ts.map +1 -0
  128. package/dist/wire/lifecycle-byte-bounds.js +149 -0
  129. package/dist/wire/lifecycle-byte-bounds.js.map +1 -0
  130. package/dist/wire/messaging-byte-bounds.d.ts +62 -0
  131. package/dist/wire/messaging-byte-bounds.d.ts.map +1 -0
  132. package/dist/wire/messaging-byte-bounds.js +581 -0
  133. package/dist/wire/messaging-byte-bounds.js.map +1 -0
  134. package/dist/wire/registry.d.ts +192 -35
  135. package/dist/wire/registry.d.ts.map +1 -1
  136. package/dist/wire/registry.js +57 -79
  137. package/dist/wire/registry.js.map +1 -1
  138. package/dist/wire/row-shapes.d.ts +98 -81
  139. package/dist/wire/row-shapes.d.ts.map +1 -1
  140. package/dist/wire/row-shapes.js +31 -4
  141. package/dist/wire/row-shapes.js.map +1 -1
  142. package/fixtures/behavior/messaging/adversarial-invariants.json +92 -2
  143. package/fixtures/manifest/invalid/duplicate-signal-type.json +35 -0
  144. package/fixtures/manifest/invalid/icon-package-escape.json +22 -0
  145. package/fixtures/manifest/valid/localized-product-metadata.json +27 -0
  146. package/fixtures/messaging/valid/subscription-delivery.json +1 -1
  147. package/fixtures/signals/invalid/dynamic-schema-url.json +10 -0
  148. package/fixtures/signals/invalid/forbidden-raw-privacy.json +10 -0
  149. package/fixtures/signals/valid/remote-service-declaration.json +10 -0
  150. package/package.json +18 -5
  151. package/src/schemas/behavior-fixture.schema.json +903 -116
  152. package/src/schemas/catalog.schema.json +91 -0
  153. package/src/schemas/companion-bridge.schema.json +2256 -0
  154. package/src/schemas/docx-materialization.schema.json +302 -0
  155. package/src/schemas/manifest.schema.json +2223 -89
  156. package/src/schemas/messaging.schema.json +692 -40
  157. package/src/schemas/physical-limb.schema.json +319 -0
  158. package/src/schemas/plugin-metadata.schema.json +62 -0
  159. package/src/schemas/signal.schema.json +119 -0
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Disposition conformance fixture vectors — machine-readable test data
3
- * for the pre-dispatch disposition table (T-A through T-L).
3
+ * for the pre-dispatch disposition table (T-A through T-M).
4
4
  *
5
5
  * Mechanized VERBATIM from §3.8-1 of the #1165 frozen plan (rev11,
6
6
  * SHA 7e26e5af). Each vector carries:
@@ -19,7 +19,7 @@
19
19
  * - 7 notification-partition sub-cases (NOTIFICATION_PARTITION_CASES)
20
20
  * "your correction #4's five, the idless-envelope fixture,
21
21
  * and the R8 row-10 value-failure fixture"
22
- * - All 12 T-classes have ≥1 vector
22
+ * - All 13 T-classes have ≥1 vector
23
23
  * - Pre-state mutual-exclusivity proof pairs:
24
24
  * ping nonce (T-H-3 / T-L-2), row-9 deliveryId (T-H-9 / T-L-4)
25
25
  *
@@ -29,7 +29,11 @@
29
29
  * Partition records carry {vectorId, expectedClass} per case (FC-70-4).
30
30
  * Tests verify both existence AND class correctness per key.
31
31
  */
32
- 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, } from './errors.js';
32
+ import { BINDING_NONCE_MAX_LENGTH, PLUGIN_ID_MAX_LENGTH, } from './handshake.js';
33
+ import { MAX_GRANT_ITEMS, 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';
33
37
  // ---------------------------------------------------------------------------
34
38
  // Closed error arm names — the 11 concrete envelope types from envelope.ts
35
39
  // ---------------------------------------------------------------------------
@@ -74,6 +78,133 @@ const RESPONSE_INVALID_PARAMS_A = {
74
78
  id: 'a',
75
79
  error: { code: INVALID_PARAMS_CODE, message: INVALID_PARAMS_MESSAGE },
76
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
+ .sort((a, b) => Buffer.byteLength(JSON.stringify(b)) - Buffer.byteLength(JSON.stringify(a)) || a.localeCompare(b))
112
+ .slice(0, MAX_GRANT_ITEMS);
113
+ const BETA8_BINDING = {
114
+ ...BETA8_HELLO,
115
+ pluginInstanceId: 'instance-1',
116
+ brokerSessionId: 'session-1',
117
+ grantRevision: 0,
118
+ effectiveGrants: [],
119
+ bindingNonce: 'nonce-1',
120
+ };
121
+ const RESPONSE_HANDSHAKE_REJECTED_HELLO = {
122
+ jsonrpc: '2.0',
123
+ id: 'hello-error',
124
+ error: {
125
+ code: HANDSHAKE_REJECTED_CODE,
126
+ message: HANDSHAKE_REJECTED_MESSAGE,
127
+ data: { reason: 'PACKAGE_MISMATCH' },
128
+ },
129
+ };
130
+ function helloRequestFrame(id, input) {
131
+ return JSON.stringify({
132
+ jsonrpc: '2.0',
133
+ id,
134
+ method: 'broker.hello',
135
+ params: { meta: { deadlineUnixMs: 1 }, input },
136
+ });
137
+ }
138
+ function readyRequestFrame(id, input) {
139
+ return JSON.stringify({
140
+ jsonrpc: '2.0',
141
+ id,
142
+ method: 'broker.ready',
143
+ params: { meta: { deadlineUnixMs: 1 }, input },
144
+ });
145
+ }
146
+ function helloResultFrame(id, result) {
147
+ return JSON.stringify({ jsonrpc: '2.0', id, result });
148
+ }
149
+ function lifecycleRequestFrame(id, method, input) {
150
+ return JSON.stringify({
151
+ jsonrpc: '2.0',
152
+ id,
153
+ method,
154
+ params: { meta: { deadlineUnixMs: WIRE_UINT53_MAX }, input },
155
+ });
156
+ }
157
+ function grantsChangedNotificationFrame(effectiveGrants) {
158
+ return JSON.stringify({
159
+ jsonrpc: '2.0',
160
+ method: 'host.grants.changed',
161
+ params: {
162
+ meta: { deadlineUnixMs: WIRE_UINT53_MAX },
163
+ input: { grantRevision: WIRE_UINT53_MAX, effectiveGrants },
164
+ },
165
+ });
166
+ }
167
+ function messagingRequestFrame(id, method, input) {
168
+ return JSON.stringify({
169
+ jsonrpc: '2.0',
170
+ id,
171
+ method,
172
+ params: { meta: { deadlineUnixMs: WIRE_UINT53_MAX }, input },
173
+ });
174
+ }
175
+ const M0C_DRAFT = {
176
+ address: { kind: 'thread_handle', handle: 'thread-handle-1' },
177
+ idempotencyKey: 'send-1',
178
+ payload: {
179
+ provenance: { epistemicStatus: 'inference' },
180
+ elements: [
181
+ { elementId: 'element-1', kind: 'text', payload: { text: 'hello' } },
182
+ ],
183
+ },
184
+ };
185
+ const M0C_ENVELOPE = {
186
+ messageId: 'message-1',
187
+ revision: 1,
188
+ threadId: 'thread-1',
189
+ actor: { kind: 'user', id: 'user-1' },
190
+ audience: { kind: 'public' },
191
+ occurredAt: '2026-08-18T03:00:00.000Z',
192
+ payload: {
193
+ provenance: {
194
+ origin: { kind: 'host' },
195
+ epistemicStatus: 'user_intent',
196
+ },
197
+ elements: [
198
+ { elementId: 'element-1', kind: 'text', payload: { text: 'hello' } },
199
+ ],
200
+ },
201
+ };
202
+ const M0C_PUBLISH_EVENT = {
203
+ eventId: 'event-1',
204
+ sequence: 1,
205
+ type: 'message.publish',
206
+ envelope: M0C_ENVELOPE,
207
+ };
77
208
  /**
78
209
  * 9 response-candidate sub-cases per §3.8-1:
79
210
  * "your R9 correction #5's five required cases plus four controls"
@@ -109,7 +240,7 @@ export const RESPONSE_CANDIDATE_CASES = {
109
240
  */
110
241
  export const NOTIFICATION_PARTITION_CASES = {
111
242
  /** §3.8-1 NT #1: legal row-10 notification → T-J accept */
112
- 'nt-1-legal-row10': { vectorId: 'T-J-1', expectedClass: 'T-J' },
243
+ 'nt-1-removed-callback': { vectorId: 'T-K-11', expectedClass: 'T-K' },
113
244
  /** §3.8-1 NT #2: request-only method without id → T-K close */
114
245
  'nt-2-request-method': { vectorId: 'T-K-1', expectedClass: 'T-K' },
115
246
  /** §3.8-1 NT #3: unknown method without id → T-K close */
@@ -127,6 +258,10 @@ export const NOTIFICATION_PARTITION_CASES = {
127
258
  // The fixture vectors (35 total)
128
259
  // ---------------------------------------------------------------------------
129
260
  export const DISPOSITION_FIXTURE_VECTORS = [
261
+ { id: 'T-K-4', rawFrame: "{\"jsonrpc\":\"2.0\",\"method\":\"host.lifecycle.ping\",\"params\":{\"meta\":{\"deadlineUnixMs\":1},\"input\":{\"nonce\":\"n\"}},\"error\":{\"code\":-1}}", rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] }, expectedClass: 'T-K', expectedOutcome: 'close', expectedErrorArm: null, expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true, description: 'request-only ping notification rejects without dispatch' },
262
+ { id: 'T-K-5', rawFrame: "{\"jsonrpc\":\"2.0\",\"method\":\"host.lifecycle.ping\",\"extra\":true,\"params\":{\"meta\":{\"deadlineUnixMs\":1},\"input\":{\"nonce\":\"n\"}}}", rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] }, expectedClass: 'T-K', expectedOutcome: 'close', expectedErrorArm: null, expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true, description: 'request-only ping notification rejects without dispatch' },
263
+ { id: 'T-K-6', rawFrame: "{\"jsonrpc\":\"2.0\",\"method\":\"host.lifecycle.ping\",\"params\":{\"meta\":{\"deadlineUnixMs\":1},\"input\":null}}", rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] }, expectedClass: 'T-K', expectedOutcome: 'close', expectedErrorArm: null, expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true, description: 'request-only ping notification rejects without dispatch' },
264
+ { id: 'T-K-7', rawFrame: "{\"jsonrpc\":\"2.0\",\"method\":\"host.lifecycle.ping\",\"params\":{\"meta\":{\"deadlineUnixMs\":0},\"input\":{\"nonce\":\"n\"}}}", rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] }, expectedClass: 'T-K', expectedOutcome: 'close', expectedErrorArm: null, expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true, description: 'request-only ping notification rejects without dispatch' },
130
265
  // ═════════════════════════════════════════════════════════════════════════
131
266
  // PRE-STRUCTURAL (T-A, T-B, T-C)
132
267
  // ═════════════════════════════════════════════════════════════════════════
@@ -166,6 +301,38 @@ export const DISPOSITION_FIXTURE_VECTORS = [
166
301
  expectedResponseFrame: null,
167
302
  description: 'frame-canonicality failure: whitespace in compact JSON',
168
303
  },
304
+ {
305
+ id: 'T-C-2',
306
+ rawFrame: helloResultFrame('hello-h7-negative', {
307
+ ...BETA8_BINDING,
308
+ grantRevision: -1,
309
+ }),
310
+ rawFrameEncoding: 'utf8',
311
+ preState: { inFlightRequests: [{ id: 'hello-h7-negative', method: 'broker.hello', requestSnapshot: { candidateHello: BETA8_HELLO } }] },
312
+ expectedClass: 'T-C',
313
+ expectedOutcome: 'close',
314
+ expectedErrorArm: null,
315
+ expectedErrorCode: null,
316
+ expectedResponseFrame: null,
317
+ zeroSideEffects: true,
318
+ description: '[beta.8 H7 raw token] negative SessionBinding grantRevision is rejected at canonicality before correlation',
319
+ },
320
+ {
321
+ id: 'T-C-3',
322
+ rawFrame: messagingRequestFrame('read-fractional', 'messaging.read', {
323
+ subscriptionId: 'subscription-1',
324
+ limit: 1.5,
325
+ }),
326
+ rawFrameEncoding: 'utf8',
327
+ preState: { inFlightRequests: [] },
328
+ expectedClass: 'T-C',
329
+ expectedOutcome: 'close',
330
+ expectedErrorArm: null,
331
+ expectedErrorCode: null,
332
+ expectedResponseFrame: null,
333
+ zeroSideEffects: true,
334
+ description: '[beta.11 messaging] fractional read limit is rejected at canonicality before method validation',
335
+ },
169
336
  // ═════════════════════════════════════════════════════════════════════════
170
337
  // T-D: canonical idless NON-response-candidate, NOT a valid Request
171
338
  // object (missing/non-string jsonrpc/method)
@@ -263,7 +430,7 @@ export const DISPOSITION_FIXTURE_VECTORS = [
263
430
  expectedErrorArm: 'MethodNotFoundEnvelope',
264
431
  expectedErrorCode: -32601,
265
432
  expectedResponseFrame: JSON.stringify(RESPONSE_METHOD_NOT_FOUND_A),
266
- description: 'envelope violation: unknown method not in 12-row registry',
433
+ description: 'envelope violation: unknown method not in 13-row registry',
267
434
  },
268
435
  {
269
436
  id: 'T-F-3',
@@ -302,6 +469,7 @@ export const DISPOSITION_FIXTURE_VECTORS = [
302
469
  expectedErrorArm: 'InvalidParamsEnvelope',
303
470
  expectedErrorCode: -32602,
304
471
  expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
472
+ zeroSideEffects: true,
305
473
  description: 'value violation: nonce empty string violates minLength 1',
306
474
  },
307
475
  // ═════════════════════════════════════════════════════════════════════════
@@ -330,30 +498,6 @@ export const DISPOSITION_FIXTURE_VECTORS = [
330
498
  // T-K-6 (NT-4), T-K-5 (NT-5), T-K-7 (NT-6), T-D-1 (NT-7).
331
499
  // Additional: T-J-2, T-K-2.
332
500
  // ═════════════════════════════════════════════════════════════════════════
333
- {
334
- id: 'T-J-1',
335
- rawFrame: '{"jsonrpc":"2.0","method":"host.grants.changed","params":{"meta":{"deadlineUnixMs":1},"input":{"grantRevision":0,"effectiveGrants":[]}}}',
336
- rawFrameEncoding: 'utf8',
337
- preState: { inFlightRequests: [] },
338
- expectedClass: 'T-J',
339
- expectedOutcome: 'accept',
340
- expectedErrorArm: null,
341
- expectedErrorCode: null,
342
- expectedResponseFrame: null,
343
- description: '[NT-1] legal row-10 grants.changed notification, empty grants',
344
- },
345
- {
346
- id: 'T-J-2',
347
- rawFrame: '{"jsonrpc":"2.0","method":"host.grants.changed","params":{"meta":{"deadlineUnixMs":1},"input":{"grantRevision":1,"effectiveGrants":["message.event.subscribe"]}}}',
348
- rawFrameEncoding: 'utf8',
349
- preState: { inFlightRequests: [] },
350
- expectedClass: 'T-J',
351
- expectedOutcome: 'accept',
352
- expectedErrorArm: null,
353
- expectedErrorCode: null,
354
- expectedResponseFrame: null,
355
- description: 'legal row-10 grants.changed, non-empty grants (additional NT-1 variant)',
356
- },
357
501
  {
358
502
  id: 'T-K-1',
359
503
  rawFrame: '{"jsonrpc":"2.0","method":"host.lifecycle.ping","params":{"meta":{"deadlineUnixMs":1},"input":{"nonce":"x"}}}',
@@ -364,6 +508,7 @@ export const DISPOSITION_FIXTURE_VECTORS = [
364
508
  expectedErrorArm: null,
365
509
  expectedErrorCode: null,
366
510
  expectedResponseFrame: null,
511
+ zeroSideEffects: true,
367
512
  description: '[NT-2] request-only method (ping, row 11) as notification → v0 violation',
368
513
  },
369
514
  {
@@ -390,54 +535,6 @@ export const DISPOSITION_FIXTURE_VECTORS = [
390
535
  expectedResponseFrame: null,
391
536
  description: '[NT-3] unknown method as notification → v0 violation',
392
537
  },
393
- {
394
- id: 'T-K-4',
395
- rawFrame: '{"jsonrpc":"2.0","method":"host.grants.changed","params":{"meta":{"deadlineUnixMs":1},"input":{"grantRevision":0,"effectiveGrants":[]}},"error":{"code":-32600,"message":"Invalid Request"}}',
396
- rawFrameEncoding: 'utf8',
397
- preState: { inFlightRequests: [] },
398
- expectedClass: 'T-K',
399
- expectedOutcome: 'close',
400
- expectedErrorArm: null,
401
- expectedErrorCode: null,
402
- expectedResponseFrame: null,
403
- description: '[RC-7 / NT-5 variant] Notification with extra error member → T-K close',
404
- },
405
- {
406
- id: 'T-K-5',
407
- rawFrame: '{"jsonrpc":"2.0","method":"host.grants.changed"}',
408
- rawFrameEncoding: 'utf8',
409
- preState: { inFlightRequests: [] },
410
- expectedClass: 'T-K',
411
- expectedOutcome: 'close',
412
- expectedErrorArm: null,
413
- expectedErrorCode: null,
414
- expectedResponseFrame: null,
415
- description: '[NT-5] Notification missing params → idless envelope violation → T-K close',
416
- },
417
- {
418
- id: 'T-K-6',
419
- rawFrame: '{"jsonrpc":"2.0","method":"host.grants.changed","params":{"meta":{"deadlineUnixMs":1},"input":{"grantRevision":"not-a-number","effectiveGrants":[]}}}',
420
- rawFrameEncoding: 'utf8',
421
- preState: { inFlightRequests: [] },
422
- expectedClass: 'T-K',
423
- expectedOutcome: 'close',
424
- expectedErrorArm: null,
425
- expectedErrorCode: null,
426
- expectedResponseFrame: null,
427
- description: '[NT-4] structurally valid Notification, invocation-level invalid params (grantRevision wrong type)',
428
- },
429
- {
430
- id: 'T-K-7',
431
- rawFrame: '{"jsonrpc":"2.0","method":"host.grants.changed","params":{"meta":{"deadlineUnixMs":0},"input":{"grantRevision":0,"effectiveGrants":[]}}}',
432
- rawFrameEncoding: 'utf8',
433
- preState: { inFlightRequests: [] },
434
- expectedClass: 'T-K',
435
- expectedOutcome: 'close',
436
- expectedErrorArm: null,
437
- expectedErrorCode: null,
438
- expectedResponseFrame: null,
439
- description: '[NT-6] row-10 notification with deadlineUnixMs:0 → value failure (H7), T-K close',
440
- },
441
538
  // ═════════════════════════════════════════════════════════════════════════
442
539
  // RESPONSE-CANDIDATE PARTITION — frozen 9 cases + additional coverage
443
540
  //
@@ -473,6 +570,7 @@ export const DISPOSITION_FIXTURE_VECTORS = [
473
570
  expectedErrorArm: null,
474
571
  expectedErrorCode: null,
475
572
  expectedResponseFrame: null,
573
+ zeroSideEffects: true,
476
574
  description: 'response-candidate: both result AND error present (additional coverage)',
477
575
  },
478
576
  // ── MUTUAL-EXCLUSIVITY PROOF PAIR ─────────────────────────────────────
@@ -489,6 +587,7 @@ export const DISPOSITION_FIXTURE_VECTORS = [
489
587
  expectedErrorArm: null,
490
588
  expectedErrorCode: null,
491
589
  expectedResponseFrame: null,
590
+ zeroSideEffects: true,
492
591
  description: 'proof pair: "corr-test" NOT in-flight → T-H (see T-L-2)',
493
592
  },
494
593
  {
@@ -513,6 +612,7 @@ export const DISPOSITION_FIXTURE_VECTORS = [
513
612
  expectedErrorArm: null,
514
613
  expectedErrorCode: null,
515
614
  expectedResponseFrame: null,
615
+ zeroSideEffects: true,
516
616
  description: 'response-candidate: error body is string not object (additional coverage)',
517
617
  },
518
618
  {
@@ -561,6 +661,7 @@ export const DISPOSITION_FIXTURE_VECTORS = [
561
661
  expectedErrorArm: null,
562
662
  expectedErrorCode: null,
563
663
  expectedResponseFrame: null,
664
+ zeroSideEffects: true,
564
665
  description: '[RC-5] row-9 ack with wrong deliveryId: byte-equality fails → T-H, never T-L',
565
666
  },
566
667
  // ── T-L: valid correlated response (settlement) ──────────────────────
@@ -619,5 +720,937 @@ export const DISPOSITION_FIXTURE_VECTORS = [
619
720
  expectedResponseFrame: null,
620
721
  description: '[R47 pair] row-9 ack with correct deliveryId: byte-equality passes → T-L (see T-H-9)',
621
722
  },
723
+ // ── T-M: legal Request on a ready row ─────────────────────────────────
724
+ {
725
+ id: 'T-M-1',
726
+ 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"}}}',
727
+ rawFrameEncoding: 'utf8',
728
+ preState: { inFlightRequests: [] },
729
+ expectedClass: 'T-M',
730
+ expectedOutcome: 'accept',
731
+ expectedErrorArm: null,
732
+ expectedErrorCode: null,
733
+ expectedResponseFrame: null,
734
+ zeroSideEffects: true,
735
+ description: 'legal broker.hello Request after beta.8 closes and readies row 1',
736
+ },
737
+ {
738
+ id: 'T-M-2',
739
+ rawFrame: '{"jsonrpc":"2.0","id":"ready-1","method":"broker.ready","params":{"meta":{"deadlineUnixMs":1},"input":{"bindingNonce":"nonce-1"}}}',
740
+ rawFrameEncoding: 'utf8',
741
+ preState: { inFlightRequests: [] },
742
+ expectedClass: 'T-M',
743
+ expectedOutcome: 'accept',
744
+ expectedErrorArm: null,
745
+ expectedErrorCode: null,
746
+ expectedResponseFrame: null,
747
+ zeroSideEffects: true,
748
+ description: 'legal broker.ready activation request reaches dispatch but does not activate during classification',
749
+ },
750
+ {
751
+ id: 'T-G-2',
752
+ 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"}}}',
753
+ rawFrameEncoding: 'utf8',
754
+ preState: { inFlightRequests: [] },
755
+ expectedClass: 'T-G',
756
+ expectedOutcome: 'respond',
757
+ expectedErrorArm: 'HandshakeRejectedEnvelope',
758
+ expectedErrorCode: HANDSHAKE_REJECTED_CODE,
759
+ expectedResponseFrame: JSON.stringify(RESPONSE_HANDSHAKE_REJECTED_AUTHORITY_A),
760
+ zeroSideEffects: true,
761
+ description: 'broker.hello authority injection is rejected before dispatch with zero side effects',
762
+ },
763
+ {
764
+ id: 'T-M-3',
765
+ rawFrame: helloRequestFrame('a', {
766
+ ...BETA8_HELLO,
767
+ pluginId: RAW_UTF8_BOUNDARY_CODE_POINTS.ascii.repeat(PLUGIN_ID_MAX_LENGTH),
768
+ }),
769
+ rawFrameEncoding: 'utf8',
770
+ preState: { inFlightRequests: [] },
771
+ expectedClass: 'T-M',
772
+ expectedOutcome: 'accept',
773
+ expectedErrorArm: null,
774
+ expectedErrorCode: null,
775
+ expectedResponseFrame: null,
776
+ zeroSideEffects: true,
777
+ description: '[beta.8 H1 raw-byte N] maximum pluginId request is legal before dispatch',
778
+ },
779
+ {
780
+ id: 'T-G-3',
781
+ rawFrame: helloRequestFrame('a', { ...BETA8_HELLO, pluginId: '' }),
782
+ rawFrameEncoding: 'utf8',
783
+ preState: { inFlightRequests: [] },
784
+ expectedClass: 'T-G',
785
+ expectedOutcome: 'respond',
786
+ expectedErrorArm: 'InvalidParamsEnvelope',
787
+ expectedErrorCode: INVALID_PARAMS_CODE,
788
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
789
+ zeroSideEffects: true,
790
+ description: '[beta.8 H1] empty pluginId is rejected before dispatch',
791
+ },
792
+ {
793
+ id: 'T-G-4',
794
+ rawFrame: helloRequestFrame('a', { ...BETA8_HELLO, packageDigest: 'sha512-invalid==' }),
795
+ rawFrameEncoding: 'utf8',
796
+ preState: { inFlightRequests: [] },
797
+ expectedClass: 'T-G',
798
+ expectedOutcome: 'respond',
799
+ expectedErrorArm: 'InvalidParamsEnvelope',
800
+ expectedErrorCode: INVALID_PARAMS_CODE,
801
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
802
+ zeroSideEffects: true,
803
+ description: '[beta.8 H2] malformed package digest is rejected before dispatch',
804
+ },
805
+ {
806
+ id: 'T-G-5',
807
+ rawFrame: helloRequestFrame('a', { ...BETA8_HELLO, contractVersion: 'beta.8' }),
808
+ rawFrameEncoding: 'utf8',
809
+ preState: { inFlightRequests: [] },
810
+ expectedClass: 'T-G',
811
+ expectedOutcome: 'respond',
812
+ expectedErrorArm: 'InvalidParamsEnvelope',
813
+ expectedErrorCode: INVALID_PARAMS_CODE,
814
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
815
+ zeroSideEffects: true,
816
+ description: '[beta.8 H3] non-SemVer contractVersion is rejected before dispatch',
817
+ },
818
+ {
819
+ id: 'T-G-6',
820
+ rawFrame: helloRequestFrame('a', { ...BETA8_HELLO, wireVersion: 'wire-v1' }),
821
+ rawFrameEncoding: 'utf8',
822
+ preState: { inFlightRequests: [] },
823
+ expectedClass: 'T-G',
824
+ expectedOutcome: 'respond',
825
+ expectedErrorArm: 'InvalidParamsEnvelope',
826
+ expectedErrorCode: INVALID_PARAMS_CODE,
827
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
828
+ zeroSideEffects: true,
829
+ description: '[beta.8 H4] non-SemVer wireVersion is rejected before dispatch',
830
+ },
831
+ {
832
+ id: 'T-G-7',
833
+ rawFrame: helloRequestFrame('a', {
834
+ ...BETA8_HELLO,
835
+ pluginId: RAW_UTF8_BOUNDARY_CODE_POINTS.ascii.repeat(PLUGIN_ID_MAX_LENGTH + 1),
836
+ }),
837
+ rawFrameEncoding: 'utf8',
838
+ preState: { inFlightRequests: [] },
839
+ expectedClass: 'T-G',
840
+ expectedOutcome: 'respond',
841
+ expectedErrorArm: 'InvalidParamsEnvelope',
842
+ expectedErrorCode: INVALID_PARAMS_CODE,
843
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
844
+ zeroSideEffects: true,
845
+ description: '[beta.8 H1 raw-byte N+1] oversize pluginId is rejected before dispatch',
846
+ },
847
+ {
848
+ id: 'T-M-4',
849
+ rawFrame: helloRequestFrame('a', {
850
+ ...BETA8_HELLO,
851
+ pluginId: RAW_UTF8_BOUNDARY_CODE_POINTS.multibyte.repeat(PLUGIN_ID_MAX_LENGTH),
852
+ }),
853
+ rawFrameEncoding: 'utf8',
854
+ preState: { inFlightRequests: [] },
855
+ expectedClass: 'T-M',
856
+ expectedOutcome: 'accept',
857
+ expectedErrorArm: null,
858
+ expectedErrorCode: null,
859
+ expectedResponseFrame: null,
860
+ zeroSideEffects: true,
861
+ description: '[beta.8 H1 multibyte N] maximum pluginId request is legal before dispatch',
862
+ },
863
+ {
864
+ id: 'T-G-11',
865
+ rawFrame: helloRequestFrame('a', {
866
+ ...BETA8_HELLO,
867
+ pluginId: RAW_UTF8_BOUNDARY_CODE_POINTS.multibyte.repeat(PLUGIN_ID_MAX_LENGTH + 1),
868
+ }),
869
+ rawFrameEncoding: 'utf8',
870
+ preState: { inFlightRequests: [] },
871
+ expectedClass: 'T-G',
872
+ expectedOutcome: 'respond',
873
+ expectedErrorArm: 'InvalidParamsEnvelope',
874
+ expectedErrorCode: INVALID_PARAMS_CODE,
875
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
876
+ zeroSideEffects: true,
877
+ description: '[beta.8 H1 multibyte N+1] oversize pluginId is rejected before dispatch',
878
+ },
879
+ {
880
+ id: 'T-M-5',
881
+ rawFrame: helloRequestFrame('a', {
882
+ ...BETA8_HELLO,
883
+ pluginId: RAW_UTF8_BOUNDARY_CODE_POINTS.escaping.repeat(PLUGIN_ID_MAX_LENGTH),
884
+ }),
885
+ rawFrameEncoding: 'utf8',
886
+ preState: { inFlightRequests: [] },
887
+ expectedClass: 'T-M',
888
+ expectedOutcome: 'accept',
889
+ expectedErrorArm: null,
890
+ expectedErrorCode: null,
891
+ expectedResponseFrame: null,
892
+ zeroSideEffects: true,
893
+ description: '[beta.8 H1 JSON-escaping N] maximum pluginId request is legal before dispatch',
894
+ },
895
+ {
896
+ id: 'T-G-12',
897
+ rawFrame: helloRequestFrame('a', {
898
+ ...BETA8_HELLO,
899
+ pluginId: RAW_UTF8_BOUNDARY_CODE_POINTS.escaping.repeat(PLUGIN_ID_MAX_LENGTH + 1),
900
+ }),
901
+ rawFrameEncoding: 'utf8',
902
+ preState: { inFlightRequests: [] },
903
+ expectedClass: 'T-G',
904
+ expectedOutcome: 'respond',
905
+ expectedErrorArm: 'InvalidParamsEnvelope',
906
+ expectedErrorCode: INVALID_PARAMS_CODE,
907
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
908
+ zeroSideEffects: true,
909
+ description: '[beta.8 H1 JSON-escaping N+1] oversize pluginId is rejected before dispatch',
910
+ },
911
+ {
912
+ id: 'T-G-8',
913
+ rawFrame: readyRequestFrame('a', { bindingNonce: 1 }),
914
+ rawFrameEncoding: 'utf8',
915
+ preState: { inFlightRequests: [] },
916
+ expectedClass: 'T-G',
917
+ expectedOutcome: 'respond',
918
+ expectedErrorArm: 'InvalidParamsEnvelope',
919
+ expectedErrorCode: INVALID_PARAMS_CODE,
920
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
921
+ zeroSideEffects: true,
922
+ description: '[beta.8 H9] broker.ready wrong-type bindingNonce is rejected before activation',
923
+ },
924
+ {
925
+ id: 'T-G-9',
926
+ rawFrame: readyRequestFrame('a', {
927
+ bindingNonce: RAW_UTF8_BOUNDARY_CODE_POINTS.ascii.repeat(BINDING_NONCE_MAX_LENGTH + 1),
928
+ }),
929
+ rawFrameEncoding: 'utf8',
930
+ preState: { inFlightRequests: [] },
931
+ expectedClass: 'T-G',
932
+ expectedOutcome: 'respond',
933
+ expectedErrorArm: 'InvalidParamsEnvelope',
934
+ expectedErrorCode: INVALID_PARAMS_CODE,
935
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
936
+ zeroSideEffects: true,
937
+ description: '[beta.8 H9 code-point N+1] oversize broker.ready bindingNonce is rejected before activation',
938
+ },
939
+ {
940
+ id: 'T-M-6',
941
+ rawFrame: readyRequestFrame('a', {
942
+ bindingNonce: RAW_UTF8_BOUNDARY_CODE_POINTS.ascii.repeat(BINDING_NONCE_MAX_LENGTH),
943
+ }),
944
+ rawFrameEncoding: 'utf8',
945
+ preState: { inFlightRequests: [] },
946
+ expectedClass: 'T-M',
947
+ expectedOutcome: 'accept',
948
+ expectedErrorArm: null,
949
+ expectedErrorCode: null,
950
+ expectedResponseFrame: null,
951
+ zeroSideEffects: true,
952
+ description: '[beta.8 H9 ASCII N] maximum broker.ready bindingNonce is legal before activation',
953
+ },
954
+ {
955
+ id: 'T-M-7',
956
+ rawFrame: readyRequestFrame('a', {
957
+ bindingNonce: RAW_UTF8_BOUNDARY_CODE_POINTS.multibyte.repeat(BINDING_NONCE_MAX_LENGTH),
958
+ }),
959
+ rawFrameEncoding: 'utf8',
960
+ preState: { inFlightRequests: [] },
961
+ expectedClass: 'T-M',
962
+ expectedOutcome: 'accept',
963
+ expectedErrorArm: null,
964
+ expectedErrorCode: null,
965
+ expectedResponseFrame: null,
966
+ zeroSideEffects: true,
967
+ description: '[beta.8 H9 multibyte N] maximum broker.ready bindingNonce is legal before activation',
968
+ },
969
+ {
970
+ id: 'T-G-13',
971
+ rawFrame: readyRequestFrame('a', {
972
+ bindingNonce: RAW_UTF8_BOUNDARY_CODE_POINTS.multibyte.repeat(BINDING_NONCE_MAX_LENGTH + 1),
973
+ }),
974
+ rawFrameEncoding: 'utf8',
975
+ preState: { inFlightRequests: [] },
976
+ expectedClass: 'T-G',
977
+ expectedOutcome: 'respond',
978
+ expectedErrorArm: 'InvalidParamsEnvelope',
979
+ expectedErrorCode: INVALID_PARAMS_CODE,
980
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
981
+ zeroSideEffects: true,
982
+ description: '[beta.8 H9 multibyte N+1] oversize broker.ready bindingNonce is rejected before activation',
983
+ },
984
+ {
985
+ id: 'T-M-8',
986
+ rawFrame: readyRequestFrame('a', {
987
+ bindingNonce: RAW_UTF8_BOUNDARY_CODE_POINTS.escaping.repeat(BINDING_NONCE_MAX_LENGTH),
988
+ }),
989
+ rawFrameEncoding: 'utf8',
990
+ preState: { inFlightRequests: [] },
991
+ expectedClass: 'T-M',
992
+ expectedOutcome: 'accept',
993
+ expectedErrorArm: null,
994
+ expectedErrorCode: null,
995
+ expectedResponseFrame: null,
996
+ zeroSideEffects: true,
997
+ description: '[beta.8 H9 JSON-escaping N] maximum broker.ready bindingNonce is legal before activation',
998
+ },
999
+ {
1000
+ id: 'T-G-14',
1001
+ rawFrame: readyRequestFrame('a', {
1002
+ bindingNonce: RAW_UTF8_BOUNDARY_CODE_POINTS.escaping.repeat(BINDING_NONCE_MAX_LENGTH + 1),
1003
+ }),
1004
+ rawFrameEncoding: 'utf8',
1005
+ preState: { inFlightRequests: [] },
1006
+ expectedClass: 'T-G',
1007
+ expectedOutcome: 'respond',
1008
+ expectedErrorArm: 'InvalidParamsEnvelope',
1009
+ expectedErrorCode: INVALID_PARAMS_CODE,
1010
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1011
+ zeroSideEffects: true,
1012
+ description: '[beta.8 H9 JSON-escaping N+1] oversize broker.ready bindingNonce is rejected before activation',
1013
+ },
1014
+ {
1015
+ id: 'T-G-10',
1016
+ rawFrame: readyRequestFrame('a', {
1017
+ bindingNonce: 'nonce-1',
1018
+ pluginInstanceId: 'caller-injected',
1019
+ }),
1020
+ rawFrameEncoding: 'utf8',
1021
+ preState: { inFlightRequests: [] },
1022
+ expectedClass: 'T-G',
1023
+ expectedOutcome: 'respond',
1024
+ expectedErrorArm: 'HandshakeRejectedEnvelope',
1025
+ expectedErrorCode: HANDSHAKE_REJECTED_CODE,
1026
+ expectedResponseFrame: JSON.stringify(RESPONSE_HANDSHAKE_REJECTED_AUTHORITY_A),
1027
+ zeroSideEffects: true,
1028
+ description: '[beta.8 authority] broker.ready Host instance injection is rejected before activation',
1029
+ },
1030
+ {
1031
+ id: 'T-H-10',
1032
+ rawFrame: helloResultFrame('hello-h5-n-plus-1', {
1033
+ ...BETA8_BINDING,
1034
+ pluginInstanceId: 'a'.repeat(513),
1035
+ }),
1036
+ rawFrameEncoding: 'utf8',
1037
+ preState: { inFlightRequests: [{ id: 'hello-h5-n-plus-1', method: 'broker.hello', requestSnapshot: { candidateHello: BETA8_HELLO } }] },
1038
+ expectedClass: 'T-H',
1039
+ expectedOutcome: 'close',
1040
+ expectedErrorArm: null,
1041
+ expectedErrorCode: null,
1042
+ expectedResponseFrame: null,
1043
+ zeroSideEffects: true,
1044
+ description: '[beta.8 H5 raw-byte N+1] oversize Host instance id is rejected with a correlated hello snapshot',
1045
+ },
1046
+ {
1047
+ id: 'T-H-11',
1048
+ rawFrame: helloResultFrame('hello-h6-n-plus-1', {
1049
+ ...BETA8_BINDING,
1050
+ brokerSessionId: 'a'.repeat(513),
1051
+ }),
1052
+ rawFrameEncoding: 'utf8',
1053
+ preState: { inFlightRequests: [{ id: 'hello-h6-n-plus-1', method: 'broker.hello', requestSnapshot: { candidateHello: BETA8_HELLO } }] },
1054
+ expectedClass: 'T-H',
1055
+ expectedOutcome: 'close',
1056
+ expectedErrorArm: null,
1057
+ expectedErrorCode: null,
1058
+ expectedResponseFrame: null,
1059
+ zeroSideEffects: true,
1060
+ description: '[beta.8 H6 raw-byte N+1] oversize Host session id is rejected with a correlated hello snapshot',
1061
+ },
1062
+ {
1063
+ id: 'T-L-5',
1064
+ rawFrame: helloResultFrame('hello-binding', BETA8_BINDING),
1065
+ rawFrameEncoding: 'utf8',
1066
+ preState: { inFlightRequests: [{ id: 'hello-binding', method: 'broker.hello', requestSnapshot: { candidateHello: BETA8_HELLO } }] },
1067
+ expectedClass: 'T-L',
1068
+ expectedOutcome: 'accept',
1069
+ expectedErrorArm: null,
1070
+ expectedErrorCode: null,
1071
+ expectedResponseFrame: null,
1072
+ zeroSideEffects: true,
1073
+ description: '[beta.8 result] SessionBinding settles only with the correlated CandidateHello echo',
1074
+ },
1075
+ {
1076
+ id: 'T-L-6',
1077
+ rawFrame: JSON.stringify(RESPONSE_HANDSHAKE_REJECTED_HELLO),
1078
+ rawFrameEncoding: 'utf8',
1079
+ preState: { inFlightRequests: [{ id: 'hello-error', method: 'broker.hello', requestSnapshot: { candidateHello: BETA8_HELLO } }] },
1080
+ expectedClass: 'T-L',
1081
+ expectedOutcome: 'accept',
1082
+ expectedErrorArm: null,
1083
+ expectedErrorCode: null,
1084
+ expectedResponseFrame: null,
1085
+ zeroSideEffects: true,
1086
+ description: '[beta.8 error] closed HANDSHAKE_REJECTED error settles the correlated hello',
1087
+ },
1088
+ {
1089
+ id: 'T-K-11',
1090
+ rawFrame: grantsChangedNotificationFrame(ALL_CAPABILITY_VALUES),
1091
+ rawFrameEncoding: 'utf8',
1092
+ preState: { inFlightRequests: [] },
1093
+ expectedClass: 'T-K',
1094
+ expectedOutcome: 'close',
1095
+ expectedErrorArm: null,
1096
+ expectedErrorCode: null,
1097
+ expectedResponseFrame: null,
1098
+ zeroSideEffects: true,
1099
+ description: 'removed grant callback closes without dispatch',
1100
+ },
1101
+ {
1102
+ id: 'T-K-8',
1103
+ rawFrame: grantsChangedNotificationFrame([
1104
+ ...ALL_CAPABILITY_VALUES,
1105
+ ALL_CAPABILITY_VALUES[0],
1106
+ ]),
1107
+ rawFrameEncoding: 'utf8',
1108
+ preState: { inFlightRequests: [] },
1109
+ expectedClass: 'T-K',
1110
+ expectedOutcome: 'close',
1111
+ expectedErrorArm: null,
1112
+ expectedErrorCode: null,
1113
+ expectedResponseFrame: null,
1114
+ zeroSideEffects: true,
1115
+ description: '[beta.10 lifecycle] N+1 grant snapshot notification closes before dispatch',
1116
+ },
1117
+ {
1118
+ id: 'T-K-9',
1119
+ rawFrame: grantsChangedNotificationFrame([
1120
+ ALL_CAPABILITY_VALUES[0],
1121
+ ALL_CAPABILITY_VALUES[0],
1122
+ ]),
1123
+ rawFrameEncoding: 'utf8',
1124
+ preState: { inFlightRequests: [] },
1125
+ expectedClass: 'T-K',
1126
+ expectedOutcome: 'close',
1127
+ expectedErrorArm: null,
1128
+ expectedErrorCode: null,
1129
+ expectedResponseFrame: null,
1130
+ zeroSideEffects: true,
1131
+ description: '[beta.10 lifecycle] duplicate grants within the cardinality bound close before dispatch',
1132
+ },
1133
+ {
1134
+ id: 'T-K-10',
1135
+ rawFrame: grantsChangedNotificationFrame(['unknown.capability']),
1136
+ rawFrameEncoding: 'utf8',
1137
+ preState: { inFlightRequests: [] },
1138
+ expectedClass: 'T-K',
1139
+ expectedOutcome: 'close',
1140
+ expectedErrorArm: null,
1141
+ expectedErrorCode: null,
1142
+ expectedResponseFrame: null,
1143
+ zeroSideEffects: true,
1144
+ description: '[beta.10 lifecycle] unknown grant closes before dispatch',
1145
+ },
1146
+ {
1147
+ id: 'T-M-10',
1148
+ rawFrame: lifecycleRequestFrame('a', 'host.lifecycle.ping', {
1149
+ nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.ascii.repeat(PING_NONCE_MAX_LENGTH),
1150
+ }),
1151
+ rawFrameEncoding: 'utf8',
1152
+ preState: { inFlightRequests: [] },
1153
+ expectedClass: 'T-M',
1154
+ expectedOutcome: 'accept',
1155
+ expectedErrorArm: null,
1156
+ expectedErrorCode: null,
1157
+ expectedResponseFrame: null,
1158
+ description: '[beta.10 lifecycle] maximum ASCII ping nonce reaches dispatch',
1159
+ },
1160
+ {
1161
+ id: 'T-G-16',
1162
+ rawFrame: lifecycleRequestFrame('a', 'host.lifecycle.ping', {
1163
+ nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.ascii.repeat(PING_NONCE_MAX_LENGTH + 1),
1164
+ }),
1165
+ rawFrameEncoding: 'utf8',
1166
+ preState: { inFlightRequests: [] },
1167
+ expectedClass: 'T-G',
1168
+ expectedOutcome: 'respond',
1169
+ expectedErrorArm: 'InvalidParamsEnvelope',
1170
+ expectedErrorCode: INVALID_PARAMS_CODE,
1171
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1172
+ zeroSideEffects: true,
1173
+ description: '[beta.10 lifecycle] ASCII ping nonce N+1 rejects before dispatch',
1174
+ },
1175
+ {
1176
+ id: 'T-M-11',
1177
+ rawFrame: lifecycleRequestFrame('a', 'host.lifecycle.ping', {
1178
+ nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.multibyte.repeat(PING_NONCE_MAX_LENGTH),
1179
+ }),
1180
+ rawFrameEncoding: 'utf8',
1181
+ preState: { inFlightRequests: [] },
1182
+ expectedClass: 'T-M',
1183
+ expectedOutcome: 'accept',
1184
+ expectedErrorArm: null,
1185
+ expectedErrorCode: null,
1186
+ expectedResponseFrame: null,
1187
+ description: '[beta.10 lifecycle] maximum multibyte ping nonce reaches dispatch',
1188
+ },
1189
+ {
1190
+ id: 'T-G-17',
1191
+ rawFrame: lifecycleRequestFrame('a', 'host.lifecycle.ping', {
1192
+ nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.multibyte.repeat(PING_NONCE_MAX_LENGTH + 1),
1193
+ }),
1194
+ rawFrameEncoding: 'utf8',
1195
+ preState: { inFlightRequests: [] },
1196
+ expectedClass: 'T-G',
1197
+ expectedOutcome: 'respond',
1198
+ expectedErrorArm: 'InvalidParamsEnvelope',
1199
+ expectedErrorCode: INVALID_PARAMS_CODE,
1200
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1201
+ zeroSideEffects: true,
1202
+ description: '[beta.10 lifecycle] multibyte ping nonce N+1 rejects before dispatch',
1203
+ },
1204
+ {
1205
+ id: 'T-M-12',
1206
+ rawFrame: lifecycleRequestFrame('a', 'host.lifecycle.ping', {
1207
+ nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.escaping.repeat(PING_NONCE_MAX_LENGTH),
1208
+ }),
1209
+ rawFrameEncoding: 'utf8',
1210
+ preState: { inFlightRequests: [] },
1211
+ expectedClass: 'T-M',
1212
+ expectedOutcome: 'accept',
1213
+ expectedErrorArm: null,
1214
+ expectedErrorCode: null,
1215
+ expectedResponseFrame: null,
1216
+ description: '[beta.10 lifecycle] maximum JSON-escaping ping nonce reaches dispatch',
1217
+ },
1218
+ {
1219
+ id: 'T-G-18',
1220
+ rawFrame: lifecycleRequestFrame('a', 'host.lifecycle.ping', {
1221
+ nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.escaping.repeat(PING_NONCE_MAX_LENGTH + 1),
1222
+ }),
1223
+ rawFrameEncoding: 'utf8',
1224
+ preState: { inFlightRequests: [] },
1225
+ expectedClass: 'T-G',
1226
+ expectedOutcome: 'respond',
1227
+ expectedErrorArm: 'InvalidParamsEnvelope',
1228
+ expectedErrorCode: INVALID_PARAMS_CODE,
1229
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1230
+ zeroSideEffects: true,
1231
+ description: '[beta.10 lifecycle] JSON-escaping ping nonce N+1 rejects before dispatch',
1232
+ },
1233
+ {
1234
+ id: 'T-L-8',
1235
+ rawFrame: JSON.stringify({
1236
+ jsonrpc: '2.0',
1237
+ id: 'ping-max',
1238
+ result: { nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.multibyte.repeat(PING_NONCE_MAX_LENGTH) },
1239
+ }),
1240
+ rawFrameEncoding: 'utf8',
1241
+ preState: {
1242
+ inFlightRequests: [{
1243
+ id: 'ping-max',
1244
+ method: 'host.lifecycle.ping',
1245
+ requestSnapshot: {
1246
+ nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.multibyte.repeat(PING_NONCE_MAX_LENGTH),
1247
+ },
1248
+ }],
1249
+ },
1250
+ expectedClass: 'T-L',
1251
+ expectedOutcome: 'accept',
1252
+ expectedErrorArm: null,
1253
+ expectedErrorCode: null,
1254
+ expectedResponseFrame: null,
1255
+ description: '[beta.10 lifecycle] maximum ping nonce settles only when echoed byte-equal',
1256
+ },
1257
+ {
1258
+ id: 'T-H-13',
1259
+ rawFrame: JSON.stringify({
1260
+ jsonrpc: '2.0',
1261
+ id: 'ping-mismatch',
1262
+ result: { nonce: 'different' },
1263
+ }),
1264
+ rawFrameEncoding: 'utf8',
1265
+ preState: {
1266
+ inFlightRequests: [{
1267
+ id: 'ping-mismatch',
1268
+ method: 'host.lifecycle.ping',
1269
+ requestSnapshot: { nonce: 'expected' },
1270
+ }],
1271
+ },
1272
+ expectedClass: 'T-H',
1273
+ expectedOutcome: 'close',
1274
+ expectedErrorArm: null,
1275
+ expectedErrorCode: null,
1276
+ expectedResponseFrame: null,
1277
+ zeroSideEffects: true,
1278
+ description: '[beta.10 lifecycle] ping result with a non-equal nonce closes without settlement',
1279
+ },
1280
+ {
1281
+ id: 'T-M-14',
1282
+ rawFrame: messagingRequestFrame('send-1', 'messaging.send', M0C_DRAFT),
1283
+ rawFrameEncoding: 'utf8',
1284
+ preState: { inFlightRequests: [] },
1285
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1286
+ expectedErrorCode: null, expectedResponseFrame: null,
1287
+ description: '[beta.11 messaging] legal send reaches Host dispatch',
1288
+ },
1289
+ {
1290
+ id: 'T-G-21',
1291
+ rawFrame: messagingRequestFrame('a', 'messaging.send', { ...M0C_DRAFT, authority: 'host' }),
1292
+ rawFrameEncoding: 'utf8',
1293
+ preState: { inFlightRequests: [] },
1294
+ expectedClass: 'T-G', expectedOutcome: 'respond', expectedErrorArm: 'InvalidParamsEnvelope',
1295
+ expectedErrorCode: INVALID_PARAMS_CODE, expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1296
+ zeroSideEffects: true,
1297
+ description: '[beta.11 messaging] authority-bearing send rejects before dispatch',
1298
+ },
1299
+ {
1300
+ id: 'T-M-15',
1301
+ rawFrame: messagingRequestFrame('append-1', 'messaging.appendElements', {
1302
+ handle: { kind: 'message', token: 'message-handle-1' },
1303
+ operationId: 'append-1',
1304
+ baseRevision: 1,
1305
+ elements: [{ elementId: 'element-2', kind: 'text', payload: { text: 'more' } }],
1306
+ }),
1307
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1308
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1309
+ expectedErrorCode: null, expectedResponseFrame: null,
1310
+ description: '[beta.11 messaging] legal append reaches Host dispatch',
1311
+ },
1312
+ {
1313
+ id: 'T-G-22',
1314
+ rawFrame: messagingRequestFrame('a', 'messaging.appendElements', {
1315
+ handle: 'raw-handle', operationId: 'append-1', elements: [],
1316
+ }),
1317
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1318
+ expectedClass: 'T-G', expectedOutcome: 'respond', expectedErrorArm: 'InvalidParamsEnvelope',
1319
+ expectedErrorCode: INVALID_PARAMS_CODE, expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1320
+ zeroSideEffects: true,
1321
+ description: '[beta.11 messaging] malformed append rejects before dispatch',
1322
+ },
1323
+ {
1324
+ id: 'T-M-16',
1325
+ rawFrame: messagingRequestFrame('subscribe-1', 'messaging.subscribe', { handle: 'thread-handle-1' }),
1326
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1327
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1328
+ expectedErrorCode: null, expectedResponseFrame: null,
1329
+ description: '[beta.11 messaging] legal subscribe reaches Host dispatch',
1330
+ },
1331
+ {
1332
+ id: 'T-G-23',
1333
+ rawFrame: messagingRequestFrame('a', 'messaging.subscribe', { handle: '' }),
1334
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1335
+ expectedClass: 'T-G', expectedOutcome: 'respond', expectedErrorArm: 'InvalidParamsEnvelope',
1336
+ expectedErrorCode: INVALID_PARAMS_CODE, expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1337
+ zeroSideEffects: true,
1338
+ description: '[beta.11 messaging] empty subscribe handle rejects before dispatch',
1339
+ },
1340
+ {
1341
+ id: 'T-M-17',
1342
+ rawFrame: messagingRequestFrame('read-1', 'messaging.read', { subscriptionId: 'subscription-1', limit: 2 }),
1343
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1344
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1345
+ expectedErrorCode: null, expectedResponseFrame: null,
1346
+ description: '[beta.11 messaging] legal read reaches Host dispatch',
1347
+ },
1348
+ {
1349
+ id: 'T-G-24',
1350
+ rawFrame: messagingRequestFrame('a', 'messaging.read', { subscriptionId: 'subscription-1', limit: 33 }),
1351
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1352
+ expectedClass: 'T-G', expectedOutcome: 'respond', expectedErrorArm: 'InvalidParamsEnvelope',
1353
+ expectedErrorCode: INVALID_PARAMS_CODE, expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1354
+ zeroSideEffects: true,
1355
+ description: '[beta.11 messaging] read limit N+1 rejects before dispatch',
1356
+ },
1357
+ {
1358
+ id: 'T-M-18',
1359
+ rawFrame: messagingRequestFrame('ack-1', 'messaging.ack', { subscriptionId: 'subscription-1', ackToken: 'ack-1' }),
1360
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1361
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1362
+ expectedErrorCode: null, expectedResponseFrame: null,
1363
+ description: '[beta.11 messaging] legal acknowledgement reaches Host dispatch',
1364
+ },
1365
+ {
1366
+ id: 'T-G-25',
1367
+ rawFrame: messagingRequestFrame('a', 'messaging.ack', { subscriptionId: 'subscription-1', ackToken: '' }),
1368
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1369
+ expectedClass: 'T-G', expectedOutcome: 'respond', expectedErrorArm: 'InvalidParamsEnvelope',
1370
+ expectedErrorCode: INVALID_PARAMS_CODE, expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1371
+ zeroSideEffects: true,
1372
+ description: '[beta.11 messaging] empty acknowledgement token rejects before dispatch',
1373
+ },
1374
+ {
1375
+ id: 'T-M-19',
1376
+ rawFrame: messagingRequestFrame('snapshot-1', 'messaging.snapshot', { subscriptionId: 'subscription-1', maxItems: 2 }),
1377
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1378
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1379
+ expectedErrorCode: null, expectedResponseFrame: null,
1380
+ description: '[beta.11 messaging] legal snapshot page reaches Host dispatch',
1381
+ },
1382
+ {
1383
+ id: 'T-G-26',
1384
+ rawFrame: messagingRequestFrame('a', 'messaging.snapshot', { subscriptionId: 'subscription-1', maxItems: 0 }),
1385
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1386
+ expectedClass: 'T-G', expectedOutcome: 'respond', expectedErrorArm: 'InvalidParamsEnvelope',
1387
+ expectedErrorCode: INVALID_PARAMS_CODE, expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1388
+ zeroSideEffects: true,
1389
+ description: '[beta.11 messaging] zero snapshot maxItems rejects before dispatch',
1390
+ },
1391
+ {
1392
+ id: 'T-M-20',
1393
+ rawFrame: messagingRequestFrame('deliver-1', 'host.messaging.deliver', {
1394
+ deliveryId: 'delivery-1',
1395
+ kind: 'message', executionId: 'execution-1',
1396
+ threadId: M0C_ENVELOPE.threadId,
1397
+ envelope: M0C_ENVELOPE,
1398
+ }),
1399
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1400
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1401
+ expectedErrorCode: null, expectedResponseFrame: null,
1402
+ description: '[beta.11 messaging] legal Host delivery reaches plugin dispatch',
1403
+ },
1404
+ {
1405
+ id: 'T-M-21',
1406
+ rawFrame: messagingRequestFrame('send-exponent', 'messaging.send', {
1407
+ address: { kind: 'thread_handle', handle: 'thread-handle-1' },
1408
+ idempotencyKey: 'send-exp',
1409
+ payload: {
1410
+ provenance: { epistemicStatus: 'inference' },
1411
+ elements: [
1412
+ {
1413
+ elementId: 'element-1',
1414
+ kind: 'rich_block',
1415
+ payload: { id: 'proof-1', kind: 'proof', v: 1, data: 1e+21 },
1416
+ },
1417
+ ],
1418
+ },
1419
+ }),
1420
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1421
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1422
+ expectedErrorCode: null, expectedResponseFrame: null,
1423
+ description: '[beta.11 messaging] V8-canonical exponent in open payload is legal at T-C',
1424
+ },
1425
+ {
1426
+ id: 'T-G-27',
1427
+ rawFrame: messagingRequestFrame('a', 'host.messaging.deliver', {
1428
+ deliveryId: 'delivery-1',
1429
+ threadHandle: { kind: 'thread_handle', handle: 'thread-handle-1' },
1430
+ envelope: { ...M0C_ENVELOPE, occurredAt: '2026-08-18T03:00:00Z' },
1431
+ }),
1432
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1433
+ expectedClass: 'T-G', expectedOutcome: 'respond', expectedErrorArm: 'InvalidParamsEnvelope',
1434
+ expectedErrorCode: INVALID_PARAMS_CODE, expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1435
+ zeroSideEffects: true,
1436
+ description: '[beta.11 messaging] non-canonical stored timestamp rejects before callback dispatch',
1437
+ },
1438
+ {
1439
+ id: 'T-C-4',
1440
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'read-publish-rev', result: {
1441
+ events: [{ ...M0C_PUBLISH_EVENT, envelope: { ...M0C_ENVELOPE, revision: 1.5 } }],
1442
+ ackToken: 'ack-1', stale: false,
1443
+ } }),
1444
+ rawFrameEncoding: 'utf8',
1445
+ preState: { inFlightRequests: [{ id: 'read-publish-rev', method: 'messaging.read', requestSnapshot: { readLimit: 2 } }] },
1446
+ expectedClass: 'T-C', expectedOutcome: 'close', expectedErrorArm: null,
1447
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1448
+ description: '[beta.11 messaging] fractional publish envelope revision in read response is rejected at canonicality',
1449
+ },
1450
+ {
1451
+ id: 'T-C-5',
1452
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'read-append-rev', result: {
1453
+ events: [{
1454
+ eventId: 'event-append-1', sequence: 1, type: 'message.elements.append',
1455
+ messageId: 'message-1', threadId: 'thread-1', operationId: 'op-1',
1456
+ revision: 1.5, elements: [],
1457
+ }],
1458
+ ackToken: 'ack-1', stale: false,
1459
+ } }),
1460
+ rawFrameEncoding: 'utf8',
1461
+ preState: { inFlightRequests: [{ id: 'read-append-rev', method: 'messaging.read', requestSnapshot: { readLimit: 2 } }] },
1462
+ expectedClass: 'T-C', expectedOutcome: 'close', expectedErrorArm: null,
1463
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1464
+ description: '[beta.11 messaging] fractional append event revision in read response is rejected at canonicality',
1465
+ },
1466
+ {
1467
+ id: 'T-C-6',
1468
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'read-append-baserev', result: {
1469
+ events: [{
1470
+ eventId: 'event-append-2', sequence: 1, type: 'message.elements.append',
1471
+ messageId: 'message-1', threadId: 'thread-1', operationId: 'op-1',
1472
+ baseRevision: 1.5, revision: 2, elements: [],
1473
+ }],
1474
+ ackToken: 'ack-1', stale: false,
1475
+ } }),
1476
+ rawFrameEncoding: 'utf8',
1477
+ preState: { inFlightRequests: [{ id: 'read-append-baserev', method: 'messaging.read', requestSnapshot: { readLimit: 2 } }] },
1478
+ expectedClass: 'T-C', expectedOutcome: 'close', expectedErrorArm: null,
1479
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1480
+ description: '[beta.11 messaging] fractional append event baseRevision in read response is rejected at canonicality',
1481
+ },
1482
+ {
1483
+ id: 'T-L-11',
1484
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'send-result', result: {
1485
+ messageId: 'message-1', threadId: 'thread-1', revision: 1,
1486
+ messageHandle: { kind: 'message', token: 'message-handle-1' },
1487
+ } }),
1488
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'send-result', method: 'messaging.send' }] },
1489
+ expectedClass: 'T-L', expectedOutcome: 'accept', expectedErrorArm: null,
1490
+ expectedErrorCode: null, expectedResponseFrame: null,
1491
+ description: '[beta.11 messaging] closed send receipt settles the request',
1492
+ },
1493
+ {
1494
+ id: 'T-H-14',
1495
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'send-legacy', result: {
1496
+ messageId: 'message-1', threadId: 'thread-1', revision: 1,
1497
+ handle: { kind: 'message', token: 'message-handle-1' },
1498
+ } }),
1499
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'send-legacy', method: 'messaging.send' }] },
1500
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1501
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1502
+ description: '[beta.11 messaging] legacy send receipt closes without settlement',
1503
+ },
1504
+ {
1505
+ id: 'T-L-12',
1506
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'append-result', result: {
1507
+ messageId: 'message-1', revision: 2, appliedElementIds: ['element-2'],
1508
+ } }),
1509
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'append-result', method: 'messaging.appendElements', requestSnapshot: { appendElementIds: ['element-2'] } }] },
1510
+ expectedClass: 'T-L', expectedOutcome: 'accept', expectedErrorArm: null,
1511
+ expectedErrorCode: null, expectedResponseFrame: null,
1512
+ description: '[beta.11 messaging] closed append receipt settles the request',
1513
+ },
1514
+ {
1515
+ id: 'T-H-15',
1516
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'append-empty', result: {
1517
+ messageId: 'message-1', revision: 2, appliedElementIds: [],
1518
+ } }),
1519
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'append-empty', method: 'messaging.appendElements', requestSnapshot: { appendElementIds: ['element-2'] } }] },
1520
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1521
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1522
+ description: '[beta.11 messaging] empty append receipt closes without settlement',
1523
+ },
1524
+ {
1525
+ id: 'T-L-13',
1526
+ rawFrame: '{"jsonrpc":"2.0","id":"subscribe-result","result":{"subscriptionId":"subscription-1"}}',
1527
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'subscribe-result', method: 'messaging.subscribe' }] },
1528
+ expectedClass: 'T-L', expectedOutcome: 'accept', expectedErrorArm: null,
1529
+ expectedErrorCode: null, expectedResponseFrame: null,
1530
+ description: '[beta.11 messaging] closed subscription receipt settles the request',
1531
+ },
1532
+ {
1533
+ id: 'T-H-16',
1534
+ rawFrame: '{"jsonrpc":"2.0","id":"subscribe-open","result":{"subscriptionId":"subscription-1","extra":true}}',
1535
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'subscribe-open', method: 'messaging.subscribe' }] },
1536
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1537
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1538
+ description: '[beta.11 messaging] open subscription receipt closes without settlement',
1539
+ },
1540
+ {
1541
+ id: 'T-L-14',
1542
+ rawFrame: '{"jsonrpc":"2.0","id":"read-result","result":{"events":[],"ackToken":null,"stale":false}}',
1543
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'read-result', method: 'messaging.read', requestSnapshot: { readLimit: 2 } }] },
1544
+ expectedClass: 'T-L', expectedOutcome: 'accept', expectedErrorArm: null,
1545
+ expectedErrorCode: null, expectedResponseFrame: null,
1546
+ description: '[beta.11 messaging] empty read page settles the request',
1547
+ },
1548
+ {
1549
+ id: 'T-H-17',
1550
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'read-over-limit', result: {
1551
+ events: [M0C_PUBLISH_EVENT, { ...M0C_PUBLISH_EVENT, eventId: 'event-2', sequence: 2 }],
1552
+ ackToken: 'ack-2', stale: false,
1553
+ } }),
1554
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'read-over-limit', method: 'messaging.read', requestSnapshot: { readLimit: 1 } }] },
1555
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1556
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1557
+ description: '[beta.11 messaging] read page beyond the request limit closes without cursor progress',
1558
+ },
1559
+ {
1560
+ id: 'T-L-15', rawFrame: '{"jsonrpc":"2.0","id":"ack-result","result":null}',
1561
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'ack-result', method: 'messaging.ack' }] },
1562
+ expectedClass: 'T-L', expectedOutcome: 'accept', expectedErrorArm: null,
1563
+ expectedErrorCode: null, expectedResponseFrame: null,
1564
+ description: '[beta.11 messaging] null acknowledgement settles the request',
1565
+ },
1566
+ {
1567
+ id: 'T-H-18', rawFrame: '{"jsonrpc":"2.0","id":"ack-open","result":{}}',
1568
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'ack-open', method: 'messaging.ack' }] },
1569
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1570
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1571
+ description: '[beta.11 messaging] non-null acknowledgement closes without cursor progress',
1572
+ },
1573
+ {
1574
+ id: 'T-L-16',
1575
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'snapshot-result', result: {
1576
+ items: [], nextPageToken: null, snapshotAckToken: 'snapshot-ack-1',
1577
+ } }),
1578
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'snapshot-result', method: 'messaging.snapshot', requestSnapshot: { snapshotMaxItems: 2 } }] },
1579
+ expectedClass: 'T-L', expectedOutcome: 'accept', expectedErrorArm: null,
1580
+ expectedErrorCode: null, expectedResponseFrame: null,
1581
+ description: '[beta.11 messaging] final snapshot page settles the traversal request',
1582
+ },
1583
+ {
1584
+ id: 'T-H-19',
1585
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'snapshot-over-limit', result: {
1586
+ items: [M0C_ENVELOPE, { ...M0C_ENVELOPE, messageId: 'message-2' }],
1587
+ nextPageToken: null, snapshotAckToken: 'snapshot-ack-2',
1588
+ } }),
1589
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'snapshot-over-limit', method: 'messaging.snapshot', requestSnapshot: { snapshotMaxItems: 1 } }] },
1590
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1591
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1592
+ description: '[beta.11 messaging] snapshot page beyond request maxItems closes without progress',
1593
+ },
1594
+ {
1595
+ id: 'T-L-17',
1596
+ rawFrame: '{"jsonrpc":"2.0","id":"deliver-result","result":{"deliveryId":"delivery-1"}}',
1597
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'deliver-result', method: 'host.messaging.deliver', requestSnapshot: { deliveryId: 'delivery-1' } }] },
1598
+ expectedClass: 'T-L', expectedOutcome: 'accept', expectedErrorArm: null,
1599
+ expectedErrorCode: null, expectedResponseFrame: null,
1600
+ description: '[beta.11 messaging] byte-equal delivery acknowledgement settles the callback',
1601
+ },
1602
+ {
1603
+ id: 'T-H-20',
1604
+ rawFrame: '{"jsonrpc":"2.0","id":"deliver-mismatch","result":{"deliveryId":"wrong-delivery"}}',
1605
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'deliver-mismatch', method: 'host.messaging.deliver', requestSnapshot: { deliveryId: 'delivery-1' } }] },
1606
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1607
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1608
+ description: '[beta.11 messaging] mismatched delivery acknowledgement closes without settlement',
1609
+ },
1610
+ {
1611
+ id: 'T-H-21',
1612
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'append-provenance', result: {
1613
+ messageId: 'message-1', revision: 2, appliedElementIds: ['wrong-element'],
1614
+ } }),
1615
+ rawFrameEncoding: 'utf8',
1616
+ preState: { inFlightRequests: [{ id: 'append-provenance', method: 'messaging.appendElements', requestSnapshot: { appendElementIds: ['element-2'] } }] },
1617
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1618
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1619
+ description: '[beta.11 messaging] append receipt with foreign element IDs closes without settlement',
1620
+ },
1621
+ {
1622
+ id: 'T-H-22',
1623
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'append-no-snapshot', result: {
1624
+ messageId: 'message-1', revision: 2, appliedElementIds: ['element-2'],
1625
+ } }),
1626
+ rawFrameEncoding: 'utf8',
1627
+ preState: { inFlightRequests: [{ id: 'append-no-snapshot', method: 'messaging.appendElements' }] },
1628
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1629
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1630
+ description: '[beta.11 messaging] append receipt without provenance snapshot closes without settlement',
1631
+ },
1632
+ ];
1633
+ /** Complete beta.8 handshake safety surface exported for downstream runners. */
1634
+ export const BETA8_HANDSHAKE_VECTOR_IDS = [
1635
+ 'T-C-2',
1636
+ 'T-M-1', 'T-M-2', 'T-M-3', 'T-M-4', 'T-M-5', 'T-M-6', 'T-M-7', 'T-M-8',
1637
+ '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',
1638
+ 'T-G-11', 'T-G-12', 'T-G-13', 'T-G-14',
1639
+ 'T-H-10', 'T-H-11',
1640
+ 'T-L-5', 'T-L-6',
1641
+ ];
1642
+ /** Complete beta.9 C-2 publish safety surface exported for downstream runners. */
1643
+ /** Complete beta.10 M0-B lifecycle safety surface for rows 10 through 12. */
1644
+ /** Complete beta.11 M0-C messaging safety surface for rows 3 through 9. */
1645
+ export const BETA11_MESSAGING_VECTOR_IDS = [
1646
+ 'T-C-3',
1647
+ 'T-H-2', 'T-H-5', 'T-H-9', 'T-L-4',
1648
+ 'T-M-14', 'T-G-21', 'T-M-15', 'T-G-22', 'T-M-16', 'T-G-23',
1649
+ 'T-M-17', 'T-G-24', 'T-M-18', 'T-G-25', 'T-M-19', 'T-G-26',
1650
+ 'T-M-20', 'T-M-21', 'T-G-27',
1651
+ 'T-C-4', 'T-C-5', 'T-C-6',
1652
+ 'T-L-11', 'T-H-14', 'T-L-12', 'T-H-15', 'T-L-13', 'T-H-16',
1653
+ 'T-L-14', 'T-H-17', 'T-L-15', 'T-H-18', 'T-L-16', 'T-H-19',
1654
+ 'T-L-17', 'T-H-20', 'T-H-21', 'T-H-22',
622
1655
  ];
623
1656
  //# sourceMappingURL=disposition-fixtures.js.map