@openwop/openwop-conformance 2.45.29 → 2.46.0
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 +21 -0
- package/README.md +3 -3
- package/coverage.md +3 -3
- package/dist/spec-artifacts.lock.json +2 -2
- package/package.json +2 -2
- package/requirements.json +144 -58
- package/scenario-majors.json +11 -2
- package/schemas/CORPUS-STAMP.json +17 -17
- package/src/lib/negotiation-record.ts +108 -0
- package/src/scenarios/v2-effect-identity-business-key.test.ts +7 -79
- package/src/scenarios/v2-effect-ledger-keying.test.ts +102 -0
- package/src/scenarios/v2-negotiation-decided-emitted.test.ts +33 -4
- package/src/scenarios/v2-negotiation-decided-inbound.test.ts +155 -0
- package/src/scenarios/v2-v1-signed-webhook-accepted.test.ts +4 -12
- package/src/scenarios/v2-webhooks-v1-scheme-listed.test.ts +33 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# `@openwop/openwop-conformance` Changelog
|
|
2
2
|
|
|
3
|
+
## [2.46.0] — 2026-10-10 — RFC 0242: a negotiation record says what was asked for, and an inbound negotiation has a home
|
|
4
|
+
|
|
5
|
+
A minor, not a patch: `host-event.schema.json` gains a cross-file `$ref` to `run-event-payloads.schema.json#/$defs/negotiationDecided` (COMPATIBILITY.md §2.1). A validator that pre-registers a fixed list of peer schemas must register `run-event-payloads.schema.json` before compiling `host-event.schema.json`.
|
|
6
|
+
|
|
7
|
+
- **`requested` on `negotiation.decided` (RFC 0242 §A).** `v2-negotiation-decided-emitted` gains two legs, `0242.requested.outbound` and `.mcp`: the record's `requested` equals the version the host's client named to the suite's peer, read from what the peer received. A downgrade is now visible as an `accepted` record whose `version` differs from `requested`.
|
|
8
|
+
- **New `v2-negotiation-decided-inbound` (RFC 0242 §B).** Gated on an inbound A2A or MCP surface (`a2a.agentCardUrl`, `mcp.serverUrls`, `mcp.serverMount`), with no seam:
|
|
9
|
+
- `0242.inbound.listed`: such a host lists `negotiation.decided` as a durable `hostEvents` type.
|
|
10
|
+
- `0242.inbound.recorded` / `.refused` (and `.mcp`): with `/host/events` open, an authenticated inbound exchange naming `preferredVersion`, then one naming a version below the floor, each leaves a durable, runless `negotiation.decided` host event with the right `outcome` and `requested`.
|
|
11
|
+
- Proven against the v2 reference host with the §B implementation: every leg passes, and every record leg fails when the host drops `requested`. On a host that serves A2A or MCP inbound without listing the type, `listed` fails and the record legs are `inapplicable`, naming it.
|
|
12
|
+
- **New lib `negotiation-record.ts`** with self-tests: `askedVersion`, `judgeRequested`, `judgeListed`, `judgeInboundRecord`.
|
|
13
|
+
- **What a host's next bundle shows:** a host that serves A2A or MCP inbound records `0242.inbound.listed` `executed-fail` until it lists the type; the v2 reference host and openwop-app follow (RFC 0242 G1). A host that advertises neither surface is unaffected.
|
|
14
|
+
|
|
15
|
+
## [2.45.30] — 2026-10-09 — the seams profile floor is seam-driven
|
|
16
|
+
|
|
17
|
+
- **`openwop-conformance-seams-v2` no longer certifies on a host that mounts no seams.** Its predicate is a `conformance` block at the discovery root, deliberately necessary and not sufficient: on a host that does not advertise `conformance.seamsProfile`, every floor leg records `inapplicable`, so the profile is claimed with `witnessCount 0` and not certified. But a floor row is recorded per scenario file, and two floor files had a leg that runs without a seam. openwop-app's production bundle `4683d9f89` (suite 2.45.28) carries a `conformance` block holding only `certificationBundleUrl`, and certified the profile on the facet leg alone.
|
|
18
|
+
- **The facet leg** of `v2-v1-signed-webhook-accepted` (`0176.v1-signed-webhook-accepted.facet`) moves to `v2-webhooks-v1-scheme-listed`.
|
|
19
|
+
- **The ledger-read leg** of `v2-effect-identity-business-key` (`0173.effect-identity-business-key`) moves to `v2-effect-ledger-keying`.
|
|
20
|
+
- Requirement ids are unchanged, and so are the profile's floor files. The floor files keep only their seam-driven legs.
|
|
21
|
+
- **New coherence check** `seams-floor-legs-gated`: every leg of a seams-profile floor file reaches `seamsProfileAdvertised(` or `era2Gate(` before its first assertion. Proven against both files as they were: each fails, naming its seam-free leg.
|
|
22
|
+
- **What a host's next bundle shows:** a host that doesn't advertise the seams profile but ran these legs sees `openwop.floor.v2-effect-identity-business-key` and `openwop.floor.v2-v1-signed-webhook-accepted` go `executed-pass` to `inapplicable`, while both requirement ids keep passing under the new files. On MyndHyve that costs no certification, since it doesn't claim the profile. On openwop-app the profile is claimed and not certified, which is the correct outcome. A seams host is unaffected. Bundles already published verify as before.
|
|
23
|
+
|
|
3
24
|
## [2.45.29] — 2026-10-08 — purpose labels witnessed without a seam; RFC 0241 Accepted
|
|
4
25
|
|
|
5
26
|
- **`v2-purpose-propagation-onward` witnesses purpose labels through normative operations.** New fixture `conformance-purpose-relay`: routed as the only skill of one agent's A2A card, it relays an inbound A2A message's text to the suite's fake peer through `core.conformance.a2a-invoke`. The suite labels the inbound message with `metadata.openwop.permittedPurposes`, finds the agent through `GET /agents` and `GetExtendedAgentCard`, and reads the onward label at its peer; a nonce matches each onward message to its inbound one. The §22 seam stays as the fallback, and each note names the path. A host with the fixture advertised but no card routing it, or with the suite's peer not running, records `blocked`. Self-test double: a widened label, a dropped label and a call made under `[]` each fail their leg (`lib/purpose-relay-witness.test.ts`). Proven on a seams-off v2 reference host (openwop-examples #166): both rows `executed-pass`, and each defect `executed-fail`. This replaces the planned RFC 0240: the label already arrives on a real carrier.
|
package/README.md
CHANGED
|
@@ -137,7 +137,7 @@ Each scenario file records its disposition and assertion count in `<report-dir>/
|
|
|
137
137
|
|
|
138
138
|
## What's Covered
|
|
139
139
|
|
|
140
|
-
The current suite has
|
|
140
|
+
The current suite has 653 scenario files under `src/scenarios/`. By target major ([`scenario-majors.json`](./scenario-majors.json)): 213 files run against a v2 host and 455 against a v1 host; 15 of them run at both.
|
|
141
141
|
|
|
142
142
|
The v2 scenarios (`src/scenarios/v2-*.test.ts`) cover, by area:
|
|
143
143
|
|
|
@@ -147,7 +147,7 @@ The v2 scenarios (`src/scenarios/v2-*.test.ts`) cover, by area:
|
|
|
147
147
|
| Runs | Create, read, list, cancel, bulk cancel, pause/resume, run options and limits, outputs on completion, snapshots | `v2-created-run-readable`, `v2-run-cancel`, `v2-run-pause-resume`, `v2-run-options-limits`, `v2-run-completed-outputs` |
|
|
148
148
|
| Events and streaming | Closed event types, SSE projection, `Last-Event-ID` resumption, poll cursors, terminal-event-once | `v2-stream-sse-projection`, `v2-sse-last-event-id-cursor`, `v2-poll-cursor-v2`, `v2-terminal-event-once` |
|
|
149
149
|
| Errors and headers | The error registry and envelope, malformed bodies, CORS preflight, header scheme | `v2-error-registry`, `v2-malformed-body-envelope`, `v2-cors-preflight`, `v2-header-scheme` |
|
|
150
|
-
| Idempotency | Key grammar, in-flight concurrency, effect identity | `v2-idempotency-key-grammar`, `v2-idempotency-in-flight`, `v2-effect-identity-business-key` |
|
|
150
|
+
| Idempotency | Key grammar, in-flight concurrency, effect identity | `v2-idempotency-key-grammar`, `v2-idempotency-in-flight`, `v2-effect-identity-business-key`, `v2-effect-ledger-keying` |
|
|
151
151
|
| Interrupts and approvals | Resolve after terminal, token scheme, approver enforcement, reject disposition, credential interrupts | `v2-interrupt-resolve-terminal`, `v2-approver-enforced`, `v2-credential-interrupt` |
|
|
152
152
|
| Replay and fork | Fork prefix and ancestry, refusals, replay side-effect suppression, forking a v1 run | `v2-run-fork-prefix`, `v2-run-fork-refusals`, `v2-replay-suppression-ordinal` |
|
|
153
153
|
| Identity, auth and OAuth | Auth challenges, bound ids, workspace scope from identity, OIDC audience, protected-resource metadata, PKCE | `v2-auth-challenge`, `v2-bound-id-kinds`, `v2-oidc-id-token-audience`, `v2-oauth-client-pkce-state-iss` |
|
|
@@ -166,7 +166,7 @@ Three kinds of scenario share the tree:
|
|
|
166
166
|
- **Host** checks drive a live host over HTTP.
|
|
167
167
|
- **Gated** checks run only when the host advertises the family, profile or fixture they need, and otherwise record `inapplicable` or `blocked` with a reason. `--require-behavior` turns an advertised-but-unwitnessable behaviour into a failure.
|
|
168
168
|
|
|
169
|
-
Current source tree:
|
|
169
|
+
Current source tree: 653 scenario files. [`coverage.md`](./coverage.md) maps each spec document and every OpenAPI operation to its scenarios. [`CHANGELOG.md`](./CHANGELOG.md) records when each scenario landed.
|
|
170
170
|
|
|
171
171
|
## How the 2.x suite is built
|
|
172
172
|
|
package/coverage.md
CHANGED
|
@@ -30,7 +30,7 @@ Each scenario that targets major 2 is listed once, under the [`spec/v2/core/`](.
|
|
|
30
30
|
| [`i18n.md`](../spec/v2/core/i18n.md) | `v2-content-locale-keys.test.ts`, `v2-i18n-negotiation.test.ts`, `v2-localized-content-delivery.test.ts` |
|
|
31
31
|
| [`idempotency.md`](../spec/v2/core/idempotency.md) | `v2-durability-recovery.test.ts`, `v2-idempotency-in-flight.test.ts`, `v2-idempotency-key-grammar.test.ts` |
|
|
32
32
|
| [`identity.md`](../spec/v2/core/identity.md) | `auth-challenge-no-oracle.test.ts`, `v2-assurance-downgrade-audited.test.ts`, `v2-auth-challenge.test.ts`, `v2-authorization-advertisement.test.ts`, `v2-bound-id-kinds.test.ts`, `v2-bound-id-path-projection.test.ts`, `v2-id-grammar.test.ts`, `v2-interrupt-token-scheme.test.ts`, `v2-lane-exp-only-bound.test.ts`, `v2-lane-issuer-advertised.test.ts`, `v2-oidc-id-token-audience.test.ts`, `v2-owner-subject-required.test.ts`, `v2-protected-resource-metadata.test.ts`, `v2-revocation-honored.test.ts`, `v2-subject-link-record.test.ts` |
|
|
33
|
-
| [`interop.md`](../spec/v2/core/interop.md) | `otel-mcp-semconv-projection.test.ts`, `v2-a2a-agent-cards.test.ts`, `v2-a2a-client-error-details.test.ts`, `v2-a2a-operation-map.test.ts`, `v2-a2a-push-delivery.test.ts`, `v2-interop-trace-context.test.ts`, `v2-legacy-profiles-absent.test.ts`, `v2-mcp-mount-map.test.ts`, `v2-mcp-tasks.test.ts`, `v2-minimum-version-refused.test.ts`, `v2-mrtr-rounds-ceiling.test.ts`, `v2-negotiation-authenticated.test.ts`, `v2-negotiation-decided-emitted.test.ts`, `v2-no-transport-advertisement.test.ts`, `v2-refresh-sla.test.ts` |
|
|
33
|
+
| [`interop.md`](../spec/v2/core/interop.md) | `otel-mcp-semconv-projection.test.ts`, `v2-a2a-agent-cards.test.ts`, `v2-a2a-client-error-details.test.ts`, `v2-a2a-operation-map.test.ts`, `v2-a2a-push-delivery.test.ts`, `v2-interop-trace-context.test.ts`, `v2-legacy-profiles-absent.test.ts`, `v2-mcp-mount-map.test.ts`, `v2-mcp-tasks.test.ts`, `v2-minimum-version-refused.test.ts`, `v2-mrtr-rounds-ceiling.test.ts`, `v2-negotiation-authenticated.test.ts`, `v2-negotiation-decided-emitted.test.ts`, `v2-negotiation-decided-inbound.test.ts`, `v2-no-transport-advertisement.test.ts`, `v2-refresh-sla.test.ts` |
|
|
34
34
|
| [`interrupt.md`](../spec/v2/core/interrupt.md) | `v2-approval-reject-disposition.test.ts`, `v2-approver-enforced.test.ts`, `v2-callback-url-guarded.test.ts` |
|
|
35
35
|
| [`node-pack-runtimes.md`](../spec/v2/core/node-pack-runtimes.md) | `v2-node-pack-runtimes-advertisement.test.ts`, `v2-wasm-memory-cap.test.ts`, `v2-wasm-abi-reject.test.ts` |
|
|
36
36
|
| [`oauth.md`](../spec/v2/core/oauth.md) | `v2-credential-interrupt.test.ts`, `v2-credentials-advertisement.test.ts`, `v2-oauth-client-pkce-state-iss.test.ts`, `v2-oauth-mcp-reach-discovery.test.ts` |
|
|
@@ -39,11 +39,11 @@ Each scenario that targets major 2 is listed once, under the [`spec/v2/core/`](.
|
|
|
39
39
|
| [`portability.md`](../spec/v2/core/portability.md) | `v2-portability-advertisement.test.ts` |
|
|
40
40
|
| [`replay.md`](../spec/v2/core/replay.md) | `context-summarization-replay.test.ts`, `memory-attribution-replay-stable.test.ts`, `v2-effect-seam-manifest.test.ts`, `v2-effect-seam-no-refire.test.ts`, `v2-fork-a-v1-run.test.ts`, `v2-nondeterminism-policy-advertisement.test.ts`, `v2-nondeterminism-sources.test.ts`, `v2-replay-suppression-ordinal.test.ts`, `v2-run-fork-prefix.test.ts` |
|
|
41
41
|
| [`runs.md`](../spec/v2/core/runs.md) | `v2-artifact-a2a-shape.test.ts`, `v2-budget-enforcement.test.ts`, `v2-budget-exhaustion-facet.test.ts`, `v2-configurable-closed.test.ts`, `v2-conversation-turn-parts.test.ts`, `v2-created-run-readable.test.ts`, `v2-data-residency-admission.test.ts`, `v2-data-residency-advertisement.test.ts`, `v2-dead-letter-advertisement.test.ts`, `v2-eval-mode-unadvertised-refused.test.ts`, `v2-limits-envelope-caps-advertisement.test.ts`, `v2-run-annotation-not-event.test.ts`, `v2-run-bulk-cancel.test.ts`, `v2-run-cancel.test.ts`, `v2-run-diff-identical.test.ts`, `v2-run-execution-bounds.test.ts`, `v2-run-fork-ancestry.test.ts`, `v2-run-fork-refusals.test.ts`, `v2-run-list.test.ts`, `v2-run-options-limits.test.ts`, `v2-run-pause-resume.test.ts`, `v2-run-snapshot-etag.test.ts` |
|
|
42
|
-
| [`security-defaults.md`](../spec/v2/core/security-defaults.md) | `audit-anomaly-shape.test.ts`, `audit-checkpoint-signature.test.ts`, `audit-checkpoint-vectors.test.ts`, `audit-log-integrity.test.ts`, `inbound-credential-no-passthrough.test.ts`, `v2-compensation-read-projection.test.ts`, `v2-effect-identity-business-key.test.ts`, `v2-pack-isolation.test.ts`, `v2-purpose-propagation-advertisement.test.ts`, `v2-purpose-propagation-onward.test.ts`, `v2-relaxation-recorded.test.ts` |
|
|
42
|
+
| [`security-defaults.md`](../spec/v2/core/security-defaults.md) | `audit-anomaly-shape.test.ts`, `audit-checkpoint-signature.test.ts`, `audit-checkpoint-vectors.test.ts`, `audit-log-integrity.test.ts`, `inbound-credential-no-passthrough.test.ts`, `v2-compensation-read-projection.test.ts`, `v2-effect-identity-business-key.test.ts`, `v2-effect-ledger-keying.test.ts`, `v2-pack-isolation.test.ts`, `v2-purpose-propagation-advertisement.test.ts`, `v2-purpose-propagation-onward.test.ts`, `v2-relaxation-recorded.test.ts` |
|
|
43
43
|
| [`storage.md`](../spec/v2/core/storage.md) | `v2-fs-sandbox-escape-refused.test.ts`, `v2-storage-cross-tenant-isolation.test.ts`, `v2-table-schema-enforcement.test.ts` |
|
|
44
44
|
| [`tool-catalog.md`](../spec/v2/core/tool-catalog.md) | `tool-catalog-compact-projection.test.ts`, `tool-catalog-projection.test.ts`, `tool-descriptor-shape.test.ts`, `v2-tool-catalog-annotations.test.ts` |
|
|
45
45
|
| [`versioning.md`](../spec/v2/core/versioning.md) | `v2-advertised-path-space-served.test.ts`, `v2-client-version-header.test.ts`, `v2-dual-stack-negotiation.test.ts`, `v2-malformed-body-envelope.test.ts`, `v2-min-client-version.test.ts`, `v2-preferred-version-default.test.ts`, `v2-version-header-honored.test.ts`, `v2-well-known-one-resource.test.ts` |
|
|
46
|
-
| [`webhooks.md`](../spec/v2/core/webhooks.md) | `v2-trigger-bridge-delivery.test.ts`, `v2-trigger-dead-letter-read.test.ts`, `v2-v1-signed-webhook-accepted.test.ts`, `v2-webhook-delivery-isolation.test.ts`, `v2-webhook-delivery-shape.test.ts`, `v2-webhook-durable-delivery.test.ts`, `v2-webhook-egress-refusal.test.ts`, `v2-webhook-endpoint-verification.test.ts`, `v2-webhook-generated-secret.test.ts`, `v2-webhook-message-id-stable.test.ts`, `v2-webhook-secret-rotation.test.ts`, `v2-webhook-standard-webhooks-delivery.test.ts`, `v2-webhook-unregister-stops-delivery.test.ts` |
|
|
46
|
+
| [`webhooks.md`](../spec/v2/core/webhooks.md) | `v2-trigger-bridge-delivery.test.ts`, `v2-trigger-dead-letter-read.test.ts`, `v2-v1-signed-webhook-accepted.test.ts`, `v2-webhooks-v1-scheme-listed.test.ts`, `v2-webhook-delivery-isolation.test.ts`, `v2-webhook-delivery-shape.test.ts`, `v2-webhook-durable-delivery.test.ts`, `v2-webhook-egress-refusal.test.ts`, `v2-webhook-endpoint-verification.test.ts`, `v2-webhook-generated-secret.test.ts`, `v2-webhook-message-id-stable.test.ts`, `v2-webhook-secret-rotation.test.ts`, `v2-webhook-standard-webhooks-delivery.test.ts`, `v2-webhook-unregister-stops-delivery.test.ts` |
|
|
47
47
|
| [`workflow-chain-packs.md`](../spec/v2/core/workflow-chain-packs.md) | `v2-chain-pin-exact.test.ts` |
|
|
48
48
|
|
|
49
49
|
`overview.md`, the introduction to the other documents, has no scenario filed under it.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openwop/openwop-conformance",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.46.0",
|
|
4
4
|
"description": "Black-box conformance suite for OpenWOP hosts (v2 current; v1 scenarios retained for the frozen v1 tree).",
|
|
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.
|
|
59
|
+
"@openwop/spec-artifacts": "2.46.0"
|
|
60
60
|
}
|
|
61
61
|
}
|
package/requirements.json
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"$comment": "GENERATED by conformance/scripts/generate-requirement-registry.mjs — do not edit. One record per it()/test() in src/scenarios. Ids: openwop.it.<file-stem>.<title-slug>[~n] (src/lib/requirement-ids.ts). A record with id null has an interpolated title; its run-time row is keyed by the rendered title and maps here by file+line only. Renamed ids need a row in requirement-aliases.json.",
|
|
3
3
|
"generatedFrom": "src/scenarios/*.test.ts",
|
|
4
4
|
"counts": {
|
|
5
|
-
"files":
|
|
6
|
-
"tests":
|
|
7
|
-
"withStableId":
|
|
5
|
+
"files": 741,
|
|
6
|
+
"tests": 2790,
|
|
7
|
+
"withStableId": 2790,
|
|
8
8
|
"interpolatedTitles": 0,
|
|
9
|
-
"explicitIds":
|
|
9
|
+
"explicitIds": 2646
|
|
10
10
|
},
|
|
11
11
|
"records": [
|
|
12
12
|
{
|
|
@@ -30331,85 +30331,85 @@
|
|
|
30331
30331
|
]
|
|
30332
30332
|
},
|
|
30333
30333
|
{
|
|
30334
|
-
"id": "openwop.it.v2-effect-identity-business-key.
|
|
30334
|
+
"id": "openwop.it.v2-effect-identity-business-key.the-same-provider-key-is-presented-across-two-transport-retries",
|
|
30335
30335
|
"file": "v2-effect-identity-business-key.test.ts",
|
|
30336
|
-
"line":
|
|
30337
|
-
"title": "
|
|
30338
|
-
"explicitId": "openwop.requirement.0173.effect-identity-business-key",
|
|
30336
|
+
"line": 48,
|
|
30337
|
+
"title": "the same provider key is presented across two transport retries",
|
|
30338
|
+
"explicitId": "openwop.requirement.0173.effect-identity-business-key.retry",
|
|
30339
30339
|
"citations": [
|
|
30340
30340
|
{
|
|
30341
|
-
"section": "
|
|
30342
|
-
"requirement":
|
|
30341
|
+
"section": "spec/v2/core/idempotency.md §Layer 2: effect identity",
|
|
30342
|
+
"requirement": null,
|
|
30343
|
+
"interpolated": true
|
|
30343
30344
|
},
|
|
30344
30345
|
{
|
|
30345
|
-
"section": "
|
|
30346
|
-
"requirement":
|
|
30346
|
+
"section": "spec/v2/core/idempotency.md §Layer 2: effect identity",
|
|
30347
|
+
"requirement": null,
|
|
30348
|
+
"interpolated": true
|
|
30347
30349
|
},
|
|
30348
30350
|
{
|
|
30349
|
-
"section": "effect
|
|
30351
|
+
"section": "spec/v2/core/idempotency.md §Layer 2: effect identity",
|
|
30350
30352
|
"requirement": null,
|
|
30351
30353
|
"interpolated": true
|
|
30352
30354
|
},
|
|
30353
30355
|
{
|
|
30354
|
-
"section": "
|
|
30355
|
-
"requirement":
|
|
30356
|
+
"section": "spec/v2/core/idempotency.md §Layer 2: effect identity",
|
|
30357
|
+
"requirement": null,
|
|
30358
|
+
"interpolated": true
|
|
30356
30359
|
},
|
|
30357
30360
|
{
|
|
30358
|
-
"section": "
|
|
30361
|
+
"section": "spec/v2/core/idempotency.md §Layer 2: effect identity",
|
|
30359
30362
|
"requirement": null,
|
|
30360
30363
|
"interpolated": true
|
|
30361
30364
|
},
|
|
30362
30365
|
{
|
|
30363
|
-
"section": "
|
|
30366
|
+
"section": "spec/v2/core/idempotency.md §Layer 2: effect identity",
|
|
30364
30367
|
"requirement": null,
|
|
30365
30368
|
"interpolated": true
|
|
30366
30369
|
},
|
|
30367
30370
|
{
|
|
30368
|
-
"section": "
|
|
30369
|
-
"requirement": "
|
|
30371
|
+
"section": "spec/v2/core/idempotency.md §Layer 2: effect identity",
|
|
30372
|
+
"requirement": "the key the ledger records MUST be the key the provider received — a ledger that disagrees with the wire is not a witness"
|
|
30370
30373
|
}
|
|
30371
30374
|
]
|
|
30372
30375
|
},
|
|
30373
30376
|
{
|
|
30374
|
-
"id": "openwop.it.v2-effect-
|
|
30375
|
-
"file": "v2-effect-
|
|
30376
|
-
"line":
|
|
30377
|
-
"title": "
|
|
30378
|
-
"explicitId": "openwop.requirement.0173.effect-identity-business-key
|
|
30377
|
+
"id": "openwop.it.v2-effect-ledger-keying.get-runs-runid-effects-validates-and-every-row-is-keyed-on-business-identity-or",
|
|
30378
|
+
"file": "v2-effect-ledger-keying.test.ts",
|
|
30379
|
+
"line": 42,
|
|
30380
|
+
"title": "GET /runs/{runId}/effects validates and every row is keyed on business identity or the activity recipe",
|
|
30381
|
+
"explicitId": "openwop.requirement.0173.effect-identity-business-key",
|
|
30379
30382
|
"citations": [
|
|
30380
30383
|
{
|
|
30381
|
-
"section": "
|
|
30382
|
-
"requirement":
|
|
30383
|
-
"interpolated": true
|
|
30384
|
+
"section": "runs.md §Create",
|
|
30385
|
+
"requirement": "POST /runs MUST answer 201 for the noop fixture"
|
|
30384
30386
|
},
|
|
30385
30387
|
{
|
|
30386
|
-
"section": "
|
|
30387
|
-
"requirement":
|
|
30388
|
-
"interpolated": true
|
|
30388
|
+
"section": "security-defaults.md §Layer-2 effect identity",
|
|
30389
|
+
"requirement": "a host advertising `idempotency` MUST serve GET /runs/{runId}/effects with 200 (RFC 0173 §B)"
|
|
30389
30390
|
},
|
|
30390
30391
|
{
|
|
30391
|
-
"section": "
|
|
30392
|
+
"section": "effect-ledger-projection.schema.json",
|
|
30392
30393
|
"requirement": null,
|
|
30393
30394
|
"interpolated": true
|
|
30394
30395
|
},
|
|
30395
30396
|
{
|
|
30396
|
-
"section": "
|
|
30397
|
-
"requirement":
|
|
30398
|
-
"interpolated": true
|
|
30397
|
+
"section": "effect-ledger-projection.schema.json runId",
|
|
30398
|
+
"requirement": "runId MUST echo the run read"
|
|
30399
30399
|
},
|
|
30400
30400
|
{
|
|
30401
|
-
"section": "
|
|
30401
|
+
"section": "security-defaults.md §Layer-2 effect identity",
|
|
30402
30402
|
"requirement": null,
|
|
30403
30403
|
"interpolated": true
|
|
30404
30404
|
},
|
|
30405
30405
|
{
|
|
30406
|
-
"section": "
|
|
30406
|
+
"section": "RFC 0150 §B",
|
|
30407
30407
|
"requirement": null,
|
|
30408
30408
|
"interpolated": true
|
|
30409
30409
|
},
|
|
30410
30410
|
{
|
|
30411
|
-
"section": "
|
|
30412
|
-
"requirement": "
|
|
30411
|
+
"section": "effect-ledger-projection.schema.json providerKey",
|
|
30412
|
+
"requirement": "providerKey is a redaction-safe identity, never credential material"
|
|
30413
30413
|
}
|
|
30414
30414
|
]
|
|
30415
30415
|
},
|
|
@@ -33579,7 +33579,7 @@
|
|
|
33579
33579
|
{
|
|
33580
33580
|
"id": "openwop.it.v2-negotiation-decided-emitted.an-a2a-exchange-leaves-negotiation-decided-on-the-host-log",
|
|
33581
33581
|
"file": "v2-negotiation-decided-emitted.test.ts",
|
|
33582
|
-
"line":
|
|
33582
|
+
"line": 166,
|
|
33583
33583
|
"title": "an A2A exchange leaves negotiation.decided on the host log",
|
|
33584
33584
|
"explicitId": null,
|
|
33585
33585
|
"citations": []
|
|
@@ -33587,11 +33587,73 @@
|
|
|
33587
33587
|
{
|
|
33588
33588
|
"id": "openwop.it.v2-negotiation-decided-emitted.an-mcp-exchange-leaves-negotiation-decided-on-the-host-log",
|
|
33589
33589
|
"file": "v2-negotiation-decided-emitted.test.ts",
|
|
33590
|
-
"line":
|
|
33590
|
+
"line": 169,
|
|
33591
33591
|
"title": "an MCP exchange leaves negotiation.decided on the host log",
|
|
33592
33592
|
"explicitId": null,
|
|
33593
33593
|
"citations": []
|
|
33594
33594
|
},
|
|
33595
|
+
{
|
|
33596
|
+
"id": "openwop.it.v2-negotiation-decided-emitted.an-a2a-record-names-the-version-the-host-asked-for-rfc-0242-a-2",
|
|
33597
|
+
"file": "v2-negotiation-decided-emitted.test.ts",
|
|
33598
|
+
"line": 172,
|
|
33599
|
+
"title": "an A2A record names the version the host asked for (RFC 0242 §A.2)",
|
|
33600
|
+
"explicitId": null,
|
|
33601
|
+
"citations": []
|
|
33602
|
+
},
|
|
33603
|
+
{
|
|
33604
|
+
"id": "openwop.it.v2-negotiation-decided-emitted.an-mcp-record-names-the-revision-the-host-asked-for-rfc-0242-a-2",
|
|
33605
|
+
"file": "v2-negotiation-decided-emitted.test.ts",
|
|
33606
|
+
"line": 175,
|
|
33607
|
+
"title": "an MCP record names the revision the host asked for (RFC 0242 §A.2)",
|
|
33608
|
+
"explicitId": null,
|
|
33609
|
+
"citations": []
|
|
33610
|
+
},
|
|
33611
|
+
{
|
|
33612
|
+
"id": "openwop.it.v2-negotiation-decided-inbound.a-host-serving-a2a-or-mcp-inbound-lists-negotiation-decided-as-a-durable-host-ev",
|
|
33613
|
+
"file": "v2-negotiation-decided-inbound.test.ts",
|
|
33614
|
+
"line": 134,
|
|
33615
|
+
"title": "a host serving A2A or MCP inbound lists negotiation.decided as a durable host-event type",
|
|
33616
|
+
"explicitId": "openwop.requirement.0242.inbound.listed",
|
|
33617
|
+
"citations": [
|
|
33618
|
+
{
|
|
33619
|
+
"section": "interop.md §The audit event",
|
|
33620
|
+
"requirement": null,
|
|
33621
|
+
"interpolated": true
|
|
33622
|
+
}
|
|
33623
|
+
]
|
|
33624
|
+
},
|
|
33625
|
+
{
|
|
33626
|
+
"id": "openwop.it.v2-negotiation-decided-inbound.an-inbound-a2a-exchange-at-preferredversion-is-recorded-accepted-with-requested",
|
|
33627
|
+
"file": "v2-negotiation-decided-inbound.test.ts",
|
|
33628
|
+
"line": 143,
|
|
33629
|
+
"title": "an inbound A2A exchange at preferredVersion is recorded accepted, with requested",
|
|
33630
|
+
"explicitId": null,
|
|
33631
|
+
"citations": []
|
|
33632
|
+
},
|
|
33633
|
+
{
|
|
33634
|
+
"id": "openwop.it.v2-negotiation-decided-inbound.an-inbound-a2a-exchange-below-minimumversion-is-recorded-refused-with-requested",
|
|
33635
|
+
"file": "v2-negotiation-decided-inbound.test.ts",
|
|
33636
|
+
"line": 146,
|
|
33637
|
+
"title": "an inbound A2A exchange below minimumVersion is recorded refused, with requested",
|
|
33638
|
+
"explicitId": null,
|
|
33639
|
+
"citations": []
|
|
33640
|
+
},
|
|
33641
|
+
{
|
|
33642
|
+
"id": "openwop.it.v2-negotiation-decided-inbound.an-inbound-mcp-exchange-at-preferredversion-is-recorded-accepted-with-requested",
|
|
33643
|
+
"file": "v2-negotiation-decided-inbound.test.ts",
|
|
33644
|
+
"line": 149,
|
|
33645
|
+
"title": "an inbound MCP exchange at preferredVersion is recorded accepted, with requested",
|
|
33646
|
+
"explicitId": null,
|
|
33647
|
+
"citations": []
|
|
33648
|
+
},
|
|
33649
|
+
{
|
|
33650
|
+
"id": "openwop.it.v2-negotiation-decided-inbound.an-inbound-mcp-exchange-below-minimumrevision-is-recorded-refused-with-requested",
|
|
33651
|
+
"file": "v2-negotiation-decided-inbound.test.ts",
|
|
33652
|
+
"line": 152,
|
|
33653
|
+
"title": "an inbound MCP exchange below minimumRevision is recorded refused, with requested",
|
|
33654
|
+
"explicitId": null,
|
|
33655
|
+
"citations": []
|
|
33656
|
+
},
|
|
33595
33657
|
{
|
|
33596
33658
|
"id": "openwop.it.v2-no-transport-advertisement.the-v2-root-carries-no-supportedtransports-and-no-grpc-block",
|
|
33597
33659
|
"file": "v2-no-transport-advertisement.test.ts",
|
|
@@ -37849,27 +37911,10 @@
|
|
|
37849
37911
|
}
|
|
37850
37912
|
]
|
|
37851
37913
|
},
|
|
37852
|
-
{
|
|
37853
|
-
"id": "openwop.it.v2-v1-signed-webhook-accepted.the-webhooks-facet-lists-scheme-v1-the-scheme-a-v1-signed-delivery-is-verified-u",
|
|
37854
|
-
"file": "v2-v1-signed-webhook-accepted.test.ts",
|
|
37855
|
-
"line": 79,
|
|
37856
|
-
"title": "the webhooks facet lists scheme \"v1\" — the scheme a v1-signed delivery is verified under",
|
|
37857
|
-
"explicitId": "openwop.requirement.0176.v1-signed-webhook-accepted.facet",
|
|
37858
|
-
"citations": [
|
|
37859
|
-
{
|
|
37860
|
-
"section": "spec/v2/core/webhooks.md §Surfaces",
|
|
37861
|
-
"requirement": "the webhooks facet is { signatureAlgorithms[] }"
|
|
37862
|
-
},
|
|
37863
|
-
{
|
|
37864
|
-
"section": "spec/v2/core/webhooks.md §Surfaces",
|
|
37865
|
-
"requirement": "signatureAlgorithms MUST list \"v1\" — the cut adds no signature scheme (RFC 0176 §D.2)"
|
|
37866
|
-
}
|
|
37867
|
-
]
|
|
37868
|
-
},
|
|
37869
37914
|
{
|
|
37870
37915
|
"id": "openwop.it.v2-v1-signed-webhook-accepted.the-host-s-v2-receiver-path-accepts-an-x-openwop-only-scheme-v1-delivery-and-ref",
|
|
37871
37916
|
"file": "v2-v1-signed-webhook-accepted.test.ts",
|
|
37872
|
-
"line":
|
|
37917
|
+
"line": 81,
|
|
37873
37918
|
"title": "the host's v2 receiver path accepts an X-openwop-*-only scheme-v1 delivery and refuses a tampered one",
|
|
37874
37919
|
"explicitId": "openwop.requirement.0176.v1-signed-webhook-accepted",
|
|
37875
37920
|
"citations": [
|
|
@@ -38622,6 +38667,23 @@
|
|
|
38622
38667
|
}
|
|
38623
38668
|
]
|
|
38624
38669
|
},
|
|
38670
|
+
{
|
|
38671
|
+
"id": "openwop.it.v2-webhooks-v1-scheme-listed.the-webhooks-facet-lists-scheme-v1-the-scheme-a-v1-signed-delivery-is-verified-u",
|
|
38672
|
+
"file": "v2-webhooks-v1-scheme-listed.test.ts",
|
|
38673
|
+
"line": 24,
|
|
38674
|
+
"title": "the webhooks facet lists scheme \"v1\" — the scheme a v1-signed delivery is verified under",
|
|
38675
|
+
"explicitId": "openwop.requirement.0176.v1-signed-webhook-accepted.facet",
|
|
38676
|
+
"citations": [
|
|
38677
|
+
{
|
|
38678
|
+
"section": "spec/v2/core/webhooks.md §Surfaces",
|
|
38679
|
+
"requirement": "the webhooks facet is { signatureAlgorithms[] }"
|
|
38680
|
+
},
|
|
38681
|
+
{
|
|
38682
|
+
"section": "spec/v2/core/webhooks.md §Surfaces",
|
|
38683
|
+
"requirement": "signatureAlgorithms MUST list \"v1\" — the cut adds no signature scheme (RFC 0176 §D.2)"
|
|
38684
|
+
}
|
|
38685
|
+
]
|
|
38686
|
+
},
|
|
38625
38687
|
{
|
|
38626
38688
|
"id": "openwop.it.v2-well-known-one-resource.a-header-less-get-and-an-openwop-version-2-0-get-are-two-representations-of-one",
|
|
38627
38689
|
"file": "v2-well-known-one-resource.test.ts",
|
|
@@ -44699,6 +44761,30 @@
|
|
|
44699
44761
|
}
|
|
44700
44762
|
]
|
|
44701
44763
|
},
|
|
44764
|
+
{
|
|
44765
|
+
"id": "openwop.it.seams-floor-legs-gated.every-leg-of-a-seams-profile-floor-file-reaches-a-seams-gate-before-its-first-as",
|
|
44766
|
+
"file": "seams-floor-legs-gated.test.ts",
|
|
44767
|
+
"line": 84,
|
|
44768
|
+
"title": "every leg of a seams-profile floor file reaches a seams gate before its first assertion",
|
|
44769
|
+
"explicitId": "openwop.it.seams-floor-legs-gated.every-leg-of-a-seams-profile-floor-file-reaches-a-seams-gate-before-its-first-a",
|
|
44770
|
+
"citations": [
|
|
44771
|
+
{
|
|
44772
|
+
"section": "spec/v2/profiles.json",
|
|
44773
|
+
"requirement": null,
|
|
44774
|
+
"interpolated": true
|
|
44775
|
+
},
|
|
44776
|
+
{
|
|
44777
|
+
"section": "spec/v2/profiles.json",
|
|
44778
|
+
"requirement": null,
|
|
44779
|
+
"interpolated": true
|
|
44780
|
+
},
|
|
44781
|
+
{
|
|
44782
|
+
"section": "spec/v2/profiles.json",
|
|
44783
|
+
"requirement": null,
|
|
44784
|
+
"interpolated": true
|
|
44785
|
+
}
|
|
44786
|
+
]
|
|
44787
|
+
},
|
|
44702
44788
|
{
|
|
44703
44789
|
"id": "openwop.it.semantic-digest-v2.the-digest-recipe-section-is-found-at-all",
|
|
44704
44790
|
"file": "semantic-digest-v2.test.ts",
|
package/scenario-majors.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$comment": "GENERATED by conformance/scripts/generate-scenario-majors.mjs (RFC 0168 §D.3). Do not edit; add a file to BOTH_MAJORS in the generator to target both majors.",
|
|
3
3
|
"counts": {
|
|
4
|
-
"files":
|
|
4
|
+
"files": 653,
|
|
5
5
|
"v1": 455,
|
|
6
|
-
"v2":
|
|
6
|
+
"v2": 213
|
|
7
7
|
},
|
|
8
8
|
"majors": {
|
|
9
9
|
"a2a-1-0-agent-card.test.ts": [
|
|
@@ -1431,6 +1431,9 @@
|
|
|
1431
1431
|
"v2-effect-identity-business-key.test.ts": [
|
|
1432
1432
|
2
|
|
1433
1433
|
],
|
|
1434
|
+
"v2-effect-ledger-keying.test.ts": [
|
|
1435
|
+
2
|
|
1436
|
+
],
|
|
1434
1437
|
"v2-effect-seam-manifest.test.ts": [
|
|
1435
1438
|
2
|
|
1436
1439
|
],
|
|
@@ -1578,6 +1581,9 @@
|
|
|
1578
1581
|
"v2-negotiation-decided-emitted.test.ts": [
|
|
1579
1582
|
2
|
|
1580
1583
|
],
|
|
1584
|
+
"v2-negotiation-decided-inbound.test.ts": [
|
|
1585
|
+
2
|
|
1586
|
+
],
|
|
1581
1587
|
"v2-no-transport-advertisement.test.ts": [
|
|
1582
1588
|
2
|
|
1583
1589
|
],
|
|
@@ -1854,6 +1860,9 @@
|
|
|
1854
1860
|
"v2-webhook-unregister-stops-delivery.test.ts": [
|
|
1855
1861
|
2
|
|
1856
1862
|
],
|
|
1863
|
+
"v2-webhooks-v1-scheme-listed.test.ts": [
|
|
1864
|
+
2
|
|
1865
|
+
],
|
|
1857
1866
|
"v2-well-known-one-resource.test.ts": [
|
|
1858
1867
|
2
|
|
1859
1868
|
],
|
|
@@ -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.
|
|
5
|
-
"corpusTag": "v2.
|
|
4
|
+
"version": "2.46.0",
|
|
5
|
+
"corpusTag": "v2.46.0",
|
|
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": "ac6de5303872664b78ff419c035915593e01599e02835e777a0123de1baeb398",
|
|
11
11
|
"api/redocly.yaml": "b0604c89b2ca6d5076ec25725c539dad44a741a811fe524439ee6daef8baa09f",
|
|
12
|
-
"api/seams-v2.yaml": "
|
|
13
|
-
"api/v2/asyncapi.yaml": "
|
|
14
|
-
"api/v2/openapi.yaml": "
|
|
12
|
+
"api/seams-v2.yaml": "d9a148a5136c34759cf8b92330e3a5f82dba06b25ce7ca22330e94b2c616bdde",
|
|
13
|
+
"api/v2/asyncapi.yaml": "c742c8d76aac957c9f508f15145e6440e195b13130a8ee2669d0d37f8dd4eaae",
|
|
14
|
+
"api/v2/openapi.yaml": "ea5ada57301b530f95f7410280e85fe96e32b91b96031fdae22df5e1d6c6e65f",
|
|
15
15
|
"api/v2/redocly.yaml": "1e66b60e6118ad11a823bb620678be464d99dfe50a40e3e6f93ec9429b88b34c",
|
|
16
16
|
"schemas/README.md": "276fc1d51eb08e14e9127b9fd27761d7046ee33c12000f3a64a801322db8bf58",
|
|
17
17
|
"schemas/a2a-task-state.schema.json": "75d5049dea8bd873ff0e7546f1c60c8d36c219bec7084264360be54a8be30ae1",
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"schemas/v2/audit-verify-result.schema.json": "14af8e9283510f0a40e48a2059c929ee44e0fc9fa3cc66a95bfbe90b17c48297",
|
|
119
119
|
"schemas/v2/budget-policy.schema.json": "1de68095db0beb5c7a4be629de26e79f62ebbe748a88d46f36e768edfd1f0d68",
|
|
120
120
|
"schemas/v2/capabilities.schema.json": "d859a413ff463ec39acc32a9cb76f2e8c7419e45683d6b7f886861765a9c36c7",
|
|
121
|
-
"schemas/v2/certification-bundle.schema.json": "
|
|
121
|
+
"schemas/v2/certification-bundle.schema.json": "5cfa7fb5247160333e33a58b60d42bcd4e5269d8391d6a112d301e14828892ed",
|
|
122
122
|
"schemas/v2/channel-presence-payload.schema.json": "fc03df0c20cc12a25f7ee6a47503a4c5931d79fe3d5ff24815e8fd7c1bcb9a87",
|
|
123
123
|
"schemas/v2/channel-written-payload.schema.json": "ccecff3c71a3275ad8db035ac0e04db25e6f8d23cf091ddbcd5a60d1be1cbb6b",
|
|
124
124
|
"schemas/v2/chat-card-pack-manifest.schema.json": "92a57db2fd4b2463f14ef155fef8e3f18afc78960b646459dcf32efc79ff6bf5",
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
"schemas/v2/goal.schema.json": "ad104ed5a3866736b8fed9d7c0b23dc82af526b5bef4afe848f01fc3af2161e9",
|
|
153
153
|
"schemas/v2/heartbeat-evaluated.schema.json": "c897b0792fd518d6e12879851027252af1529f5e420c3eaf434ad7af284ecc05",
|
|
154
154
|
"schemas/v2/heartbeat-state-changed.schema.json": "eb68d0082aa996650e3a6b8ccf32457f959cebc7e6728cc7c331b9d171a4bef6",
|
|
155
|
-
"schemas/v2/host-event.schema.json": "
|
|
155
|
+
"schemas/v2/host-event.schema.json": "8ecb5ae218ea6ba71b2aa52905c7851d125d6ca3c5108718739e84b3d6041d02",
|
|
156
156
|
"schemas/v2/ids.schema.json": "65cfaa193be0ca9cf48af39c18c553979e3ec1f7fc04509aaa513b322d7b7e4a",
|
|
157
157
|
"schemas/v2/localized-content-language-settings.schema.json": "3c8350a178037a460f5d87466ccaf9ed5fe3d41497786d2504cc66e42152c8cc",
|
|
158
158
|
"schemas/v2/localized-content-page-response.schema.json": "ef48329749758afb21e4d3cbc3f017abb911f75726819457f35b9f1390332c75",
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
"schemas/v2/residency.schema.json": "3fd23c9732beb140504e81560fc426eb6764d547e56da5fb92c5a5c7bf04db3a",
|
|
175
175
|
"schemas/v2/run-ancestry-response.schema.json": "334c17f2062dea62726ca1d07b8be3f169cdc422af843c1def5fb317039814c9",
|
|
176
176
|
"schemas/v2/run-diff-response.schema.json": "8bdb2045c274580038bd74781f7d062f5049839797c164a89de4ed89edc53a74",
|
|
177
|
-
"schemas/v2/run-event-payloads.schema.json": "
|
|
177
|
+
"schemas/v2/run-event-payloads.schema.json": "ff80204f4a9a55da482d8c7d54d6dbb8682e13fff155d4fc26fa5b7fa0790b83",
|
|
178
178
|
"schemas/v2/run-event.schema.json": "2f0d7416bd376c56affe97b6b2b49981532e8e9ff45c0a162cf806c78b3e7fb7",
|
|
179
179
|
"schemas/v2/run-list-response.schema.json": "c2dbc34768dcf64528914a213aa3cb55952e8e3e90a64b04a9423b2a19749d38",
|
|
180
180
|
"schemas/v2/run-options.schema.json": "f0e9f494d80086c2ed2cf9fe87df54e5b4e66601699c4a1089f4edbc7ba58867",
|
|
@@ -208,14 +208,14 @@
|
|
|
208
208
|
"schemas/workspace-file.schema.json": "464de85c2a068243084ee9c1d969bc7cd5d8f7948574e58450d6493c38a0e1e4",
|
|
209
209
|
"spec/v1/alias-detectors.json": "22444c22bb88c568339ef512553f9fc38146e22b566d11ab8608f655d688d19c",
|
|
210
210
|
"spec/v1/capability-declaration-classes.json": "e7729aed5c4b4e1dd02abab0530f14cc95f5d4070fe51fb139e7f5cccefa00c6",
|
|
211
|
-
"spec/v1/core-standard-manifest.json": "
|
|
211
|
+
"spec/v1/core-standard-manifest.json": "1ecf2f7820fe47528c5c77bbe0d44ede95ef27cb1a8de209bb5104a4186c3722",
|
|
212
212
|
"spec/v1/deprecations.json": "e723bc11d7272c71789ad1303bb7f21809a8a024abf57594f9d5c35dc199ece9",
|
|
213
213
|
"spec/v1/deprecations.schema.json": "3e393c405d2a41b467d8c5e3c468549078df1ce6a6d2588fc488097b95d9b55b",
|
|
214
214
|
"spec/v1/end-of-support.json": "35f0bf3b70fe78b16e2a2fd81a153fc27e703f6c16376c6fe7cdf1f4f2c4e6d4",
|
|
215
215
|
"spec/v1/event-codemap.json": "3da60d884157793a360da532a9fcbbfb5285636db325a74cec94b34622186d97",
|
|
216
216
|
"spec/v1/event-codemap.schema.json": "d05933b2e88103aff51a2f774df97b9bda065e0fc88dbd9b114cc47a32189174",
|
|
217
217
|
"spec/v1/extensions.json": "79a60754aa16cbdbdb604f8e5c00038af535a1690a4d07bd5ff7c38f0256a7bc",
|
|
218
|
-
"spec/v1/gaps.json": "
|
|
218
|
+
"spec/v1/gaps.json": "7f26aee1bbae95945d29f4e2ecabb672c6833bc42f6f45f71e4880b7d09c130a",
|
|
219
219
|
"spec/v1/gaps.schema.json": "8fd83259f556553c9df0f53e7a82ca8c2a4771d471197f69b4e2ae0ceeacfd66",
|
|
220
220
|
"spec/v1/migrations.json": "4c50760be70cb644d02427bcaf5749606700edf4513f423903cf3b1d12f5c300",
|
|
221
221
|
"spec/v1/migrations.schema.json": "886779aa6c22e646db097f5df210adb018a4dd14a7b815465a18c8a7056c8f72",
|
|
@@ -228,7 +228,7 @@
|
|
|
228
228
|
"spec/v2/core/connection-packs.md": "c80f95bd6a03698f35c72cdb2b46bd973f49203bbd786c26760e35fa86e6f23d",
|
|
229
229
|
"spec/v2/core/conversation.md": "8d6abedf6af408a74577753bfca24719d318e2632e10b45ff5d63bdcf31a8aaa",
|
|
230
230
|
"spec/v2/core/errors.md": "e48838701b86bbfe0ffee77b18a8ffc4e5f04724b4318507d9771da653f8da0f",
|
|
231
|
-
"spec/v2/core/events.md": "
|
|
231
|
+
"spec/v2/core/events.md": "370621629c2439747f2e4ddab4780eea4345354f79e5098739d66823873f3105",
|
|
232
232
|
"spec/v2/core/execution.md": "8a0c9db1bbfb97c008ab9328b7333c1cc3318196e78bfbefb49e781bdf4f9d44",
|
|
233
233
|
"spec/v2/core/form-content-packs.md": "02931227899676fd4581a27017be2a6c4953904717be9b81c29d12f87ab3917d",
|
|
234
234
|
"spec/v2/core/headers.md": "f69fe81e4a3ad21879bb85948660c16860eb05bf152928c31aa4898f6d7d1887",
|
|
@@ -236,7 +236,7 @@
|
|
|
236
236
|
"spec/v2/core/i18n.md": "882904b7d59f992ab1e5f7346167161a54cf665b8fee47e64a3862cf9133a580",
|
|
237
237
|
"spec/v2/core/idempotency.md": "adbd317a6ebb57c2759c076297b31f67def9e391576bccd0bbea787b13e85872",
|
|
238
238
|
"spec/v2/core/identity.md": "02656ffa413b5546342b8580ae928a74e621460746df74d7db50ff4df41d2310",
|
|
239
|
-
"spec/v2/core/interop.md": "
|
|
239
|
+
"spec/v2/core/interop.md": "6ec8259117bdb387b9323ca22c707b3b8571c00034e461c4ce79f4070c4d6b4a",
|
|
240
240
|
"spec/v2/core/interrupt.md": "10f15dfe30baa0fc748aea0a067f9b271bea316fde6b598d78f77edc296f698a",
|
|
241
241
|
"spec/v2/core/node-pack-runtimes.md": "e1088cb69b8c3c67256c494063328916c2980ab1aa97a7063de25bab82fdb1e5",
|
|
242
242
|
"spec/v2/core/oauth.md": "c069ae4f9aae2eafe14c07c0bf709aa7ade0dcc821973d740400d49d901f7061",
|
|
@@ -254,7 +254,7 @@
|
|
|
254
254
|
"spec/v2/core/workflow-chain-packs.md": "fdce7a8477e269950a2bac05ee6eddbd66eb0b670b464d00054f7196ec05d29c",
|
|
255
255
|
"spec/v2/corrections.json": "3a8d93e33865b692d26a3b6bfd3819766e206b2e0c2a69669baa4bf833d05a49",
|
|
256
256
|
"spec/v2/corrections.schema.json": "46bbffb954d13bd9995aebc912ceeb2544f7064331abf25fd6ab85c81a5cec94",
|
|
257
|
-
"spec/v2/declaration.json": "
|
|
257
|
+
"spec/v2/declaration.json": "22530d99c92b9e0d3ae0dce25507f4cc6350486d560ad8cc01acda054e9face3",
|
|
258
258
|
"spec/v2/declaration.schema.json": "ef951633e4070899f64828f5cf1b5f4870270a0360f81dbb49b5b4d6cd407550",
|
|
259
259
|
"spec/v2/eos-override.json": "4c72d2f6a658943b01c1de1643cf294642091933af7832f38ee5495df684cb2d",
|
|
260
260
|
"spec/v2/errors.json": "1f0e29455edbd22e28f67f221766209c3c55ac4987beb77993b5702dd7cae131",
|
|
@@ -312,10 +312,10 @@
|
|
|
312
312
|
"spec/v2/migrations.schema.json": "b91ade6320ad1b1185c9495b9424f3aa63438ed8e412c45171c227d82c0afd86",
|
|
313
313
|
"spec/v2/path-manifest.json": "7b5679a4dad98c80d855361d88a98c8a4e045af15e310862a05b285b815dc9fc",
|
|
314
314
|
"spec/v2/peer-dependency-aliases.json": "d10299280abee08258502925bc327293ee413e0108cd6e6ec75ff6110653308d",
|
|
315
|
-
"spec/v2/profiles.json": "
|
|
316
|
-
"spec/v2/release.json": "
|
|
315
|
+
"spec/v2/profiles.json": "3d84d7712e93d1e823e362615d5f4aaba0789ea4e044b3774965876fbb8829a7",
|
|
316
|
+
"spec/v2/release.json": "418d1ab00135f629e6e6e4b0dae213dc85dfc5418bdf3177f91d8508ad4f90cb",
|
|
317
317
|
"spec/v2/retention-floors.json": "eaf3722d95c79947af1d4269ef85117e126518c588cfcf1a2b21b97269f51624",
|
|
318
|
-
"spec/v2/surface-baseline.json": "
|
|
318
|
+
"spec/v2/surface-baseline.json": "d17b41008a6572efd3b6d1178aa630be645b6cd135032814bcd4b618ad980811"
|
|
319
319
|
},
|
|
320
|
-
"corpusCommit": "
|
|
320
|
+
"corpusCommit": "5d0b99eeb2f8d2682516c73bc7dda9c18a0f1aee"
|
|
321
321
|
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RFC 0242 — judging a `negotiation.decided` record (`spec/v2/core/interop.md`
|
|
3
|
+
* §The audit event).
|
|
4
|
+
*
|
|
5
|
+
* Two facts the record must carry beyond RFC 0175 §D.3:
|
|
6
|
+
* - `requested`: the version the requesting side named (§A.2). Outbound the
|
|
7
|
+
* host is the requester, and the suite's fake peer saw what it asked for;
|
|
8
|
+
* inbound the suite is the requester and knows what it named.
|
|
9
|
+
* - where it lands: a negotiation with no run is a durable host event (§B.2),
|
|
10
|
+
* listed in `hostEvents.types[]` whenever an inbound surface is advertised
|
|
11
|
+
* (§B.3).
|
|
12
|
+
*
|
|
13
|
+
* Pure functions only, so `negotiation-record.test.ts` can prove each judge
|
|
14
|
+
* fails on the defect it exists to catch.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export interface Finding { readonly ok: boolean; readonly message: string }
|
|
18
|
+
|
|
19
|
+
export const EVENT = 'negotiation.decided';
|
|
20
|
+
|
|
21
|
+
interface Invocation { readonly headers: Readonly<Record<string, string>>; readonly params?: unknown }
|
|
22
|
+
|
|
23
|
+
const META_V = 'io.modelcontextprotocol/protocolVersion';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The version the host asked a suite peer for, read from what the peer
|
|
27
|
+
* received: A2A's `A2A-Version` header; MCP's `MCP-Protocol-Version` header,
|
|
28
|
+
* else the `_meta` protocol version, else legacy `initialize`'s
|
|
29
|
+
* `protocolVersion`. `null` when the host named none, in which case §A.2 does
|
|
30
|
+
* not require `requested`.
|
|
31
|
+
*/
|
|
32
|
+
export function askedVersion(protocol: 'a2a' | 'mcp', invocations: readonly Invocation[]): string | null {
|
|
33
|
+
for (const inv of invocations) {
|
|
34
|
+
if (protocol === 'a2a') {
|
|
35
|
+
const v = inv.headers['a2a-version'];
|
|
36
|
+
if (typeof v === 'string' && v.length > 0) return v;
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
const h = inv.headers['mcp-protocol-version'];
|
|
40
|
+
if (typeof h === 'string' && h.length > 0) return h;
|
|
41
|
+
const p = (inv.params ?? {}) as Record<string, unknown>;
|
|
42
|
+
const meta = (p['_meta'] ?? {}) as Record<string, unknown>;
|
|
43
|
+
if (typeof meta[META_V] === 'string') return meta[META_V] as string;
|
|
44
|
+
if (typeof p['protocolVersion'] === 'string') return p['protocolVersion'] as string;
|
|
45
|
+
}
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** §A.2: `requested` is present and equals what was named. */
|
|
50
|
+
export function judgeRequested(payload: Readonly<Record<string, unknown>>, named: string): Finding {
|
|
51
|
+
const got = payload['requested'];
|
|
52
|
+
if (typeof got !== 'string') return { ok: false, message: `${EVENT} MUST carry requested when a version was named (named ${named}; the record has none) — RFC 0242 §A.2` };
|
|
53
|
+
return got === named
|
|
54
|
+
? { ok: true, message: 'requested matches the named version' }
|
|
55
|
+
: { ok: false, message: `${EVENT}.requested MUST equal the version the requesting side named: named ${named}, recorded ${got} — RFC 0242 §A.2` };
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** Whether discovery advertises an inbound A2A or MCP surface (§B.3's condition). */
|
|
59
|
+
export function inboundServed(doc: Readonly<Record<string, unknown>>): { a2a: boolean; mcp: boolean } {
|
|
60
|
+
const a2a = doc['a2a'] as Record<string, unknown> | undefined;
|
|
61
|
+
const mcp = doc['mcp'] as Record<string, unknown> | undefined;
|
|
62
|
+
const urls = Array.isArray(mcp?.['serverUrls']) ? (mcp!['serverUrls'] as unknown[]) : [];
|
|
63
|
+
return {
|
|
64
|
+
a2a: typeof a2a?.['agentCardUrl'] === 'string',
|
|
65
|
+
mcp: mcp !== undefined && (urls.length > 0 || mcp['serverMount'] !== undefined),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** §B.3: an inbound surface implies `{ type: negotiation.decided, delivery: durable }` in `hostEvents.types[]`. */
|
|
70
|
+
export function judgeListed(doc: Readonly<Record<string, unknown>>): Finding {
|
|
71
|
+
const served = inboundServed(doc);
|
|
72
|
+
const which = [served.a2a ? 'a2a.agentCardUrl' : null, served.mcp ? 'mcp.serverUrls/serverMount' : null].filter(Boolean).join(' and ');
|
|
73
|
+
const he = doc['hostEvents'] as Record<string, unknown> | undefined;
|
|
74
|
+
if (he === undefined) return { ok: false, message: `the host serves ${which} inbound, so it MUST advertise hostEvents listing ${EVENT} (durable) — RFC 0242 §B.3` };
|
|
75
|
+
const types = Array.isArray(he['types']) ? (he['types'] as Array<Record<string, unknown>>) : [];
|
|
76
|
+
const row = types.find((t) => t?.['type'] === EVENT);
|
|
77
|
+
if (!row) return { ok: false, message: `the host serves ${which} inbound, so hostEvents.types[] MUST list ${EVENT} — RFC 0242 §B.3` };
|
|
78
|
+
return row['delivery'] === 'durable'
|
|
79
|
+
? { ok: true, message: `${EVENT} listed durable` }
|
|
80
|
+
: { ok: false, message: `${EVENT} MUST be listed with delivery durable, not ${String(row['delivery'])} — RFC 0242 §B.2` };
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* §B.2: the host event recording one inbound exchange. `envelopes` are the
|
|
85
|
+
* parsed `data:` of every `negotiation.decided` frame seen while the exchange
|
|
86
|
+
* ran; the judge picks the one whose `requested` is the version the suite
|
|
87
|
+
* named, so a concurrent exchange cannot satisfy it.
|
|
88
|
+
*/
|
|
89
|
+
export function judgeInboundRecord(
|
|
90
|
+
envelopes: readonly Record<string, unknown>[],
|
|
91
|
+
expect: { protocol: 'a2a' | 'mcp'; named: string; outcome: 'accepted' | 'refused' },
|
|
92
|
+
): Finding[] {
|
|
93
|
+
const mine = envelopes.filter((e) => ((e['payload'] ?? {}) as Record<string, unknown>)['requested'] === expect.named
|
|
94
|
+
&& ((e['payload'] ?? {}) as Record<string, unknown>)['protocol'] === expect.protocol);
|
|
95
|
+
if (mine.length === 0) {
|
|
96
|
+
return [{ ok: false, message: `an inbound ${expect.protocol} exchange naming ${expect.named} MUST leave a ${EVENT} host event on /host/events with requested ${expect.named}; ${envelopes.length} ${EVENT} frame(s) seen, none matching — RFC 0242 §B.2, §A.2` }];
|
|
97
|
+
}
|
|
98
|
+
const e = mine[mine.length - 1]!;
|
|
99
|
+
const p = (e['payload'] ?? {}) as Record<string, unknown>;
|
|
100
|
+
const out: Finding[] = [];
|
|
101
|
+
out.push(e['delivery'] === 'durable' ? { ok: true, message: 'durable' } : { ok: false, message: `the host event MUST be durable, got ${String(e['delivery'])} — RFC 0242 §B.2` });
|
|
102
|
+
out.push(!('runId' in e) && !('sequence' in e) ? { ok: true, message: 'runless' } : { ok: false, message: 'a host event carries no runId or sequence — events.md §Host events' });
|
|
103
|
+
out.push(p['outcome'] === expect.outcome ? { ok: true, message: 'outcome' } : { ok: false, message: `the exchange was ${expect.outcome === 'accepted' ? 'served' : 'refused'}, so the recorded outcome MUST be ${expect.outcome}, got ${String(p['outcome'])}` });
|
|
104
|
+
if (expect.outcome === 'accepted') {
|
|
105
|
+
out.push(typeof p['version'] === 'string' ? { ok: true, message: 'version' } : { ok: false, message: 'an accepted record names the version used — interop.md §The audit event' });
|
|
106
|
+
}
|
|
107
|
+
return out;
|
|
108
|
+
}
|
|
@@ -10,20 +10,19 @@
|
|
|
10
10
|
* state, at }`, content-free of provider payloads (RFC 0150 §B; RFC 0173 §B row
|
|
11
11
|
* C6.7; `spec/v2/core/security-defaults.md` §Layer-2 effect identity).
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* catalogued, so that leg records `blocked` naming it.
|
|
13
|
+
* One leg: the "same provider key across two transport retries" leg, driven
|
|
14
|
+
* through the seams profile (`forceEffectTransportRetry`, RFC 0173 §D.2 G4).
|
|
15
|
+
* This file is a floor of `openwop-conformance-seams-v2`, so every leg in it
|
|
16
|
+
* MUST be seam-driven (`coherence/seams-floor-legs-gated.test.ts`). The
|
|
17
|
+
* seam-free ledger-read leg lives in `v2-effect-ledger-keying.test.ts` since
|
|
18
|
+
* 2.45.30: here it passed the floor on hosts that mount no seams.
|
|
20
19
|
*
|
|
21
20
|
* @see spec/v2/core/security-defaults.md §Layer-2 effect identity
|
|
22
21
|
*/
|
|
23
22
|
|
|
24
23
|
import { describe, it, expect } from 'vitest';
|
|
25
24
|
import { driver } from '../lib/driver.js';
|
|
26
|
-
import { v2Discovery, gateFamily
|
|
25
|
+
import { v2Discovery, gateFamily } from '../lib/v2.js';
|
|
27
26
|
import { seamsProfileAdvertised, SEAMS_PREFIX } from '../lib/seams.js';
|
|
28
27
|
import { softSkip, blockedDespiteAssertions } from '../lib/soft-skip.js';
|
|
29
28
|
import { startEffectReceiver } from '../lib/effect-receiver.js';
|
|
@@ -38,85 +37,14 @@ import { req } from '../lib/requirement-ids.js';
|
|
|
38
37
|
*/
|
|
39
38
|
export const REQUIRES_HOST_CALLBACK = 'the host makes the retried outbound effect call to the suite-owned effect receiver (OPENWOP_WEBHOOK_RECEIVER_PORT)';
|
|
40
39
|
|
|
41
|
-
const FIXTURE = 'conformance-noop';
|
|
42
40
|
const KEYING = ['business-identity', 'activity-recipe'];
|
|
43
|
-
const TERMINAL = new Set(['completed', 'failed', 'cancelled']);
|
|
44
41
|
|
|
45
42
|
async function discovery(): Promise<Record<string, unknown> | null> {
|
|
46
43
|
try { return await v2Discovery(); } catch { return null; }
|
|
47
44
|
}
|
|
48
45
|
|
|
49
|
-
async function waitTerminal(runId: string, timeoutMs: number): Promise<void> {
|
|
50
|
-
const deadline = Date.now() + timeoutMs;
|
|
51
|
-
while (Date.now() < deadline) {
|
|
52
|
-
const res = await driver.get(`/runs/${encodeURIComponent(runId)}`);
|
|
53
|
-
if (res.status === 200 && TERMINAL.has(String((res.json as { status?: unknown } | null)?.status))) return;
|
|
54
|
-
await new Promise((r) => setTimeout(r, 250));
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
46
|
|
|
58
47
|
describe('RFC 0173 §B — effect-identity-business-key (gated on idempotency)', () => {
|
|
59
|
-
it('GET /runs/{runId}/effects validates and every row is keyed on business identity or the activity recipe', async () => {
|
|
60
|
-
const doc = await discovery();
|
|
61
|
-
if (!doc) return softSkip('blocked', 'discovery unreachable');
|
|
62
|
-
if (!(await gateFamily('idempotency'))) return softSkip('inapplicable', 'idempotency family not advertised — no Layer-2 obligation (gate recorded under openwop.family.idempotency)');
|
|
63
|
-
const fixtures = Array.isArray(doc['fixtures']) ? (doc['fixtures'] as unknown[]) : [];
|
|
64
|
-
if (!fixtures.includes(FIXTURE)) return softSkip('inapplicable', `${FIXTURE} fixture not advertised — no run to read`);
|
|
65
|
-
|
|
66
|
-
// Unfailable-leg audit (2026-09-26): the noop fixture issues no effects, so
|
|
67
|
-
// the per-row loop asserted nothing on any host, and the trailing
|
|
68
|
-
// `softSkip('inapplicable')` (called without `return`, after four passing
|
|
69
|
-
// setup asserts) recorded `executed-pass` with a `partial-witness:` detail —
|
|
70
|
-
// a host that mis-keyed every effect passed this row. Now no expect passes
|
|
71
|
-
// before the empty-ledger check: a failing setup read still fails, and an
|
|
72
|
-
// empty but well-formed ledger returns `inapplicable` with zero assertions.
|
|
73
|
-
const create = await driver.post('/runs', { workflowId: FIXTURE });
|
|
74
|
-
if (create.status !== 201) {
|
|
75
|
-
expect(create.status, req('openwop.requirement.0173.effect-identity-business-key', 'runs.md §Create', 'POST /runs MUST answer 201 for the noop fixture')).toBe(201);
|
|
76
|
-
}
|
|
77
|
-
const runId = (create.json as { runId: string }).runId;
|
|
78
|
-
await waitTerminal(runId, 10_000);
|
|
79
|
-
|
|
80
|
-
const res = await driver.get(`/runs/${encodeURIComponent(runId)}/effects`);
|
|
81
|
-
const check = v2Validator('effect-ledger-projection')(res.json);
|
|
82
|
-
const body = res.json as { runId?: unknown; effects?: Array<{ effectId?: unknown; keying?: unknown; providerKey?: unknown }> } | null;
|
|
83
|
-
const effects = body?.effects ?? [];
|
|
84
|
-
if (res.status === 200 && check.ok && body?.runId === runId && effects.length === 0) {
|
|
85
|
-
// partial-witness-ok: no assertion has passed at runtime. The only earlier
|
|
86
|
-
// expect runs solely when the create is not 201, and then it throws, so this
|
|
87
|
-
// skip is a zero-assertion `inapplicable` (the gate reads source order).
|
|
88
|
-
return softSkip('inapplicable', 'the noop fixture issued no external effect — the ledger read is well-formed but the per-row keying leg had no rows (an effect-issuing fixture would exercise it)');
|
|
89
|
-
}
|
|
90
|
-
expect(
|
|
91
|
-
res.status,
|
|
92
|
-
req('openwop.requirement.0173.effect-identity-business-key', 'security-defaults.md §Layer-2 effect identity', 'a host advertising `idempotency` MUST serve GET /runs/{runId}/effects with 200 (RFC 0173 §B)'),
|
|
93
|
-
).toBe(200);
|
|
94
|
-
expect(
|
|
95
|
-
check.ok,
|
|
96
|
-
req('openwop.requirement.0173.effect-identity-business-key', 'effect-ledger-projection.schema.json', `the ledger projection MUST validate: ${check.errors}`),
|
|
97
|
-
).toBe(true);
|
|
98
|
-
expect(body?.runId, req('openwop.requirement.0173.effect-identity-business-key', 'effect-ledger-projection.schema.json runId', 'runId MUST echo the run read')).toBe(runId);
|
|
99
|
-
const ids = new Set<string>();
|
|
100
|
-
for (const e of effects) {
|
|
101
|
-
expect(
|
|
102
|
-
KEYING,
|
|
103
|
-
req('openwop.requirement.0173.effect-identity-business-key', 'security-defaults.md §Layer-2 effect identity', `keying MUST be business-identity or activity-recipe (the documented fallback) — effect ${String(e.effectId)} declares ${String(e.keying)}`),
|
|
104
|
-
).toContain(e.keying);
|
|
105
|
-
// One logical effect id per effect: a duplicate row is a re-assignment.
|
|
106
|
-
expect(
|
|
107
|
-
ids.has(String(e.effectId)),
|
|
108
|
-
req('openwop.requirement.0173.effect-identity-business-key', 'RFC 0150 §B', `effectId ${String(e.effectId)} MUST be assigned once per effect (duplicate ledger row)`),
|
|
109
|
-
).toBe(false);
|
|
110
|
-
ids.add(String(e.effectId));
|
|
111
|
-
if (typeof e.providerKey === 'string') {
|
|
112
|
-
expect(
|
|
113
|
-
/(secret|bearer |sk-[a-z0-9]{8,})/i.test(e.providerKey),
|
|
114
|
-
req('openwop.requirement.0173.effect-identity-business-key', 'effect-ledger-projection.schema.json providerKey', 'providerKey is a redaction-safe identity, never credential material'),
|
|
115
|
-
).toBe(false);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
|
|
120
48
|
it('the same provider key is presented across two transport retries', async () => {
|
|
121
49
|
const doc = await discovery();
|
|
122
50
|
if (!doc) return softSkip('blocked', 'discovery unreachable');
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RFC 0173 §B — the effect ledger read and its keying (suite 2.45.30, target
|
|
3
|
+
* major 2; gated on `idempotency` and the `conformance-noop` fixture).
|
|
4
|
+
*
|
|
5
|
+
* A host that advertises `idempotency` serves `GET /runs/{runId}/effects`
|
|
6
|
+
* (`schemas/v2/effect-ledger-projection.schema.json`); every row's `keying` is
|
|
7
|
+
* `business-identity` or the documented fallback `activity-recipe`, each
|
|
8
|
+
* effect id is assigned once, and `providerKey` is never credential material
|
|
9
|
+
* (RFC 0150 §B; `spec/v2/core/security-defaults.md` §Layer-2 effect identity).
|
|
10
|
+
*
|
|
11
|
+
* This leg needs no seam. Until 2.45.30 it was the first leg of
|
|
12
|
+
* `v2-effect-identity-business-key`, a floor of `openwop-conformance-seams-v2`,
|
|
13
|
+
* and its pass certified that profile on hosts that mount no seams.
|
|
14
|
+
*
|
|
15
|
+
* @see spec/v2/core/security-defaults.md §Layer-2 effect identity
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { describe, it, expect } from 'vitest';
|
|
19
|
+
import { driver } from '../lib/driver.js';
|
|
20
|
+
import { v2Discovery, gateFamily, v2Validator } from '../lib/v2.js';
|
|
21
|
+
import { softSkip } from '../lib/soft-skip.js';
|
|
22
|
+
import { req } from '../lib/requirement-ids.js';
|
|
23
|
+
|
|
24
|
+
const FIXTURE = 'conformance-noop';
|
|
25
|
+
const KEYING = ['business-identity', 'activity-recipe'];
|
|
26
|
+
const TERMINAL = new Set(['completed', 'failed', 'cancelled']);
|
|
27
|
+
|
|
28
|
+
async function discovery(): Promise<Record<string, unknown> | null> {
|
|
29
|
+
try { return await v2Discovery(); } catch { return null; }
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
async function waitTerminal(runId: string, timeoutMs: number): Promise<void> {
|
|
33
|
+
const deadline = Date.now() + timeoutMs;
|
|
34
|
+
while (Date.now() < deadline) {
|
|
35
|
+
const res = await driver.get(`/runs/${encodeURIComponent(runId)}`);
|
|
36
|
+
if (res.status === 200 && TERMINAL.has(String((res.json as { status?: unknown } | null)?.status))) return;
|
|
37
|
+
await new Promise((r) => setTimeout(r, 250));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
describe('RFC 0173 §B — effect ledger keying (gated on idempotency)', () => {
|
|
42
|
+
it('GET /runs/{runId}/effects validates and every row is keyed on business identity or the activity recipe', async () => {
|
|
43
|
+
const doc = await discovery();
|
|
44
|
+
if (!doc) return softSkip('blocked', 'discovery unreachable');
|
|
45
|
+
if (!(await gateFamily('idempotency'))) return softSkip('inapplicable', 'idempotency family not advertised — no Layer-2 obligation (gate recorded under openwop.family.idempotency)');
|
|
46
|
+
const fixtures = Array.isArray(doc['fixtures']) ? (doc['fixtures'] as unknown[]) : [];
|
|
47
|
+
if (!fixtures.includes(FIXTURE)) return softSkip('inapplicable', `${FIXTURE} fixture not advertised — no run to read`);
|
|
48
|
+
|
|
49
|
+
// Unfailable-leg audit (2026-09-26): the noop fixture issues no effects, so
|
|
50
|
+
// the per-row loop asserted nothing on any host, and the trailing
|
|
51
|
+
// `softSkip('inapplicable')` (called without `return`, after four passing
|
|
52
|
+
// setup asserts) recorded `executed-pass` with a `partial-witness:` detail —
|
|
53
|
+
// a host that mis-keyed every effect passed this row. Now no expect passes
|
|
54
|
+
// before the empty-ledger check: a failing setup read still fails, and an
|
|
55
|
+
// empty but well-formed ledger returns `inapplicable` with zero assertions.
|
|
56
|
+
const create = await driver.post('/runs', { workflowId: FIXTURE });
|
|
57
|
+
if (create.status !== 201) {
|
|
58
|
+
expect(create.status, req('openwop.requirement.0173.effect-identity-business-key', 'runs.md §Create', 'POST /runs MUST answer 201 for the noop fixture')).toBe(201);
|
|
59
|
+
}
|
|
60
|
+
const runId = (create.json as { runId: string }).runId;
|
|
61
|
+
await waitTerminal(runId, 10_000);
|
|
62
|
+
|
|
63
|
+
const res = await driver.get(`/runs/${encodeURIComponent(runId)}/effects`);
|
|
64
|
+
const check = v2Validator('effect-ledger-projection')(res.json);
|
|
65
|
+
const body = res.json as { runId?: unknown; effects?: Array<{ effectId?: unknown; keying?: unknown; providerKey?: unknown }> } | null;
|
|
66
|
+
const effects = body?.effects ?? [];
|
|
67
|
+
if (res.status === 200 && check.ok && body?.runId === runId && effects.length === 0) {
|
|
68
|
+
// partial-witness-ok: no assertion has passed at runtime. The only earlier
|
|
69
|
+
// expect runs solely when the create is not 201, and then it throws, so this
|
|
70
|
+
// skip is a zero-assertion `inapplicable` (the gate reads source order).
|
|
71
|
+
return softSkip('inapplicable', 'the noop fixture issued no external effect — the ledger read is well-formed but the per-row keying leg had no rows (an effect-issuing fixture would exercise it)');
|
|
72
|
+
}
|
|
73
|
+
expect(
|
|
74
|
+
res.status,
|
|
75
|
+
req('openwop.requirement.0173.effect-identity-business-key', 'security-defaults.md §Layer-2 effect identity', 'a host advertising `idempotency` MUST serve GET /runs/{runId}/effects with 200 (RFC 0173 §B)'),
|
|
76
|
+
).toBe(200);
|
|
77
|
+
expect(
|
|
78
|
+
check.ok,
|
|
79
|
+
req('openwop.requirement.0173.effect-identity-business-key', 'effect-ledger-projection.schema.json', `the ledger projection MUST validate: ${check.errors}`),
|
|
80
|
+
).toBe(true);
|
|
81
|
+
expect(body?.runId, req('openwop.requirement.0173.effect-identity-business-key', 'effect-ledger-projection.schema.json runId', 'runId MUST echo the run read')).toBe(runId);
|
|
82
|
+
const ids = new Set<string>();
|
|
83
|
+
for (const e of effects) {
|
|
84
|
+
expect(
|
|
85
|
+
KEYING,
|
|
86
|
+
req('openwop.requirement.0173.effect-identity-business-key', 'security-defaults.md §Layer-2 effect identity', `keying MUST be business-identity or activity-recipe (the documented fallback) — effect ${String(e.effectId)} declares ${String(e.keying)}`),
|
|
87
|
+
).toContain(e.keying);
|
|
88
|
+
// One logical effect id per effect: a duplicate row is a re-assignment.
|
|
89
|
+
expect(
|
|
90
|
+
ids.has(String(e.effectId)),
|
|
91
|
+
req('openwop.requirement.0173.effect-identity-business-key', 'RFC 0150 §B', `effectId ${String(e.effectId)} MUST be assigned once per effect (duplicate ledger row)`),
|
|
92
|
+
).toBe(false);
|
|
93
|
+
ids.add(String(e.effectId));
|
|
94
|
+
if (typeof e.providerKey === 'string') {
|
|
95
|
+
expect(
|
|
96
|
+
/(secret|bearer |sk-[a-z0-9]{8,})/i.test(e.providerKey),
|
|
97
|
+
req('openwop.requirement.0173.effect-identity-business-key', 'effect-ledger-projection.schema.json providerKey', 'providerKey is a redaction-safe identity, never credential material'),
|
|
98
|
+
).toBe(false);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
});
|
|
@@ -22,6 +22,9 @@
|
|
|
22
22
|
* Callback-shaped (the host calls the suite's peer): unwitnessable when the
|
|
23
23
|
* host is in a separate network namespace — `../lib/host-callback.ts`.
|
|
24
24
|
*
|
|
25
|
+
* RFC 0242 §A.2 adds two legs: the record's `requested` equals the version the
|
|
26
|
+
* host's client named to the suite's peer (read from what the peer received).
|
|
27
|
+
*
|
|
25
28
|
* @see spec/v2/core/interop.md §Negotiation is a protocol
|
|
26
29
|
*/
|
|
27
30
|
|
|
@@ -39,6 +42,7 @@ import { getA2AFakePeer } from '../lib/a2a-fake-peer.js';
|
|
|
39
42
|
import { getMcpFakeServer } from '../lib/mcp-fake-server.js';
|
|
40
43
|
import { softSkip, seamAbsent } from '../lib/soft-skip.js';
|
|
41
44
|
import { req } from '../lib/requirement-ids.js';
|
|
45
|
+
import { askedVersion, judgeRequested } from '../lib/negotiation-record.js';
|
|
42
46
|
|
|
43
47
|
export const REQUIRES_HOST_CALLBACK = "the host's A2A/MCP client calls the suite's fake peer/server through the invoke seams; the negotiation.decided event is then read on the host's own log";
|
|
44
48
|
|
|
@@ -83,7 +87,10 @@ function originDigest(url: string): string {
|
|
|
83
87
|
return createHash('sha256').update(new URL(url).origin, 'utf8').digest('hex');
|
|
84
88
|
}
|
|
85
89
|
|
|
86
|
-
|
|
90
|
+
type Exchange = { driven: { status: number; body: Record<string, unknown> }; runId: string; decided: EventRow[]; peer: NonNullable<ReturnType<typeof getA2AFakePeer>> | NonNullable<ReturnType<typeof getMcpFakeServer>>; validate: NonNullable<ReturnType<typeof payloadValidator>> };
|
|
91
|
+
|
|
92
|
+
/** Gate, drive one exchange through the seam, and read the run's records; `undefined` once a skip is recorded. */
|
|
93
|
+
async function exchange(protocol: 'a2a' | 'mcp'): Promise<Exchange | undefined> {
|
|
87
94
|
const doc = await discovery();
|
|
88
95
|
if (!doc) return softSkip('blocked', 'discovery unreachable');
|
|
89
96
|
const facet = await familyAdvertised(protocol);
|
|
@@ -94,15 +101,31 @@ async function leg(protocol: 'a2a' | 'mcp', id: string): Promise<void> {
|
|
|
94
101
|
peer.reset();
|
|
95
102
|
const validate = payloadValidator();
|
|
96
103
|
if (!validate) return softSkip('blocked', 'run-event-payloads.schema.json#/$defs/negotiationDecided not readable from SCHEMAS_DIR');
|
|
97
|
-
|
|
98
104
|
const driven = await drive(protocol, peer.hostFacingEndpoint());
|
|
99
105
|
if (!driven) return softSkip('blocked', 'invoke seam unavailable (reason recorded above)');
|
|
100
106
|
const runId = driven.body['runId'];
|
|
101
107
|
if (typeof runId !== 'string') {
|
|
102
108
|
return softSkip('blocked', `the ${protocol} invoke seam answered ${driven.status} without a runId — the host log that carries ${EVENT} is not addressable from the suite (the seam MUST name the run whose log recorded the decision)`);
|
|
103
109
|
}
|
|
104
|
-
const
|
|
105
|
-
|
|
110
|
+
const decided = (await eventsOf(runId)).filter((e) => e.type === EVENT);
|
|
111
|
+
return { driven, runId, decided, peer, validate };
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/** RFC 0242 §A.2: the record names the version the host asked the peer for. */
|
|
115
|
+
async function requestedLeg(protocol: 'a2a' | 'mcp', id: string): Promise<void> {
|
|
116
|
+
const x = await exchange(protocol);
|
|
117
|
+
if (!x) return;
|
|
118
|
+
const named = askedVersion(protocol, x.peer.invocations());
|
|
119
|
+
if (named === null) return softSkip('inapplicable', `the host's ${protocol} client named no version to the suite's peer, so RFC 0242 §A.2 does not require requested`);
|
|
120
|
+
expect(x.decided.length, req(id, 'interop.md §The audit event', `the exchange MUST leave ${EVENT} on run ${x.runId} (RFC 0175 §D.3)`)).toBeGreaterThan(0);
|
|
121
|
+
const f = judgeRequested(x.decided[x.decided.length - 1]!.payload ?? {}, named);
|
|
122
|
+
expect(f.ok, req(id, 'interop.md §The audit event', f.message)).toBe(true);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
async function leg(protocol: 'a2a' | 'mcp', id: string): Promise<void> {
|
|
126
|
+
const x = await exchange(protocol);
|
|
127
|
+
if (!x) return;
|
|
128
|
+
const { driven, runId, decided, peer, validate } = x;
|
|
106
129
|
expect(
|
|
107
130
|
decided.length,
|
|
108
131
|
req(id, 'interop.md §The audit event', `every ${protocol} negotiation outcome MUST emit ${EVENT} on the host's own event log (RFC 0175 §D.3) — none found on run ${runId}`),
|
|
@@ -146,4 +169,10 @@ describe('RFC 0175 §D.3 — negotiation-decided-emitted (gated on a2a/mcp + sea
|
|
|
146
169
|
it('an MCP exchange leaves negotiation.decided on the host log', async () => {
|
|
147
170
|
await leg('mcp', 'openwop.requirement.0175.negotiation-decided-emitted.mcp');
|
|
148
171
|
});
|
|
172
|
+
it('an A2A record names the version the host asked for (RFC 0242 §A.2)', async () => {
|
|
173
|
+
await requestedLeg('a2a', 'openwop.requirement.0242.requested.outbound');
|
|
174
|
+
});
|
|
175
|
+
it('an MCP record names the revision the host asked for (RFC 0242 §A.2)', async () => {
|
|
176
|
+
await requestedLeg('mcp', 'openwop.requirement.0242.requested.outbound.mcp');
|
|
177
|
+
});
|
|
149
178
|
});
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RFC 0242 §B — an inbound negotiation is recorded as a durable host event
|
|
3
|
+
* (suite 2.46.0, target major 2; gated on an inbound a2a/mcp surface).
|
|
4
|
+
*
|
|
5
|
+
* `spec/v2/core/interop.md` §The audit event: every negotiation outcome MUST
|
|
6
|
+
* emit a `negotiation.decided` record — on its run's log, or, with no run, as
|
|
7
|
+
* the caller's durable host event (`schemas/v2/host-event.schema.json`,
|
|
8
|
+
* `payload` = `run-event-payloads.schema.json#/$defs/negotiationDecided`). A
|
|
9
|
+
* host serving either protocol inbound (`a2a.agentCardUrl`, `mcp.serverUrls`,
|
|
10
|
+
* `mcp.serverMount`) MUST list the type as durable in `hostEvents.types[]`,
|
|
11
|
+
* and `requested` MUST carry the version the caller named.
|
|
12
|
+
*
|
|
13
|
+
* How it is witnessed, with no seam: the suite reads discovery for §B.3, then
|
|
14
|
+
* acts as an authenticated inbound client. With `/host/events` open it makes
|
|
15
|
+
* one exchange naming `preferredVersion` (expected `accepted`) and one naming
|
|
16
|
+
* a version below the floor (expected `refused`), and finds each record by its
|
|
17
|
+
* `requested`. A2A names the version in `A2A-Version` on a JSON-RPC `GetTask`
|
|
18
|
+
* for a task that does not exist; MCP names it in `MCP-Protocol-Version` and
|
|
19
|
+
* `_meta` on `tools/list`. Neither call changes host state.
|
|
20
|
+
*
|
|
21
|
+
* @see RFCS/0242-negotiation-decided-requested-and-inbound.md
|
|
22
|
+
* @see spec/v2/core/interop.md §Negotiation is a protocol
|
|
23
|
+
* @see spec/v2/core/events.md §Host events
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import { describe, it, expect } from 'vitest';
|
|
27
|
+
import { randomBytes } from 'node:crypto';
|
|
28
|
+
import { v2Discovery, familyAdvertised, v2Validator } from '../lib/v2.js';
|
|
29
|
+
import { loadEnv } from '../lib/env.js';
|
|
30
|
+
import { subscribe } from '../lib/sse.js';
|
|
31
|
+
import { softSkip } from '../lib/soft-skip.js';
|
|
32
|
+
import { req } from '../lib/requirement-ids.js';
|
|
33
|
+
import { EVENT, inboundServed, judgeInboundRecord, judgeListed } from '../lib/negotiation-record.js';
|
|
34
|
+
|
|
35
|
+
const DOC = 'interop.md §The audit event';
|
|
36
|
+
const ID_LISTED = 'openwop.requirement.0242.inbound.listed';
|
|
37
|
+
const ID_A2A = 'openwop.requirement.0242.inbound.recorded';
|
|
38
|
+
const ID_A2A_REFUSED = 'openwop.requirement.0242.inbound.refused';
|
|
39
|
+
const ID_MCP = 'openwop.requirement.0242.inbound.recorded.mcp';
|
|
40
|
+
const ID_MCP_REFUSED = 'openwop.requirement.0242.inbound.refused.mcp';
|
|
41
|
+
const A2A_BELOW = '0.3';
|
|
42
|
+
const MCP_BELOW = '2025-06-18';
|
|
43
|
+
const META_V = 'io.modelcontextprotocol/protocolVersion';
|
|
44
|
+
const STREAM_MS = 3_000;
|
|
45
|
+
|
|
46
|
+
const hostEvent = v2Validator('host-event');
|
|
47
|
+
const sleep = (ms: number): Promise<void> => new Promise((r) => setTimeout(r, ms));
|
|
48
|
+
const absolute = (u: string): string => (/^https?:\/\//i.test(u) ? u : `${loadEnv().baseUrl}${u.startsWith('/') ? '' : '/'}${u}`);
|
|
49
|
+
|
|
50
|
+
/** `a.b` versions and ISO-date revisions both order correctly as compared here. */
|
|
51
|
+
function below(candidate: string, floor: string): boolean {
|
|
52
|
+
if (/^\d+\.\d+$/.test(candidate) && /^\d+\.\d+$/.test(floor)) {
|
|
53
|
+
const [cm, cn] = candidate.split('.').map(Number);
|
|
54
|
+
const [fm, fn] = floor.split('.').map(Number);
|
|
55
|
+
return cm! < fm! || (cm === fm && cn! < fn!);
|
|
56
|
+
}
|
|
57
|
+
return candidate < floor;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
type Surface = { url: string; preferred: string; floor: string };
|
|
61
|
+
type Gate = { ok: true; doc: Record<string, unknown>; surface: Surface } | { ok: false; kind: 'blocked' | 'inapplicable'; reason: string };
|
|
62
|
+
|
|
63
|
+
async function gate(protocol: 'a2a' | 'mcp'): Promise<Gate> {
|
|
64
|
+
let doc: Record<string, unknown> | null;
|
|
65
|
+
try { doc = await v2Discovery(); } catch { doc = null; }
|
|
66
|
+
if (!doc) return { ok: false, kind: 'blocked', reason: 'v2 discovery unreachable' };
|
|
67
|
+
const facet = await familyAdvertised(protocol);
|
|
68
|
+
if (!facet || !inboundServed(doc)[protocol]) return { ok: false, kind: 'inapplicable', reason: `the host serves no inbound ${protocol} surface (${protocol === 'a2a' ? 'a2a.agentCardUrl' : 'mcp.serverUrls / mcp.serverMount'} absent)` };
|
|
69
|
+
if (!judgeListed(doc).ok) return { ok: false, kind: 'inapplicable', reason: `hostEvents.types[] does not list ${EVENT}, so the host emits no such host event; ${ID_LISTED} records that failure` };
|
|
70
|
+
const preferred = facet['preferredVersion'];
|
|
71
|
+
const floor = protocol === 'a2a' ? facet['minimumVersion'] : facet['minimumRevision'];
|
|
72
|
+
if (typeof preferred !== 'string' || typeof floor !== 'string') return { ok: false, kind: 'blocked', reason: `the ${protocol} facet lacks preferredVersion or its floor` };
|
|
73
|
+
if (protocol === 'mcp') {
|
|
74
|
+
const urls = Array.isArray(facet['serverUrls']) ? (facet['serverUrls'] as unknown[]).filter((u): u is string => typeof u === 'string' && u.length > 0) : [];
|
|
75
|
+
if (urls.length === 0) return { ok: false, kind: 'blocked', reason: 'mcp is served inbound with no mcp.serverUrls[0] — the mount is unaddressable' };
|
|
76
|
+
return { ok: true, doc, surface: { url: absolute(urls[0]!), preferred, floor } };
|
|
77
|
+
}
|
|
78
|
+
const res = await fetch(String(facet['agentCardUrl']), { headers: { accept: 'application/json', 'A2A-Version': preferred } }).catch(() => null);
|
|
79
|
+
if (!res || res.status !== 200) return { ok: false, kind: 'blocked', reason: `the advertised agentCardUrl answered ${res?.status ?? 'nothing'}` };
|
|
80
|
+
const card = (await res.json().catch(() => ({}))) as { supportedInterfaces?: Array<{ url?: string; protocolBinding?: string }> };
|
|
81
|
+
const iface = (card.supportedInterfaces ?? []).find((i) => i.protocolBinding === 'JSONRPC' && typeof i.url === 'string');
|
|
82
|
+
if (!iface) return { ok: false, kind: 'blocked', reason: 'the public agent card lists no JSONRPC interface to send an inbound request to' };
|
|
83
|
+
return { ok: true, doc, surface: { url: absolute(iface.url!), preferred, floor } };
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** One inbound exchange naming `version`; the caller's bearer authenticates it (`interop.md` §Authentication). */
|
|
87
|
+
async function exchange(protocol: 'a2a' | 'mcp', url: string, version: string): Promise<void> {
|
|
88
|
+
const headers: Record<string, string> = { 'content-type': 'application/json', accept: 'application/json, text/event-stream', authorization: `Bearer ${loadEnv().apiKey}` };
|
|
89
|
+
const id = randomBytes(4).readUInt32BE(0);
|
|
90
|
+
let body: Record<string, unknown>;
|
|
91
|
+
if (protocol === 'a2a') {
|
|
92
|
+
headers['A2A-Version'] = version;
|
|
93
|
+
body = { jsonrpc: '2.0', id, method: 'GetTask', params: { id: `conf-0242-${randomBytes(8).toString('hex')}` } };
|
|
94
|
+
} else {
|
|
95
|
+
headers['MCP-Protocol-Version'] = version;
|
|
96
|
+
headers['Mcp-Method'] = 'tools/list';
|
|
97
|
+
body = { jsonrpc: '2.0', id, method: 'tools/list', params: { _meta: { [META_V]: version } } };
|
|
98
|
+
}
|
|
99
|
+
await fetch(url, { method: 'POST', headers, body: JSON.stringify(body) }).then((r) => r.text()).catch(() => undefined);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** Open `/host/events`, make the exchange, and return the parsed envelope of every `negotiation.decided` frame. */
|
|
103
|
+
async function recordsOf(protocol: 'a2a' | 'mcp', url: string, version: string): Promise<{ envelopes: Record<string, unknown>[]; invalid: string[] }> {
|
|
104
|
+
const sub = subscribe('/host/events', { timeoutMs: STREAM_MS, extraHeaders: { 'OpenWOP-Version': '2.0' } });
|
|
105
|
+
await sleep(400);
|
|
106
|
+
await exchange(protocol, url, version);
|
|
107
|
+
const frames = (await sub).events.filter((f) => f.event === EVENT);
|
|
108
|
+
const envelopes: Record<string, unknown>[] = [];
|
|
109
|
+
const invalid: string[] = [];
|
|
110
|
+
for (const f of frames) {
|
|
111
|
+
let env: unknown;
|
|
112
|
+
try { env = JSON.parse(f.data); } catch { invalid.push('non-JSON data'); continue; }
|
|
113
|
+
const v = hostEvent(env);
|
|
114
|
+
if (!v.ok) invalid.push(v.errors);
|
|
115
|
+
if (env && typeof env === 'object') envelopes.push(env as Record<string, unknown>);
|
|
116
|
+
}
|
|
117
|
+
return { envelopes, invalid };
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
async function inboundLeg(protocol: 'a2a' | 'mcp', id: string, which: 'accepted' | 'refused'): Promise<void> {
|
|
121
|
+
const g = await gate(protocol);
|
|
122
|
+
if (!g.ok) return softSkip(g.kind, g.reason);
|
|
123
|
+
const candidate = protocol === 'a2a' ? A2A_BELOW : MCP_BELOW;
|
|
124
|
+
if (which === 'refused' && !below(candidate, g.surface.floor)) {
|
|
125
|
+
return softSkip('inapplicable', `the ${protocol} floor ${g.surface.floor} is at or below ${candidate}, the lowest version the suite can name — nothing below the floor to ask for`);
|
|
126
|
+
}
|
|
127
|
+
const named = which === 'accepted' ? g.surface.preferred : candidate;
|
|
128
|
+
const { envelopes, invalid } = await recordsOf(protocol, g.surface.url, named);
|
|
129
|
+
expect(invalid, req(id, 'events.md §Host events', `every ${EVENT} host event MUST validate against host-event.schema.json: ${invalid.join('; ')}`)).toEqual([]);
|
|
130
|
+
for (const f of judgeInboundRecord(envelopes, { protocol, named, outcome: which })) expect(f.ok, req(id, DOC, f.message)).toBe(true);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
describe('RFC 0242 §B — an inbound negotiation is a durable host event (gated on an inbound a2a/mcp surface)', () => {
|
|
134
|
+
it('a host serving A2A or MCP inbound lists negotiation.decided as a durable host-event type', async () => {
|
|
135
|
+
let doc: Record<string, unknown> | null;
|
|
136
|
+
try { doc = await v2Discovery(); } catch { doc = null; }
|
|
137
|
+
if (!doc) return softSkip('blocked', 'v2 discovery unreachable');
|
|
138
|
+
const served = inboundServed(doc);
|
|
139
|
+
if (!served.a2a && !served.mcp) return softSkip('inapplicable', 'the host advertises no inbound A2A or MCP surface (a2a.agentCardUrl, mcp.serverUrls, mcp.serverMount)');
|
|
140
|
+
const f = judgeListed(doc);
|
|
141
|
+
expect(f.ok, req(ID_LISTED, DOC, f.message)).toBe(true);
|
|
142
|
+
});
|
|
143
|
+
it('an inbound A2A exchange at preferredVersion is recorded accepted, with requested', async () => {
|
|
144
|
+
await inboundLeg('a2a', ID_A2A, 'accepted');
|
|
145
|
+
});
|
|
146
|
+
it('an inbound A2A exchange below minimumVersion is recorded refused, with requested', async () => {
|
|
147
|
+
await inboundLeg('a2a', ID_A2A_REFUSED, 'refused');
|
|
148
|
+
});
|
|
149
|
+
it('an inbound MCP exchange at preferredVersion is recorded accepted, with requested', async () => {
|
|
150
|
+
await inboundLeg('mcp', ID_MCP, 'accepted');
|
|
151
|
+
});
|
|
152
|
+
it('an inbound MCP exchange below minimumRevision is recorded refused, with requested', async () => {
|
|
153
|
+
await inboundLeg('mcp', ID_MCP_REFUSED, 'refused');
|
|
154
|
+
});
|
|
155
|
+
});
|
|
@@ -7,8 +7,10 @@
|
|
|
7
7
|
* HMAC-SHA256 with the subscription secret); this adds no signature scheme and
|
|
8
8
|
* per-subscription secrets are unchanged across the cut (`spec/v2/core/webhooks.md`
|
|
9
9
|
* §Dual emission through the overlap; persistence.md §Everything else a v1 host
|
|
10
|
-
* persisted; migration row C9.9). The facet
|
|
11
|
-
* `"v1"`
|
|
10
|
+
* persisted; migration row C9.9). The facet check (`signatureAlgorithms[]` lists
|
|
11
|
+
* `"v1"`) needs no seam and lives in `v2-webhooks-v1-scheme-listed.test.ts`
|
|
12
|
+
* since 2.45.30: this file is a floor of `openwop-conformance-seams-v2`, so
|
|
13
|
+
* every leg in it MUST be seam-driven (`coherence/seams-floor-legs-gated.test.ts`).
|
|
12
14
|
*
|
|
13
15
|
* The receiver under test is the HOST's inbound receiver path — the v2 host as
|
|
14
16
|
* a subscriber (its trigger bridge, its A2A/MCP peer callbacks) — which the
|
|
@@ -76,16 +78,6 @@ async function deliver(secret: string, delivery: { headers: Record<string, strin
|
|
|
76
78
|
}
|
|
77
79
|
|
|
78
80
|
describe('RFC 0176 §D.2 — v1-signed-webhook-accepted (gated on webhooks + seams)', () => {
|
|
79
|
-
it('the webhooks facet lists scheme "v1" — the scheme a v1-signed delivery is verified under', async () => {
|
|
80
|
-
const doc = await discovery();
|
|
81
|
-
if (!doc) return softSkip('blocked', 'discovery unreachable');
|
|
82
|
-
const webhooks = await gateFamily('webhooks');
|
|
83
|
-
if (!webhooks) return softSkip('inapplicable', 'webhooks family not advertised (gate recorded under openwop.family.webhooks)');
|
|
84
|
-
const algorithms = webhooks['signatureAlgorithms'];
|
|
85
|
-
expect(Array.isArray(algorithms), req('openwop.requirement.0176.v1-signed-webhook-accepted.facet', 'spec/v2/core/webhooks.md §Surfaces', 'the webhooks facet is { signatureAlgorithms[] }')).toBe(true);
|
|
86
|
-
expect(algorithms, req('openwop.requirement.0176.v1-signed-webhook-accepted.facet', 'spec/v2/core/webhooks.md §Surfaces', 'signatureAlgorithms MUST list "v1" — the cut adds no signature scheme (RFC 0176 §D.2)')).toContain('v1');
|
|
87
|
-
});
|
|
88
|
-
|
|
89
81
|
it('the host\'s v2 receiver path accepts an X-openwop-*-only scheme-v1 delivery and refuses a tampered one', async () => {
|
|
90
82
|
const doc = await discovery();
|
|
91
83
|
if (!doc) return softSkip('blocked', 'discovery unreachable');
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RFC 0176 §D.2 — the webhooks facet lists scheme `v1` (suite 2.45.30, target
|
|
3
|
+
* major 2; gated on `webhooks`).
|
|
4
|
+
*
|
|
5
|
+
* The facet's `signatureAlgorithms[]` MUST list `"v1"`: the cut adds no
|
|
6
|
+
* signature scheme, so a v1-signed delivery is verified under it
|
|
7
|
+
* (`spec/v2/core/webhooks.md` §Surfaces). Until 2.45.30 this was the first leg
|
|
8
|
+
* of `v2-v1-signed-webhook-accepted`, a floor of `openwop-conformance-seams-v2`,
|
|
9
|
+
* and its pass certified that profile on hosts that mount no seams.
|
|
10
|
+
*
|
|
11
|
+
* @see spec/v2/core/webhooks.md §Surfaces
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { describe, it, expect } from 'vitest';
|
|
15
|
+
import { v2Discovery, gateFamily } from '../lib/v2.js';
|
|
16
|
+
import { softSkip } from '../lib/soft-skip.js';
|
|
17
|
+
import { req } from '../lib/requirement-ids.js';
|
|
18
|
+
|
|
19
|
+
async function discovery(): Promise<Record<string, unknown> | null> {
|
|
20
|
+
try { return await v2Discovery(); } catch { return null; }
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
describe('RFC 0176 §D.2 — the webhooks facet lists scheme v1 (gated on webhooks)', () => {
|
|
24
|
+
it('the webhooks facet lists scheme "v1" — the scheme a v1-signed delivery is verified under', async () => {
|
|
25
|
+
const doc = await discovery();
|
|
26
|
+
if (!doc) return softSkip('blocked', 'discovery unreachable');
|
|
27
|
+
const webhooks = await gateFamily('webhooks');
|
|
28
|
+
if (!webhooks) return softSkip('inapplicable', 'webhooks family not advertised (gate recorded under openwop.family.webhooks)');
|
|
29
|
+
const algorithms = webhooks['signatureAlgorithms'];
|
|
30
|
+
expect(Array.isArray(algorithms), req('openwop.requirement.0176.v1-signed-webhook-accepted.facet', 'spec/v2/core/webhooks.md §Surfaces', 'the webhooks facet is { signatureAlgorithms[] }')).toBe(true);
|
|
31
|
+
expect(algorithms, req('openwop.requirement.0176.v1-signed-webhook-accepted.facet', 'spec/v2/core/webhooks.md §Surfaces', 'signatureAlgorithms MUST list "v1" — the cut adds no signature scheme (RFC 0176 §D.2)')).toContain('v1');
|
|
32
|
+
});
|
|
33
|
+
});
|