@openwop/openwop-conformance 2.2.0 → 2.2.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,43 @@
1
1
  # `@openwop/openwop-conformance` Changelog
2
2
 
3
+ ## [2.2.1] — 2026-09-16 — RFC 0183's `edit-accept` arm is witnessed, and the MUST the suite already enforced is now the spec's
4
+
5
+ **Why a patch.** `PUBLISHING.md` §"Versioning alignment": new `it` blocks in an
6
+ existing scenario file are a patch; no scenario file is added.
7
+
8
+ ### Added
9
+
10
+ - **`interrupt-approval.test.ts` witnesses the `edit-accept` arm of RFC 0183
11
+ §A.2** — two legs on a new `conformance-approval-edit-accept` fixture: an
12
+ edit-accept resolve MUST round-trip `action: "edit-accept"` and the
13
+ `editedArtifactData` supplied, and an edit-accept resolve with no
14
+ `editedArtifactData` MUST be refused. Until now the refine arm was witnessed
15
+ and the edit-accept arm was stated in `spec/v2/core/interrupt.md` §Approval and
16
+ measured nowhere. Gated on the fixture being advertised, like the refine block;
17
+ a host that does not serve the fixture skips rather than fails.
18
+
19
+ ### Fixed
20
+
21
+ - **`replay-fanout-suppression` declared ~77.5 s of poll budget inside vitest's
22
+ 30 s wall** (openwop #1355). The second and third poll ceilings were
23
+ unreachable, `OPENWOP_POLL_TIMEOUT_SCALE` could not extend the wait (the
24
+ header claimed the opposite), and a slow host and a host that re-fired
25
+ fan-out on a replay fork failed with the same generic vitest timeout. The
26
+ test's wall is now derived from its own scaled budgets plus a 15 s margin,
27
+ so every declared ceiling is reachable and a failure names the predicate. No
28
+ assertion changed.
29
+
30
+ ### Changed (spec side, no assertion change)
31
+
32
+ - **The `payload.action` assertion in the refine leg is no longer stricter than
33
+ the spec.** It asserted a MUST from 2.2.0 while RFC 0183 §A.1 said SHOULD —
34
+ a `COMPATIBILITY.md` §2.3 violation (a suite MUST NOT be stricter than the spec
35
+ on wire shape). The spec was raised, not the assertion lowered: RFC 0183 is now
36
+ `Active` and §A.1 is a MUST conditioned on approval kind, with its normative
37
+ home in `spec/v2/core/interrupt.md` §Events. RFC 0184 is `Active` too; suite
38
+ 2.2.0 had shipped both RFCs' legs enforced against `Draft` headers, and the
39
+ corpus gate now refuses that (`check-rfc-status-coherence` rule 7).
40
+
3
41
  ## [2.2.0] — 2026-09-16 — the suite wipes the host's mock program store between scenario files, and a bound id travels as one segment
4
42
 
5
43
  **Why a minor and not the 2.1.8 that was pinned for two days.** `PUBLISHING.md`
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "package": "@openwop/spec-artifacts",
3
- "version": "2.2.0",
4
- "stampSha256": "b5398e169f00362c4f6821354b1746c79fff01a341488ebfb2cf2cbd20f19b4a"
3
+ "version": "2.2.1",
4
+ "stampSha256": "35a007d7fd7df22f277d9b3c6d58c2a723e3a7312eaafd851a0f771c18c844c5"
5
5
  }
@@ -0,0 +1,45 @@
1
+ {
2
+ "id": "conformance-approval-edit-accept",
3
+ "name": "Conformance: Approval (edit-accept)",
4
+ "version": "1.0",
5
+ "description": "Suspends on an approval gate offering accept|reject|edit-accept. Resume with {action:'edit-accept', editedArtifactData:{...}} exercises RFC 0183 \u00a7A.2's edit-accept arm \u2014 the resolved payload must carry the action and the edited artifact data.",
6
+ "nodes": [
7
+ {
8
+ "id": "gate",
9
+ "typeId": "core.approvalGate",
10
+ "name": "Approval Gate",
11
+ "position": {
12
+ "x": 0,
13
+ "y": 0
14
+ },
15
+ "config": {
16
+ "title": "Conformance approval (edit-accept-capable)",
17
+ "description": "Conformance suite \u2014 please accept to complete the run.",
18
+ "actions": [
19
+ "accept",
20
+ "reject",
21
+ "edit-accept"
22
+ ]
23
+ },
24
+ "inputs": {}
25
+ }
26
+ ],
27
+ "edges": [],
28
+ "triggers": [
29
+ {
30
+ "id": "manual",
31
+ "type": "manual",
32
+ "enabled": true
33
+ }
34
+ ],
35
+ "variables": [],
36
+ "metadata": {
37
+ "tags": [
38
+ "conformance",
39
+ "hitl"
40
+ ]
41
+ },
42
+ "settings": {
43
+ "timeout": 0
44
+ }
45
+ }
package/fixtures.md CHANGED
@@ -48,6 +48,7 @@ All fixtures MUST advertise:
48
48
  | Failure | `conformance-failure` | Verifies error-event surface | `failed` | ≤ 5s |
49
49
  | Approval | `conformance-approval` | Verifies HITL approval interrupt + resume | `completed` after resolve | unbounded (suspends) |
50
50
  | Approval (refine) | `conformance-approval-refine` | RFC 0183 — refine resolution carries action + refineFeedback |
51
+ | Approval (edit-accept) | `conformance-approval-edit-accept` | RFC 0183 — edit-accept resolution carries action + editedArtifactData |
51
52
  | Clarification | `conformance-clarification` | Verifies HITL clarification interrupt + resume | `completed` after resolve | unbounded (suspends) |
52
53
  | Multi-node | `conformance-multi-node` | Verifies edge ordering + per-node events | `completed` | ≤ 10s |
53
54
  | Idempotent | `conformance-idempotent` | Verifies `Idempotency-Key` cache | `completed` | ≤ 5s |
@@ -192,6 +193,18 @@ The `messages`-mode stream fixture (AI token streaming) is covered by the determ
192
193
  registered workflow definition every host already serves, forcing a re-registration for a test-only widening.
193
194
  A new id costs one catalog row and no host churn.
194
195
 
196
+ ### `conformance-approval-edit-accept`
197
+
198
+ - **Purpose**: verify an `edit-accept` resolution round-trips its action and the edited artifact (RFC 0183 §A.2, the arm `conformance-approval-refine` does not reach).
199
+ - **Inputs**: none.
200
+ - **Behavior**:
201
+ 1. Run starts and reaches an `approvalGate` offering `accept | reject | edit-accept`.
202
+ 2. Run status MUST be `waiting-approval`.
203
+ 3. Client POSTs `{action: 'edit-accept', editedArtifactData: {...}}` to the interrupt.
204
+ 4. The resolved event payload MUST carry `action: 'edit-accept'` and the `editedArtifactData` supplied.
205
+ 5. An `edit-accept` resolution supplying no `editedArtifactData` MUST be refused.
206
+ - **Why it is separate**: same reason as `conformance-approval-refine` — widening a registered fixture's `actions` forces every host to re-register a test-only change.
207
+
195
208
  ### `conformance-clarification`
196
209
 
197
210
  - **Purpose**: verify HITL clarification interrupt + resume.
@@ -503,6 +516,7 @@ conformance/
503
516
  conformance-failure.json
504
517
  conformance-approval.json
505
518
  conformance-approval-refine.json
519
+ conformance-approval-edit-accept.json
506
520
  conformance-clarification.json
507
521
  conformance-multi-node.json
508
522
  conformance-idempotent.json
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openwop/openwop-conformance",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "Production-ready black-box conformance suite for OpenWOP v1.0 compliant servers.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -56,6 +56,6 @@
56
56
  "@openwop/spec-artifacts": "file:../spec-artifacts"
57
57
  },
58
58
  "peerDependencies": {
59
- "@openwop/spec-artifacts": "2.2.0"
59
+ "@openwop/spec-artifacts": "2.2.1"
60
60
  }
61
61
  }
package/requirements.json CHANGED
@@ -3,10 +3,10 @@
3
3
  "generatedFrom": "src/scenarios/*.test.ts",
4
4
  "counts": {
5
5
  "files": 567,
6
- "tests": 2159,
7
- "withStableId": 2159,
6
+ "tests": 2161,
7
+ "withStableId": 2161,
8
8
  "interpolatedTitles": 0,
9
- "explicitIds": 2114
9
+ "explicitIds": 2116
10
10
  },
11
11
  "records": [
12
12
  {
@@ -14544,7 +14544,7 @@
14544
14544
  {
14545
14545
  "id": "openwop.it.interrupt-approval.run-suspends-at-gate-accept-resolution-drives-terminal-completed",
14546
14546
  "file": "interrupt-approval.test.ts",
14547
- "line": 24,
14547
+ "line": 27,
14548
14548
  "title": "run suspends at gate, accept resolution drives terminal completed",
14549
14549
  "explicitId": "openwop.it.interrupt-approval.run-suspends-at-gate-accept-resolution-drives-terminal-completed",
14550
14550
  "citations": [
@@ -14565,7 +14565,7 @@
14565
14565
  {
14566
14566
  "id": "openwop.it.interrupt-approval.400-or-422-when-action-is-not-in-accept-reject",
14567
14567
  "file": "interrupt-approval.test.ts",
14568
- "line": 53,
14568
+ "line": 56,
14569
14569
  "title": "400 (or 422) when action is not in {accept, reject}",
14570
14570
  "explicitId": "openwop.it.interrupt-approval.400-or-422-when-action-is-not-in-accept-reject",
14571
14571
  "citations": [
@@ -14578,7 +14578,7 @@
14578
14578
  {
14579
14579
  "id": "openwop.it.interrupt-approval.400-404-when-nodeid-does-not-match-an-active-interrupt",
14580
14580
  "file": "interrupt-approval.test.ts",
14581
- "line": 81,
14581
+ "line": 84,
14582
14582
  "title": "400/404 when nodeId does not match an active interrupt",
14583
14583
  "explicitId": "openwop.it.interrupt-approval.400-404-when-nodeid-does-not-match-an-active-interrupt",
14584
14584
  "citations": [
@@ -14591,7 +14591,7 @@
14591
14591
  {
14592
14592
  "id": "openwop.it.interrupt-approval.a-refine-resolve-round-trips-action-and-the-structured-feedback-it-requires",
14593
14593
  "file": "interrupt-approval.test.ts",
14594
- "line": 117,
14594
+ "line": 120,
14595
14595
  "title": "a refine resolve round-trips `action` and the structured feedback it requires",
14596
14596
  "explicitId": "openwop.it.interrupt-approval.a-refine-resolve-round-trips-action-and-the-structured-feedback-it-requires",
14597
14597
  "citations": [
@@ -14616,7 +14616,7 @@
14616
14616
  {
14617
14617
  "id": "openwop.it.interrupt-approval.refuses-a-refine-resolution-that-supplies-no-refinefeedback",
14618
14618
  "file": "interrupt-approval.test.ts",
14619
- "line": 167,
14619
+ "line": 170,
14620
14620
  "title": "refuses a refine resolution that supplies no refineFeedback",
14621
14621
  "explicitId": "openwop.it.interrupt-approval.refuses-a-refine-resolution-that-supplies-no-refinefeedback",
14622
14622
  "citations": [
@@ -14626,6 +14626,44 @@
14626
14626
  }
14627
14627
  ]
14628
14628
  },
14629
+ {
14630
+ "id": "openwop.it.interrupt-approval.an-edit-accept-resolve-round-trips-action-and-the-edited-artifact-it-requires",
14631
+ "file": "interrupt-approval.test.ts",
14632
+ "line": 197,
14633
+ "title": "an edit-accept resolve round-trips `action` and the edited artifact it requires",
14634
+ "explicitId": "openwop.it.interrupt-approval.an-edit-accept-resolve-round-trips-action-and-the-edited-artifact-it-requires",
14635
+ "citations": [
14636
+ {
14637
+ "section": "RFCS/0183-interrupt-resolved-action-fidelity.md §A.2",
14638
+ "requirement": "a gate offering `edit-accept` MUST accept an edit-accept resolution carrying editedArtifactData"
14639
+ },
14640
+ {
14641
+ "section": "RFCS/0183-interrupt-resolved-action-fidelity.md §A.1",
14642
+ "requirement": "the resolution MUST be recorded as an event"
14643
+ },
14644
+ {
14645
+ "section": "RFCS/0183-interrupt-resolved-action-fidelity.md §A.1",
14646
+ "requirement": "the resolved payload MUST carry `action: \"edit-accept\"`"
14647
+ },
14648
+ {
14649
+ "section": "RFCS/0183-interrupt-resolved-action-fidelity.md §A.2",
14650
+ "requirement": "an edit-accept resolution MUST carry the editedArtifactData it was given"
14651
+ }
14652
+ ]
14653
+ },
14654
+ {
14655
+ "id": "openwop.it.interrupt-approval.refuses-an-edit-accept-resolution-that-supplies-no-editedartifactdata",
14656
+ "file": "interrupt-approval.test.ts",
14657
+ "line": 247,
14658
+ "title": "refuses an edit-accept resolution that supplies no editedArtifactData",
14659
+ "explicitId": "openwop.it.interrupt-approval.refuses-an-edit-accept-resolution-that-supplies-no-editedartifactdata",
14660
+ "citations": [
14661
+ {
14662
+ "section": "RFCS/0183-interrupt-resolved-action-fidelity.md §A.2",
14663
+ "requirement": "edit-accept without editedArtifactData MUST be refused — the edit is what the action means"
14664
+ }
14665
+ ]
14666
+ },
14629
14667
  {
14630
14668
  "id": "openwop.it.interrupt-approver-routing.capabilities-schema-declares-interrupt-approverrouting",
14631
14669
  "file": "interrupt-approver-routing.test.ts",
@@ -21658,7 +21696,7 @@
21658
21696
  {
21659
21697
  "id": "openwop.it.replay-fanout-suppression.delivers-for-a-live-run-suppresses-for-a-replay-fork-and-delivers-again-for-a-br",
21660
21698
  "file": "replay-fanout-suppression.test.ts",
21661
- "line": 159,
21699
+ "line": 205,
21662
21700
  "title": "delivers for a live run, suppresses for a replay fork, and delivers again for a branch fork",
21663
21701
  "explicitId": "openwop.it.replay-fanout-suppression.delivers-for-a-live-run-suppresses-for-a-replay-fork-and-delivers-again-for-a-br",
21664
21702
  "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.2.0",
5
- "corpusTag": "v2.2.0",
4
+ "version": "2.2.1",
5
+ "corpusTag": "v2.2.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": "5d074016ed82dda66ec00016a06aef595f6688e47d95690d1eb395e3bf217c56",
13
- "api/v2/asyncapi.yaml": "11107def567fc6188b29c267a2f5488fd92c59fb3433fd4124fdf63f9aca4981",
14
- "api/v2/openapi.yaml": "303752410cc4b0be42206a678c08d7aeb14333ab9e354e2e021356d468e8c3e7",
12
+ "api/seams-v2.yaml": "a309a537a5b0aaa20c5f496943bb8cc6642b143eb27b7481ee0b9e1030d00bfb",
13
+ "api/v2/asyncapi.yaml": "1f7023d581d02dba0427630dfd89ec890941ecbbc31bf8f09ce7ec8b965988b2",
14
+ "api/v2/openapi.yaml": "f26603003e562b928c148ebaebe49b93c9bd35c01e0996611311114908858e5d",
15
15
  "api/v2/redocly.yaml": "1e66b60e6118ad11a823bb620678be464d99dfe50a40e3e6f93ec9429b88b34c",
16
16
  "schemas/README.md": "0c0b737ffcf8f30e7d2809cec8a498232de710f41443212922ad8337cdde0b51",
17
17
  "schemas/a2a-task-state.schema.json": "c9365918f993f943b4b619d42551eb066a1ed33a08d895d51b395432a5b1f1bc",
@@ -200,7 +200,7 @@
200
200
  "schemas/workspace-file.schema.json": "464de85c2a068243084ee9c1d969bc7cd5d8f7948574e58450d6493c38a0e1e4",
201
201
  "spec/v1/alias-detectors.json": "fee4594ef49953953ffcd0b3813300067d16b3e65ebff2aac722034ac9b3f545",
202
202
  "spec/v1/capability-declaration-classes.json": "e7729aed5c4b4e1dd02abab0530f14cc95f5d4070fe51fb139e7f5cccefa00c6",
203
- "spec/v1/core-standard-manifest.json": "9220156eee1d465b371af344f19fe7ad151e492da3be066f43032d7bd451b0a0",
203
+ "spec/v1/core-standard-manifest.json": "9d76a090508697628031972795c813a12ff83b53ed1dff2dbaabe14d853b90c2",
204
204
  "spec/v1/deprecations.json": "a2022c2d6eb501bf406b5d75fe2d431a3fe0158e8509125d2453985eb1bf511a",
205
205
  "spec/v1/deprecations.schema.json": "18c87e78bedc210431f795ae44c5b5d202f2f3317850d5cf86867d4f1fa1cdfb",
206
206
  "spec/v1/event-codemap.json": "3da60d884157793a360da532a9fcbbfb5285636db325a74cec94b34622186d97",
@@ -212,18 +212,18 @@
212
212
  "spec/v1/migrations.schema.json": "886779aa6c22e646db097f5df210adb018a4dd14a7b815465a18c8a7056c8f72",
213
213
  "spec/v1/operation-path-manifest.json": "5f5f4e3842669371730ebbd1aace3fb794192615f0018dc144f484ba5db82ac3",
214
214
  "spec/v1/spec-gaps.json": "6cc9962c6b969f632e07a78b52a4f61447ff579e2990cbae989866f584a86042",
215
- "spec/v2/README.md": "e2a3e769eec448a50b41d910805d31ccc173bbebf79b2418a7734d70d2ad828e",
215
+ "spec/v2/README.md": "0f8a5c36ca9af5c6aa80b2e24ecf2d6af5ede9964bf70e88839110d9beab5693",
216
216
  "spec/v2/core/capabilities.md": "c5107a4964e487c20bbb5254cfe1f706e0d9ba7e34da9070bc43b50b385e7948",
217
217
  "spec/v2/core/conformance.md": "622084e3c74c4549087f4d861b1bb98cec201a0c5aec23788d27f53a355fde3b",
218
218
  "spec/v2/core/connection-packs.md": "1d759681e2962f5103228c52c45f24607ed4bb9ae73e30605f690c1d5a59e9ee",
219
219
  "spec/v2/core/errors.md": "74fdb5862f432a831cf0c2eadbe0c8cca6b2660ec578180ae33db54773a1df28",
220
220
  "spec/v2/core/events.md": "3b7d1ad34f9e438c9825d60c0114b9a21c82a468f15ccbd7567022641a4537ad",
221
221
  "spec/v2/core/form-content-packs.md": "6ffaae85d4550be48dd53fb6e2959af8aceb35bd87c5343b722885084f197713",
222
- "spec/v2/core/headers.md": "f8dd0d285e73906059cd815f18ecc068a0f1339a3755cf6319f0ee5d8da607d2",
222
+ "spec/v2/core/headers.md": "2dd67d71673539e16612f09f3f2513a384f6566052d7cd8a00885885689854c2",
223
223
  "spec/v2/core/idempotency.md": "b86c352d964aebad532727f314e26ed2177d49de382076fa64d3162e2f56118d",
224
224
  "spec/v2/core/identity.md": "9d2b823eb899463807452fe5721dcf09881837c161be024175957db27870b243",
225
225
  "spec/v2/core/interop.md": "d4c404e469e1d9d9be88bc2c939d777e7d7c1d0419b1251c18770f039838a401",
226
- "spec/v2/core/interrupt.md": "d872e0652a938594eeb2a19e86cf64e64e29b234f5d9c4fbe2970ab5fb191b9c",
226
+ "spec/v2/core/interrupt.md": "f525479a99104655219fa2e51c4cad2a03d8e3be93ff4dac173a684675e57348",
227
227
  "spec/v2/core/overview.md": "69377c90bbb87b6bfe4b8be4f1b65810094b0759c8d4f93ca6df92cc530ea023",
228
228
  "spec/v2/core/packs.md": "e72a7586a61630cdfd342eaf84e989f864b3e199006f5511ef59ea7c1a1c56f7",
229
229
  "spec/v2/core/persistence.md": "2373c2815b25b7b4fe29dfdf3783d3f2f3e637d3abce5085e69f019546302fb6",
@@ -270,8 +270,8 @@
270
270
  "spec/v2/path-manifest.json": "a6f4e652e866889e8bde815874062f62929aee95dc8e58e7152c56adee262163",
271
271
  "spec/v2/peer-dependency-aliases.json": "10fcab53c65305e9b6bae4a40d30176091dca68739ac8a78291510c77b50ca6b",
272
272
  "spec/v2/profiles.json": "0636f19fceae625390003a347e70ef4797d84766b5c24ce8a02cea52aadebca4",
273
- "spec/v2/release.json": "ce7a6bb9f4337e3063147edcd609c28c12cc26599ee4ffcfe32e816d85ddc399",
273
+ "spec/v2/release.json": "ee596fce1d27e7ec3f7a061b5705ca8022158adee5ba1aa7f321ee9abd97e9fb",
274
274
  "spec/v2/retention-floors.json": "eaf3722d95c79947af1d4269ef85117e126518c588cfcf1a2b21b97269f51624"
275
275
  },
276
- "corpusCommit": "e2db4047ee81b8f31ffee84238ebdd551d65b34c"
276
+ "corpusCommit": "a27e18972293865c72e4a776426718be6e2d77cc"
277
277
  }
@@ -20,6 +20,9 @@ const SKIP_NO_FIXTURE = !isFixtureAdvertised(WORKFLOW_ID);
20
20
  const REFINE_WORKFLOW_ID = 'conformance-approval-refine';
21
21
  const SKIP_NO_REFINE = !isFixtureAdvertised(REFINE_WORKFLOW_ID);
22
22
 
23
+ const EDIT_ACCEPT_WORKFLOW_ID = 'conformance-approval-edit-accept';
24
+ const SKIP_NO_EDIT_ACCEPT = !isFixtureAdvertised(EDIT_ACCEPT_WORKFLOW_ID);
25
+
23
26
  describe.skipIf(SKIP_NO_FIXTURE)('interrupt: approval accept resumes to `completed`', () => {
24
27
  it('run suspends at gate, accept resolution drives terminal completed', async () => {
25
28
  const create = await driver.post('/v1/runs', { workflowId: WORKFLOW_ID });
@@ -183,3 +186,80 @@ describe.skipIf(SKIP_NO_REFINE)('interrupt: refine resolution carries action + r
183
186
  ).toBe(true);
184
187
  });
185
188
  });
189
+
190
+ /**
191
+ * RFC 0183 §A.2, the `edit-accept` arm — an edit-accept resolution must be
192
+ * recordable with the artifact the approver edited. The refine block above
193
+ * witnesses one of §A.2's two conditional MUSTs; until this block the other was
194
+ * stated in `spec/v2/core/interrupt.md` §Approval and witnessed nowhere.
195
+ */
196
+ describe.skipIf(SKIP_NO_EDIT_ACCEPT)('interrupt: edit-accept resolution carries action + editedArtifactData (RFC 0183)', () => {
197
+ it('an edit-accept resolve round-trips `action` and the edited artifact it requires', async () => {
198
+ const create = await driver.post('/v1/runs', { workflowId: EDIT_ACCEPT_WORKFLOW_ID });
199
+ expect(create.status).toBe(201);
200
+ const runId = (create.json as { runId: string }).runId;
201
+
202
+ const suspended = await pollUntilStatus(runId, 'waiting-approval', { timeoutMs: 10_000 });
203
+ expect(suspended.currentNodeId).toBe(NODE_ID);
204
+
205
+ const editedArtifactData = { summary: 'conformance: edited by the approver' };
206
+ const resolve = await driver.post(
207
+ `/v1/runs/${encodeURIComponent(runId)}/interrupts/${encodeURIComponent(NODE_ID)}`,
208
+ { resumeValue: { action: 'edit-accept', editedArtifactData } },
209
+ );
210
+ expect(
211
+ resolve.status,
212
+ req('openwop.it.interrupt-approval.an-edit-accept-resolve-round-trips-action-and-the-edited-artifact-it-requires',
213
+ 'RFCS/0183-interrupt-resolved-action-fidelity.md §A.2',
214
+ 'a gate offering `edit-accept` MUST accept an edit-accept resolution carrying editedArtifactData',
215
+ ),
216
+ ).toBe(200);
217
+
218
+ const events = await driver.get(`/v1/runs/${encodeURIComponent(runId)}/events`);
219
+ expect(events.status).toBe(200);
220
+ const rows = ((events.json as { events?: Array<Record<string, unknown>> } | undefined)?.events ?? []);
221
+ const resolved = rows.find((e) => String(e.type).endsWith('interrupt.resolved') || String(e.type).endsWith('approval.received'));
222
+ expect(
223
+ resolved,
224
+ req('openwop.it.interrupt-approval.an-edit-accept-resolve-round-trips-action-and-the-edited-artifact-it-requires',
225
+ 'RFCS/0183-interrupt-resolved-action-fidelity.md §A.1',
226
+ 'the resolution MUST be recorded as an event',
227
+ ),
228
+ ).toBeDefined();
229
+
230
+ const payload = (resolved?.payload ?? {}) as Record<string, unknown>;
231
+ expect(
232
+ payload.action,
233
+ req('openwop.it.interrupt-approval.an-edit-accept-resolve-round-trips-action-and-the-edited-artifact-it-requires',
234
+ 'RFCS/0183-interrupt-resolved-action-fidelity.md §A.1',
235
+ 'the resolved payload MUST carry `action: "edit-accept"`',
236
+ ),
237
+ ).toBe('edit-accept');
238
+ expect(
239
+ payload.editedArtifactData,
240
+ req('openwop.it.interrupt-approval.an-edit-accept-resolve-round-trips-action-and-the-edited-artifact-it-requires',
241
+ 'RFCS/0183-interrupt-resolved-action-fidelity.md §A.2',
242
+ 'an edit-accept resolution MUST carry the editedArtifactData it was given',
243
+ ),
244
+ ).toEqual(editedArtifactData);
245
+ });
246
+
247
+ it('refuses an edit-accept resolution that supplies no editedArtifactData', async () => {
248
+ const create = await driver.post('/v1/runs', { workflowId: EDIT_ACCEPT_WORKFLOW_ID });
249
+ expect(create.status).toBe(201);
250
+ const runId = (create.json as { runId: string }).runId;
251
+ await pollUntilStatus(runId, 'waiting-approval', { timeoutMs: 10_000 });
252
+
253
+ const resolve = await driver.post(
254
+ `/v1/runs/${encodeURIComponent(runId)}/interrupts/${encodeURIComponent(NODE_ID)}`,
255
+ { resumeValue: { action: 'edit-accept' } },
256
+ );
257
+ expect(
258
+ [400, 422].includes(resolve.status),
259
+ req('openwop.it.interrupt-approval.refuses-an-edit-accept-resolution-that-supplies-no-editedartifactdata',
260
+ 'RFCS/0183-interrupt-resolved-action-fidelity.md §A.2',
261
+ 'edit-accept without editedArtifactData MUST be refused — the edit is what the action means',
262
+ ),
263
+ ).toBe(true);
264
+ });
265
+ });
@@ -36,6 +36,24 @@
36
36
  * operator raising the scale on a slow host makes this scenario harder to pass,
37
37
  * not easier.
38
38
  *
39
+ * CORRECTED 2026-09-15 — the paragraph above described a property this file did
40
+ * not have, and argued for it at length, which is the most expensive kind of
41
+ * stale comment. The scale knob DID multiply every poll and quiet window, and it
42
+ * did NOT touch vitest's own `testTimeout` (30_000, `conformance/vitest.config.ts`).
43
+ * The declared budgets in this one test already summed to ~77.5 s — 10 s + 30 s +
44
+ * 30 s of polling plus three quiet windows — so at scale 1 the second and third
45
+ * poll budgets were UNREACHABLE, and raising the scale made the test die at the
46
+ * same 30 s wall having spent even less of the window it was told to wait.
47
+ *
48
+ * So the knob could not make this scenario harder to pass. It could only make it
49
+ * fail sooner, on the clock, with vitest's generic "Test timed out in 30000ms" in
50
+ * place of `pollUntil`'s message naming the run, the predicate and the last
51
+ * status. A host that genuinely re-fired on replay and a host that was merely
52
+ * slow produced the same output.
53
+ *
54
+ * `TEST_TIMEOUT_MS` below now derives the test's own wall clock from the same
55
+ * budgets and the same scale, so the paragraph above is true as written.
56
+ *
39
57
  * ── Deliberately NOT in the `openwop-replay-fork` floor ──────────────────────
40
58
  * This scenario needs the host to accept a loopback receiver. A host with an
41
59
  * SSRF guard on `POST /v1/webhooks` correctly refuses one, and the suite's
@@ -155,6 +173,34 @@ const DELIVERY_GRACE_MS = 1_500;
155
173
  */
156
174
  const SUPPRESSION_WINDOW_MS = 6_000;
157
175
 
176
+ /** Poll ceilings, named so the test's own wall clock can be derived from them
177
+ * rather than guessed alongside them. */
178
+ const SOURCE_POLL_MS = 10_000;
179
+ const FORK_POLL_MS = 30_000;
180
+
181
+ /**
182
+ * THE TEST'S OWN WALL CLOCK, and it must be computed, not defaulted.
183
+ *
184
+ * Every budget in this file is a claim about how long a legitimate host may
185
+ * take. A `testTimeout` smaller than their sum does not tighten those claims —
186
+ * it DELETES them, silently, because vitest kills the test before the budget it
187
+ * was given can be spent. The suite default (30_000) is smaller than the first
188
+ * two budgets alone.
189
+ *
190
+ * It scales with `scaledTimeoutMs` for the same reason: an operator who raises
191
+ * `OPENWOP_POLL_TIMEOUT_SCALE` is saying "this host is slow, wait longer". A
192
+ * scaled poll budget under an unscaled wall clock turns that instruction into
193
+ * its opposite. Both move together or neither should.
194
+ *
195
+ * The flat slack covers the run submissions, receiver registration and
196
+ * assertions between the waits — work with no budget of its own. It is added
197
+ * AFTER scaling deliberately: it is fixed overhead, not host latency, so
198
+ * multiplying it would inflate the ceiling for a reason that is not the host's.
199
+ */
200
+ const TEST_TIMEOUT_MS =
201
+ scaledTimeoutMs(SOURCE_POLL_MS + FORK_POLL_MS * 2 + DELIVERY_GRACE_MS * 2 + SUPPRESSION_WINDOW_MS)
202
+ + 15_000;
203
+
158
204
  describe('replay-fanout-suppression: a replay fork MUST NOT fan out re-emitted events', () => {
159
205
  it('delivers for a live run, suppresses for a replay fork, and delivers again for a branch fork', async (ctx) => {
160
206
  const disco = await driver.get('/.well-known/openwop');
@@ -204,7 +250,7 @@ describe('replay-fanout-suppression: a replay fork MUST NOT fan out re-emitted e
204
250
  const create = await driver.post('/v1/runs', { workflowId: 'conformance-noop' });
205
251
  expect(create.status, req('openwop.it.replay-fanout-suppression.delivers-for-a-live-run-suppresses-for-a-replay-fork-and-delivers-again-for-a-br', 'webhooks.md §"Register"', 'failed to start conformance-noop')).toBe(201);
206
252
  const sourceRunId = (create.json as { runId: string }).runId;
207
- await pollUntilTerminal(sourceRunId, { timeoutMs: 10_000 });
253
+ await pollUntilTerminal(sourceRunId, { timeoutMs: SOURCE_POLL_MS });
208
254
  await quietWindow(DELIVERY_GRACE_MS);
209
255
 
210
256
  expect(
@@ -267,7 +313,7 @@ describe('replay-fanout-suppression: a replay fork MUST NOT fan out re-emitted e
267
313
  }
268
314
  expect(replay.status, req('openwop.it.replay-fanout-suppression.delivers-for-a-live-run-suppresses-for-a-replay-fork-and-delivers-again-for-a-br', 'webhooks.md §"Register"', 'replay fork should be accepted')).toBe(201);
269
315
  const replayRunId = (replay.json as { runId: string }).runId;
270
- await pollUntilTerminal(replayRunId, { timeoutMs: 30_000 });
316
+ await pollUntilTerminal(replayRunId, { timeoutMs: FORK_POLL_MS });
271
317
  await quietWindow(SUPPRESSION_WINDOW_MS);
272
318
 
273
319
  expect(
@@ -315,7 +361,7 @@ describe('replay-fanout-suppression: a replay fork MUST NOT fan out re-emitted e
315
361
  }
316
362
  expect(branch.status, req('openwop.it.replay-fanout-suppression.delivers-for-a-live-run-suppresses-for-a-replay-fork-and-delivers-again-for-a-br', 'replay.md §"Host-initiated fan-out is an external effect"', 'branch fork should be accepted')).toBe(201);
317
363
  const branchRunId = (branch.json as { runId: string }).runId;
318
- await pollUntilTerminal(branchRunId, { timeoutMs: 30_000 });
364
+ await pollUntilTerminal(branchRunId, { timeoutMs: FORK_POLL_MS });
319
365
  await quietWindow(DELIVERY_GRACE_MS);
320
366
 
321
367
  expect(
@@ -326,5 +372,7 @@ describe('replay-fanout-suppression: a replay fork MUST NOT fan out re-emitted e
326
372
  + 'means the host keyed on "is a fork" rather than on replay-ness read from the run',
327
373
  ),
328
374
  ).toBeGreaterThan(0);
329
- });
375
+ // The third positional argument is the whole point of this fix: without it
376
+ // the suite default (30_000) silently overrides every budget above.
377
+ }, TEST_TIMEOUT_MS);
330
378
  });