@openwop/openwop-conformance 2.0.0 → 2.0.1

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # `@openwop/openwop-conformance` Changelog
2
2
 
3
+ ## [2.0.1] — 2026-09-05 — the webhook durability scenario read the wrong carrier and imposed its own deadline
4
+
5
+ Two defects in `v2-webhook-durable-delivery`, both reported by a host running against 2.0.0.
6
+
7
+ **It read the v1 carrier.** `advertisedRetryPolicy()` read `triggerBridge.retryPolicy` and its docstring claimed that was "the only v2 carrier". `spec/v2/facets/webhooks.schema.json` says the opposite in as many words — *"retryPolicy is the v2 carrier of the delivery obligation (was triggerBridge.retryPolicy at v1)"* — so a host correctly advertising the **v2** carrier had its policy read as `null`, and a host on the v1 field was measured against a **different subsystem's** budget. The reporting host advertises 8 on its trigger bridge and enforces 5 on webhook delivery, and could not be honest about both under one borrowed field. Now reads `webhooks.retryPolicy` first and falls back to `triggerBridge.retryPolicy` for the v1 overlap the schema preserves.
8
+
9
+ **It imposed a 20-second deadline and blamed the host for missing it.** A host whose first backoff is slower than 20 s was recorded `executed-fail` on a core-standard floor row *for being durable*: the retry lands at t+30 s, the window closed at t+20 s, and the assertion said "a 500 MUST be retried" about a host that retried. The wait now derives from the advertised policy — 20 s floor unchanged when nothing is advertised, widening to a 90 s cap for `fixed`/`exponential`. The cap is deliberate: unbounded waiting would let a host that never retries hold the suite open instead of failing.
10
+
11
+ This is rc.67's poll-cursor defect one file over, and **deterministic rather than flaky** — the instrument's own window, attributed to the host. A scenario must not blame a host for a deadline the scenario chose.
12
+
13
+
3
14
  ## [2.0.0] — 2026-09-05 — openwop v2
4
15
 
5
16
  The v2 major. `@openwop/openwop-conformance@2.0.0` and `@openwop/spec-artifacts@2.0.0` are one release under two names — conformance pins the contract package to an exact version, so install both.
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "package": "@openwop/spec-artifacts",
3
- "version": "2.0.0",
4
- "stampSha256": "e4fcd1ca67750794f3735dfc78bd89672a73a35b57c96d5601272ca038700f3c"
3
+ "version": "2.0.1",
4
+ "stampSha256": "58332ded443bd030809e2da256d3d4ea381d3b3bc605421b89b26336800b0acc"
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openwop/openwop-conformance",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Production-ready black-box conformance suite for OpenWOP v1.0 compliant servers.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -52,10 +52,10 @@
52
52
  },
53
53
  "devDependencies": {
54
54
  "typescript": "^5.6.0",
55
- "@types/node": "^22.0.0",
55
+ "@types/node": "^22.0.1",
56
56
  "@openwop/spec-artifacts": "file:../spec-artifacts"
57
57
  },
58
58
  "peerDependencies": {
59
- "@openwop/spec-artifacts": "2.0.0"
59
+ "@openwop/spec-artifacts": "2.0.1"
60
60
  }
61
61
  }
package/requirements.json CHANGED
@@ -29006,7 +29006,7 @@
29006
29006
  {
29007
29007
  "id": "openwop.it.v2-webhook-durable-delivery.a-failed-attempt-is-retried-and-the-event-is-delivered-at-least-once",
29008
29008
  "file": "v2-webhook-durable-delivery.test.ts",
29009
- "line": 145,
29009
+ "line": 196,
29010
29010
  "title": "a failed attempt is retried and the event is delivered at least once",
29011
29011
  "explicitId": "openwop.requirement.0173.webhook-durable-delivery",
29012
29012
  "citations": [
@@ -29041,7 +29041,7 @@
29041
29041
  {
29042
29042
  "id": "openwop.it.v2-webhook-durable-delivery.an-exhausted-delivery-is-dead-lettered-never-dropped",
29043
29043
  "file": "v2-webhook-durable-delivery.test.ts",
29044
- "line": 199,
29044
+ "line": 250,
29045
29045
  "title": "an exhausted delivery is dead-lettered, never dropped",
29046
29046
  "explicitId": "openwop.requirement.0173.webhook-durable-delivery.dead-letter",
29047
29047
  "citations": [
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "_comment": "Provenance of @openwop/spec-artifacts (RFC 0168 §D.2). files: SHA-256 per file; the conformance suite compares the installed peer against dist/spec-artifacts.lock.json at start.",
3
3
  "package": "@openwop/spec-artifacts",
4
- "version": "2.0.0",
5
- "corpusTag": "v2.0.0",
4
+ "version": "2.0.1",
5
+ "corpusTag": "v2.0.1",
6
6
  "files": {
7
7
  "api/.redocly.lint-ignore.yaml": "bf5a8350b88a72fa43f59605ed8d903ed24b6cfccda5e45509c9f6ed9ee4e712",
8
8
  "api/asyncapi.yaml": "d5ecb9ee6114582be3b1f662c84bfac9ae96dae7bacb853e461168f70a8e1c7d",
9
9
  "api/grpc/openwop.proto": "c3e72bb17cba514ee98feb6434e6c9b6ea6795bfd086489ec69fd882dd1ad977",
10
10
  "api/openapi.yaml": "39081c59fb696159806b0f2f9a42e7e9ff830d622fcf2ad4159b21357580a955",
11
11
  "api/redocly.yaml": "b0604c89b2ca6d5076ec25725c539dad44a741a811fe524439ee6daef8baa09f",
12
- "api/seams-v2.yaml": "0568c438db8a84b9e51c221f118b660bad9f96722ec5607bce25b2fe1395afa0",
13
- "api/v2/asyncapi.yaml": "fe31d75cdee4505900fe206fb5d1bdedbaa7ab6f54fd7ff1c63f14c5a1cd9595",
14
- "api/v2/openapi.yaml": "1e33a399c7b29b93e317cab6ba60b891a3b9153e79c0ff907bf253f2c48aa6a6",
12
+ "api/seams-v2.yaml": "3eb009580df13443f96f60f311f1b3755b76d1170e0dd4bdc44e0019a4be49bb",
13
+ "api/v2/asyncapi.yaml": "3b454a919cacedd86a292475f43ea7523806c75b5c2ee4e4363cc693c103f6fd",
14
+ "api/v2/openapi.yaml": "ba5ff45d479682e77ebe4f5f8e8700fdf96e09cdd70820b9c78287618b2f1072",
15
15
  "api/v2/redocly.yaml": "1e66b60e6118ad11a823bb620678be464d99dfe50a40e3e6f93ec9429b88b34c",
16
16
  "schemas/README.md": "0c0b737ffcf8f30e7d2809cec8a498232de710f41443212922ad8337cdde0b51",
17
17
  "schemas/a2a-task-state.schema.json": "c9365918f993f943b4b619d42551eb066a1ed33a08d895d51b395432a5b1f1bc",
@@ -199,7 +199,7 @@
199
199
  "schemas/workspace-file.schema.json": "464de85c2a068243084ee9c1d969bc7cd5d8f7948574e58450d6493c38a0e1e4",
200
200
  "spec/v1/alias-detectors.json": "fee4594ef49953953ffcd0b3813300067d16b3e65ebff2aac722034ac9b3f545",
201
201
  "spec/v1/capability-declaration-classes.json": "e7729aed5c4b4e1dd02abab0530f14cc95f5d4070fe51fb139e7f5cccefa00c6",
202
- "spec/v1/core-standard-manifest.json": "08eb68a1f07020390cf3a76ce6ac9bec697cd35ba02a0d8618939e39cac87a0a",
202
+ "spec/v1/core-standard-manifest.json": "321048584e70be5855e13edd75566635e980d69f3541d88d3fb7a51c38c22942",
203
203
  "spec/v1/deprecations.json": "1d5acb69a9b8ccb57275a95605f74aef1d920685f8407c9d382a46b59dc803bb",
204
204
  "spec/v1/deprecations.schema.json": "18c87e78bedc210431f795ae44c5b5d202f2f3317850d5cf86867d4f1fa1cdfb",
205
205
  "spec/v1/event-codemap.json": "3da60d884157793a360da532a9fcbbfb5285636db325a74cec94b34622186d97",
@@ -230,8 +230,8 @@
230
230
  "spec/v2/path-manifest.json": "034152e09b1458c66810d4050e20a273b2b9b8fe2d92b66e8b819477de58a1be",
231
231
  "spec/v2/peer-dependency-aliases.json": "d10299280abee08258502925bc327293ee413e0108cd6e6ec75ff6110653308d",
232
232
  "spec/v2/profiles.json": "0636f19fceae625390003a347e70ef4797d84766b5c24ce8a02cea52aadebca4",
233
- "spec/v2/release.json": "517c6d3ccefcc5e76cc8206a580222af2ae51dcca99869db83191e046c461a49",
233
+ "spec/v2/release.json": "88167a813c554bb90f0356bcc365b57415820c2bb1f52fc2e0e15e64f032ef0e",
234
234
  "spec/v2/retention-floors.json": "eaf3722d95c79947af1d4269ef85117e126518c588cfcf1a2b21b97269f51624"
235
235
  },
236
- "corpusCommit": "2e5c91a9376498ce8825f97fcb76f2edac0efb4f"
236
+ "corpusCommit": "91912e2e57a4c5ad124075780e456e63ee91eb9f"
237
237
  }
@@ -117,11 +117,62 @@ async function waitFor(pred: () => boolean, timeoutMs: number): Promise<boolean>
117
117
  return pred();
118
118
  }
119
119
 
120
- /** The retry policy the host advertises, where it does (`triggerBridge.retryPolicy` is the only v2 carrier; absent ⇒ null). */
120
+ /**
121
+ * The retry policy the host advertises for WEBHOOK delivery.
122
+ *
123
+ * 2.0.1: this read the WRONG FIELD. Its docstring claimed
124
+ * `triggerBridge.retryPolicy` was "the only v2 carrier", but
125
+ * `spec/v2/facets/webhooks.schema.json` says the opposite in as many words:
126
+ * "retryPolicy is the v2 carrier of the delivery obligation (was
127
+ * triggerBridge.retryPolicy at v1)", and the field's own description adds
128
+ * "The webhooks family carries it at v2; `triggerBridge.retryPolicy` is the
129
+ * v1 carrier and stays through the overlap."
130
+ *
131
+ * So a host that correctly advertises the v2 carrier had its policy read as
132
+ * `null`, and a host still on the v1 carrier was measured against a policy
133
+ * belonging to a DIFFERENT SUBSYSTEM — the trigger-bridge state machine,
134
+ * whose delivery budget need not equal the webhook one. A tier-1 host
135
+ * reported exactly that: 8 on the trigger bridge, 5 on webhook delivery,
136
+ * and no way to be honest about both under a single borrowed field.
137
+ *
138
+ * `webhooks.retryPolicy` first, `triggerBridge.retryPolicy` second for the
139
+ * v1 overlap the schema explicitly preserves.
140
+ */
121
141
  function advertisedRetryPolicy(doc: Record<string, unknown>): { maxAttempts?: number; backoff?: string } | null {
122
- const tb = doc['triggerBridge'];
123
- const rp = tb && typeof tb === 'object' ? (tb as { retryPolicy?: unknown }).retryPolicy : undefined;
124
- return rp && typeof rp === 'object' ? (rp as { maxAttempts?: number; backoff?: string }) : null;
142
+ const read = (holder: unknown): { maxAttempts?: number; backoff?: string } | null => {
143
+ const rp = holder && typeof holder === 'object' ? (holder as { retryPolicy?: unknown }).retryPolicy : undefined;
144
+ return rp && typeof rp === 'object' ? (rp as { maxAttempts?: number; backoff?: string }) : null;
145
+ };
146
+ return read(doc['webhooks']) ?? read(doc['triggerBridge']);
147
+ }
148
+
149
+ /**
150
+ * How long to wait for a retry, derived from what the host ADVERTISED.
151
+ *
152
+ * 2.0.1: this was a hard 20 s, and a host whose first backoff is deliberately
153
+ * slower than that was recorded `executed-fail` on a core-standard floor row
154
+ * for being durable. Measured on a tier-1 host: Cloud Tasks `minBackoff: 30s`,
155
+ * the retry lands at t+30 s, the window closed at t+20 s, and the assertion
156
+ * said "a 500 MUST be retried" about a host that retried. 30 s is not an
157
+ * unusual first backoff.
158
+ *
159
+ * That is rc.67's poll-cursor defect one file over and DETERMINISTIC rather
160
+ * than flaky: the instrument's own window, attributed to the host. A scenario
161
+ * must not blame a host for a deadline the scenario chose.
162
+ *
163
+ * The floor stays 20 s so a host that advertises nothing is measured exactly
164
+ * as before; an advertised `exponential`/`fixed` backoff widens it to 90 s,
165
+ * which covers a 30 s first attempt with room for the second. The cap is
166
+ * deliberate: unbounded waiting would let a host that never retries hold the
167
+ * suite open instead of failing.
168
+ */
169
+ const RETRY_WAIT_FLOOR_MS = 20_000;
170
+ const RETRY_WAIT_CAP_MS = 90_000;
171
+ function retryWaitMs(doc: Record<string, unknown>): number {
172
+ const policy = advertisedRetryPolicy(doc);
173
+ if (policy === null) return RETRY_WAIT_FLOOR_MS;
174
+ const backoff = String(policy.backoff ?? '');
175
+ return backoff === 'exponential' || backoff === 'fixed' ? RETRY_WAIT_CAP_MS : RETRY_WAIT_FLOOR_MS;
125
176
  }
126
177
 
127
178
  /** Register the suite receiver; null (with a note) when the host's SSRF guard refuses a loopback URL. */
@@ -159,7 +210,7 @@ describe('RFC 0173 §B — webhook-durable-delivery (gated on webhooks)', () =>
159
210
  await waitTerminal(runId, 10_000);
160
211
 
161
212
  const ours = () => receiver.attempts.filter((a) => a.runId === runId);
162
- const retried = await waitFor(() => ours().some((a) => a.status === 204), 20_000);
213
+ const retried = await waitFor(() => ours().some((a) => a.status === 204), retryWaitMs(doc));
163
214
  const attempts = ours();
164
215
  expect(
165
216
  attempts.length,
@@ -212,7 +263,7 @@ describe('RFC 0173 §B — webhook-durable-delivery (gated on webhooks)', () =>
212
263
  const runId = (create.json as { runId: string }).runId;
213
264
  await waitTerminal(runId, 10_000);
214
265
  const ours = () => receiver.attempts.filter((a) => a.runId === runId);
215
- await waitFor(() => ours().length > 1, 20_000);
266
+ await waitFor(() => ours().length > 1, retryWaitMs(doc));
216
267
  const attempts = ours();
217
268
  expect(
218
269
  attempts.length,
@@ -221,7 +272,7 @@ describe('RFC 0173 §B — webhook-durable-delivery (gated on webhooks)', () =>
221
272
  const policy = advertisedRetryPolicy(doc);
222
273
  if (policy?.maxAttempts !== undefined) {
223
274
  // Give the policy time to exhaust, then the host MUST stop.
224
- await waitFor(() => ours().length >= policy.maxAttempts!, 20_000);
275
+ await waitFor(() => ours().length >= policy.maxAttempts!, retryWaitMs(doc));
225
276
  await new Promise((r) => setTimeout(r, 1_000));
226
277
  expect(
227
278
  ours().length,