@openwop/openwop-conformance 1.135.2 → 1.135.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openwop/openwop-conformance",
3
- "version": "1.135.2",
3
+ "version": "1.135.3",
4
4
  "description": "Production-ready black-box conformance suite for OpenWOP v1.0 compliant servers.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "_comment": "Provenance of this vendored schemas/ copy. See conformance/README.md \u00a7\"Resolving the contract\". Compare against the stamp in your installed @openwop/openwop-conformance to detect a stale hand-copied contract.",
3
- "suiteVersion": "1.135.2",
4
- "corpusCommit": "101bf981f0431710e81a3e7ac108c5b6b49cddd9"
3
+ "suiteVersion": "1.135.3",
4
+ "corpusCommit": "ed19aa8aafa8c43e55a174abaa2010b82698f572"
5
5
  }
@@ -138,11 +138,14 @@ export function signPayload(
138
138
 
139
139
  /**
140
140
  * Discover a tenant the calling bearer provably OWNS, by creating a probe run
141
- * and reading `owner.tenantId` off its snapshot (RFC 0048). A host that scopes
141
+ * and reading `owner.tenant` off its snapshot (RFC 0048; `run-snapshot.schema.json`
142
+ * §owner — the triple is `{ tenant, workspace, principal }`, and `tenantId` was
143
+ * never the spec name: S29, 2026-08-17, found by the second sibling host, whose
144
+ * schema-correct `owner.tenant` this helper silently ignored). A host that scopes
142
145
  * webhook subscriptions by tenant membership (RFC 0093) 403s a `tenantId` the
143
146
  * bearer is not a member of — so a hard-coded tenant is wrong; the only portable
144
147
  * owned tenant is the one on a run the bearer just created. Returns `undefined`
145
- * for a single-tenant host (which omits `owner.tenantId`) or when no probe
148
+ * for a single-tenant host (which omits `owner`) or when no probe
146
149
  * fixture is available — callers then omit `tenantId`, which single-tenant hosts
147
150
  * accept. (RFC 0093 / webhooks.md §Register; suite defect fixed 2026-08-09.)
148
151
  */
@@ -155,6 +158,8 @@ export async function discoverOwnedTenant(
155
158
  const runId = (create.json as { runId?: string } | null)?.runId;
156
159
  if (typeof runId !== 'string') return undefined;
157
160
  const snap = await driver.get(`/v1/runs/${encodeURIComponent(runId)}`);
158
- const owner = (snap.json as { owner?: { tenantId?: unknown } } | null)?.owner;
159
- return typeof owner?.tenantId === 'string' ? owner.tenantId : undefined;
161
+ const owner = (snap.json as { owner?: { tenant?: unknown; tenantId?: unknown } } | null)?.owner;
162
+ if (typeof owner?.tenant === 'string' && owner.tenant.length > 0) return owner.tenant;
163
+ // Pre-S29 hosts that copied the suite's misnamed field: tolerated, never asserted.
164
+ return typeof owner?.tenantId === 'string' && owner.tenantId.length > 0 ? owner.tenantId : undefined;
160
165
  }