From 4555c67a8ece59484dcb6b43ab3ad5adfe10bcbc Mon Sep 17 00:00:00 2001 From: Rajeh Taher Date: Mon, 19 Oct 2026 17:44:46 +0300 Subject: [PATCH 1/2] docs: pin examples to API version 2026-09-22 The API now refuses Polymorfa-Version 2026-03-20 (polymorfa/polymorfa#782). The SDKs already default to 2026-09-22; update the README pins, the full-platform example and the retired-version test fixtures to match. Co-Authored-By: Claude --- README.md | 4 ++-- examples/full-platform/lib/polymorfa.ts | 2 +- packages/browser/README.md | 2 +- packages/browser/test/transport.test.ts | 6 +++--- packages/typescript/README.md | 2 +- packages/typescript/test/transport.test.ts | 8 ++++---- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index eb9d1dd8..9676e711 100644 --- a/README.md +++ b/README.md @@ -694,8 +694,8 @@ and `idempotencyKey`; the key does not make the API replay the append. Set `apiVersion` on a client or a single request. Use a date-form API revision, such as `2026-09-22`. The SDK sends it as the `Polymorfa-Version` header. -Native calls default to `2026-09-22`; the API accepts explicit revisions from -`2026-03-20` and rejects earlier pins. +Native calls default to `2026-09-22`, which is also the oldest revision the API +accepts. Earlier pins, including `2026-03-20`, return a `400` error. Every client exposes `raw.request()` for deliberate API escape hatches: diff --git a/examples/full-platform/lib/polymorfa.ts b/examples/full-platform/lib/polymorfa.ts index 508084b0..01049906 100644 --- a/examples/full-platform/lib/polymorfa.ts +++ b/examples/full-platform/lib/polymorfa.ts @@ -19,7 +19,7 @@ let bridgeClient: BridgeClient | undefined; function shared(): SharedClientOptions { const baseUrl = env.baseUrl(); return { - apiVersion: "2026-03-20", + apiVersion: "2026-09-22", ...(baseUrl === undefined ? {} : { baseUrl }), }; } diff --git a/packages/browser/README.md b/packages/browser/README.md index 764ee229..9b7c2375 100644 --- a/packages/browser/README.md +++ b/packages/browser/README.md @@ -39,7 +39,7 @@ await messaging.messages.send({ Native Messaging requests default to `Polymorfa-Version: 2026-09-22`, matching the `whatsapp_ids` message-reference object. A temporary optional `whatsapp_id` output alias remains for older consumers. An explicit version header in request -options is preserved; versions before `2026-03-20` return the API error without an automatic +options is preserved; versions before `2026-09-22` return the API error without an automatic upgrade or resend. Raw Graph-compatible paths and same-origin application handlers receive no default native version header. Client-token permissions and Hybrid preview restrictions still apply. diff --git a/packages/browser/test/transport.test.ts b/packages/browser/test/transport.test.ts index 7b96df72..caadb017 100644 --- a/packages/browser/test/transport.test.ts +++ b/packages/browser/test/transport.test.ts @@ -90,7 +90,7 @@ describe("BrowserTransport", () => { error: { code: "invalid_parameter", message: - "API version 2026-03-19 is no longer supported. Minimum: 2026-03-20", + "API version 2026-03-20 is no longer supported. Minimum: 2026-09-22", param: "Polymorfa-Version", }, }, @@ -109,13 +109,13 @@ describe("BrowserTransport", () => { conversation: { phoneNumber: "+15551234567" }, content: { text: "Hello" }, }, - { headers: { "Polymorfa-Version": "2026-03-19" } }, + { headers: { "Polymorfa-Version": "2026-03-20" } }, ), ).rejects.toMatchObject({ code: "invalid_parameter", status: 400 }); expect(fetch).toHaveBeenCalledOnce(); expect( new Headers(fetch.mock.calls[0]?.[1]?.headers).get("polymorfa-version"), - ).toBe("2026-03-19"); + ).toBe("2026-03-20"); }); it("excludes raw Graph and application routes from the native default", async () => { diff --git a/packages/typescript/README.md b/packages/typescript/README.md index 6f3807aa..10cc37ac 100644 --- a/packages/typescript/README.md +++ b/packages/typescript/README.md @@ -52,7 +52,7 @@ const platform = new Client({ type: "organizationApiKey", value: process.env.POLYMORFA_PLATFORM_API_KEY!, }, - apiVersion: "2026-03-20", + apiVersion: "2026-09-22", }); const project = platform.project("project_123"); diff --git a/packages/typescript/test/transport.test.ts b/packages/typescript/test/transport.test.ts index f6bb3238..6b9685b9 100644 --- a/packages/typescript/test/transport.test.ts +++ b/packages/typescript/test/transport.test.ts @@ -174,13 +174,13 @@ describe("HttpTransport", () => { status: 400, headers: { "content-type": "application/json", - "polymorfa-version": "2026-03-19", + "polymorfa-version": "2026-03-20", }, body: JSON.stringify({ error: { code: "invalid_parameter", message: - "API version 2026-03-19 is no longer supported. Minimum: 2026-03-20", + "API version 2026-03-20 is no longer supported. Minimum: 2026-09-22", param: "Polymorfa-Version", }, }), @@ -189,11 +189,11 @@ describe("HttpTransport", () => { makeTransport(server.url, { maxNetworkRetries: 2 }).request({ method: "GET", path: "/messaging/number/hybrid-link", - headers: { "Polymorfa-Version": "2026-03-19" }, + headers: { "Polymorfa-Version": "2026-03-20" }, }), ).rejects.toMatchObject({ code: "invalid_parameter", status: 400 }); expect(server.requests).toHaveLength(1); - expect(server.requests[0]?.headers["polymorfa-version"]).toBe("2026-03-19"); + expect(server.requests[0]?.headers["polymorfa-version"]).toBe("2026-03-20"); }); it("keeps API version options ahead of raw headers for JSON and streaming calls", async () => { From 446587a9eba5b53a80e6b66a935b43694fa41af8 Mon Sep 17 00:00:00 2001 From: Rajeh Taher Date: Wed, 28 Oct 2026 06:38:16 +0200 Subject: [PATCH 2/2] docs: bind SDK snippets to rebased version examples --- contracts/doc-snippets.json | 4 ++-- internal/agent-sessions/2026-10-28-sdk358-rebase.md | 11 +++++++++++ scripts/doc-snippets/recipes.mjs | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 internal/agent-sessions/2026-10-28-sdk358-rebase.md diff --git a/contracts/doc-snippets.json b/contracts/doc-snippets.json index fde7b6b0..aaaf99b6 100644 --- a/contracts/doc-snippets.json +++ b/contracts/doc-snippets.json @@ -1,7 +1,7 @@ { "schemaVersion": 1, - "sourceCommit": "f33cd3b9a949f8db495405d0733ca0bcdb4bd3bc", - "sourceFilesSha256": "7af428a30b1becaf20b3e9ce407cc0742d49353fac60a43aba71e568642a12c3", + "sourceCommit": "4555c67a8ece59484dcb6b43ab3ad5adfe10bcbc", + "sourceFilesSha256": "122eaf7a51d30047d5c6a1a899e579fa97820d8020329ce297722240826944c2", "apiVersion": "2026-09-22", "apiSourceCommit": "171a9683ff45d11a4b5d3917dc428ad2722b0d99", "specs": { diff --git a/internal/agent-sessions/2026-10-28-sdk358-rebase.md b/internal/agent-sessions/2026-10-28-sdk358-rebase.md new file mode 100644 index 00000000..cc0ec80c --- /dev/null +++ b/internal/agent-sessions/2026-10-28-sdk358-rebase.md @@ -0,0 +1,11 @@ +# SDK358 current-main rebase + +Collaborator: purpshell. Agent: gpt-6.1-sol, xhigh, through T3 Code. Thread: 7793bd59-7f5e-4ad0-bcf2-8da9ea202931. This is a hand-authored checkpoint of selected visible source and tool evidence, with a capture gap for the full transcript. No hidden reasoning, credentials or customer data is included. + +The user authorized guarded rebases of existing owning PRs, preserving old heads and authored changes. SDK358 old 40483fcda9bdc3adc520a0ed1a23a371907aaf36 on base d2c5b3dfe4b13dee6d7a07b96df213e47ef8130a was rebased with --rebase-merges onto actual main 3b222dcad98b25da4b5b2e0c0b367988eca95e99. Rebased source: 4555c67a8ece59484dcb6b43ab3ad5adfe10bcbc. Old source is retained at backup/rebase-20261028-sdk358-40483fcd and in a private patch, bundle, author record and range-diff. The held local checkout/index remained unchanged. + +The six authored changes correct examples and rejection fixtures to API 2026-09-22. Public native SDK implementations and wire signatures are unchanged in all six languages. Package README/tests are included in the genuine snippet input digest, so recipes now bind the rebased source and the generator produced the catalog. All 186 program/request entries, package metadata, API171 source and specification hashes are byte-equivalent to the accepted main catalog; only SDK source provenance changes. Release status remains source-only, with no registry installation instructions. + +Fresh Node 24 checks passed: both affected transport files, catalog generation/drift/regression tests, strict coverage and formatting. Full six-language physical-package snippet verification was not run: the repository verifier invokes installers and those effects are outside this admission. Old compiler evidence is historical, not exact-head acceptance. Natural hosted checks and independent review must qualify the rewritten head. + +Impact: API contract date/source/hashes stay pinned; all six SDK runtime surfaces are unchanged; CLI and Docs consumers receive no new pin or broad binding from this rebase; feature release and package publication remain held. No Admin/API authorization, runner, Temporal, audit, Inspector, Console, Connect, Help Center or marketing runtime changed. ZK custody, QuickLink and its browser pairing tunnel are unaffected because this delta contains only the six documented example/test files and snippet provenance. Registry, staging, production and customer availability are not established. Roadmap records were not reconciled in this mechanical task. Release retains merge execution. diff --git a/scripts/doc-snippets/recipes.mjs b/scripts/doc-snippets/recipes.mjs index 51ff7aa5..8fca3938 100644 --- a/scripts/doc-snippets/recipes.mjs +++ b/scripts/doc-snippets/recipes.mjs @@ -1,7 +1,7 @@ // Requests come from the pinned OpenAPI and existing native wire fixtures. // Calls are handwritten in the language modules. Never derive arguments from // contracts/coverage.json's display-only method names. -export const sourceCommit = "f33cd3b9a949f8db495405d0733ca0bcdb4bd3bc"; +export const sourceCommit = "4555c67a8ece59484dcb6b43ab3ad5adfe10bcbc"; export const apiVersion = "2026-09-22"; export const languages = [ "typescript",