diff --git a/CONFORMANCE.md b/CONFORMANCE.md
index c1ff3de2..c862ae2c 100644
--- a/CONFORMANCE.md
+++ b/CONFORMANCE.md
@@ -48,7 +48,7 @@ Behavior columns come in two kinds: **verified** (an official SDK was driven aga
| [avalara-style](adapters/avalara-style/) | Avalara AvaTax REST API `2` | 8 | VM | — | — | [5](#avalara-style) | [3](#avalara-style) |
| [aws-cognito-style](adapters/aws-cognito-style/) | Amazon Cognito Identity Provider API `2016-04-18` | 7 | VM | — | — | [6](#aws-cognito-style) | [3](#aws-cognito-style) |
| [aws-iam-sts-style](adapters/aws-iam-sts-style/) | AWS STS + IAM API `2011-06-15` | 2 | SDK | aws-sdk-go-v2 @ v1.47.1 | 2 | [3](#aws-iam-sts-style) | [3](#aws-iam-sts-style) |
-| [aws-s3-style](adapters/aws-s3-style/) | Amazon S3 API `2006-03-01` | 9 | SDK | aws-sdk-go-v2 @ v1.47.1 | 16 | [9](#aws-s3-style) | [16](#aws-s3-style) |
+| [aws-s3-style](adapters/aws-s3-style/) | Amazon S3 API `2006-03-01` | 10 | SDK | aws-sdk-go-v2 @ v1.47.1 | 19 | [8](#aws-s3-style) | [17](#aws-s3-style) |
| [azure-devops-style](adapters/azure-devops-style/) | Azure DevOps REST API `7.1` | 17 | VM | — | — | [8](#azure-devops-style) | [6](#azure-devops-style) |
| [azure-servicebus-style](adapters/azure-servicebus-style/) | Azure Service Bus + Storage `2024-01-01` | 18 | VM | — | — | [6](#azure-servicebus-style) | [3](#azure-servicebus-style) |
| [azure-storage-style](adapters/azure-storage-style/) | Azure Storage Blob REST API `2024-08-04` | 9 | VM | — | — | [6](#azure-storage-style) | [3](#azure-storage-style) |
@@ -66,7 +66,7 @@ Behavior columns come in two kinds: **verified** (an official SDK was driven aga
| [dynamodb-style](adapters/dynamodb-style/) | Amazon DynamoDB API `2012-08-10` | 1 | SDK + VM | aws-sdk-go-v2 @ v1.47.1 | 8 | [8](#dynamodb-style) | [5](#dynamodb-style) |
| [echo-style](adapters/echo-style/) | gRPC echo demo `1.0` | 0 (+1 ws) | boot | — | — | — | — |
| [emailoctopus-style](adapters/emailoctopus-style/) | EmailOctopus API `2.0.0` | 21 | VM | — | — | [2](#emailoctopus-style) | [3](#emailoctopus-style) |
-| [entra-id-style](adapters/entra-id-style/) | Microsoft Graph / Entra ID `v1.0` | 9 | SDK | microsoft-graph-client @ 3.0.7 (floor) | 8 | [8](#entra-id-style) | [3](#entra-id-style) |
+| [entra-id-style](adapters/entra-id-style/) | Microsoft Graph / Entra ID `v1.0` | 10 | SDK | microsoft-graph-client @ 3.0.7 (floor) | 8 | [8](#entra-id-style) | [3](#entra-id-style) |
| [erc4337-style](adapters/erc4337-style/) | ERC-4337 Bundler RPC `0.7` | 2 | VM | — | — | [5](#erc4337-style) | [6](#erc4337-style) |
| [escrow-style](adapters/escrow-style/) | Escrow.com API `2017-09-01` | 9 | VM | — | — | [3](#escrow-style) | [4](#escrow-style) |
| [eth-jsonrpc-style](adapters/eth-jsonrpc-style/) | Ethereum JSON-RPC `1.0` | 1 | SDK | go-ethereum @ v1.17.7 | 5 | [5](#eth-jsonrpc-style) | [4](#eth-jsonrpc-style) |
@@ -76,12 +76,12 @@ Behavior columns come in two kinds: **verified** (an official SDK was driven aga
| [ga4-style](adapters/ga4-style/) | Google Analytics Data API + Admin API `v1beta` | 7 | SDK | google-api-go-client @ v0.299.0 | 7 | [4](#ga4-style) | [3](#ga4-style) |
| [gcalendar-style](adapters/gcalendar-style/) | Google Calendar API `v3` | 10 | SDK | google-api-go-client @ v0.299.0 | 8 | [4](#gcalendar-style) | [2](#gcalendar-style) |
| [gdocs-style](adapters/gdocs-style/) | Google Docs API `v1` | 5 | SDK | google-api-go-client @ v0.299.0 | 5 | [3](#gdocs-style) | [5](#gdocs-style) |
-| [github-style](adapters/github-style/) | GitHub REST + GraphQL API `2022-11-28` | 26 +GQL | SDK | go-github/v89 @ v89.0.0
octokit @ 5.0.5 (floor) | 6 | [7](#github-style) | [4](#github-style) |
+| [github-style](adapters/github-style/) | GitHub REST + GraphQL API `2022-11-28` | 30 +GQL | SDK | go-github/v89 @ v89.0.0
octokit @ 5.0.5 (floor) | 6 | [7](#github-style) | [5](#github-style) |
| [gmail-style](adapters/gmail-style/) | Gmail API `v1` | 16 | SDK | google-api-go-client @ v0.299.0 | 9 | [6](#gmail-style) | [3](#gmail-style) |
| [google-admin-style](adapters/google-admin-style/) | Google Admin SDK Directory API `directory_v1` | 13 | SDK | google-api-go-client @ v0.299.0 | 8 | [4](#google-admin-style) | [4](#google-admin-style) |
| [google-cloudtasks-style](adapters/google-cloudtasks-style/) | Google Cloud Tasks API `v2` | 16 | boot | — | — | [7](#google-cloudtasks-style) | [7](#google-cloudtasks-style) |
| [google-iam-style](adapters/google-iam-style/) | Google Cloud IAM API + Service Accounts `v1` | 10 | SDK | google-api-go-client @ v0.299.0 | 7 | [4](#google-iam-style) | [2](#google-iam-style) |
-| [google-style](adapters/google-style/) | Google OAuth2 API `v2` | 4 | SDK | x/oauth2 @ v0.37.0
google-api-go-client/idtoken @ v0.299.0 | 7 | [2](#google-style) | [2](#google-style) |
+| [google-style](adapters/google-style/) | Google OAuth2 API `v2` | 6 | SDK | x/oauth2 @ v0.37.0
google-api-go-client/idtoken @ v0.299.0 | 7 | [2](#google-style) | [2](#google-style) |
| [gsearchconsole-style](adapters/gsearchconsole-style/) | Google Search Console API `v1` | 11 | SDK | google-api-go-client @ v0.299.0 | 7 | [2](#gsearchconsole-style) | [4](#gsearchconsole-style) |
| [gsheets-style](adapters/gsheets-style/) | Google Sheets API `v4` | 10 | SDK | google-api-go-client @ v0.299.0 | 8 | [4](#gsheets-style) | [3](#gsheets-style) |
| [gtasks-style](adapters/gtasks-style/) | Google Tasks API `v1` | 11 | SDK | google-api-go-client @ v0.299.0 | 8 | [3](#gtasks-style) | [2](#gtasks-style) |
@@ -92,7 +92,7 @@ Behavior columns come in two kinds: **verified** (an official SDK was driven aga
| [jira-style](adapters/jira-style/) | Jira Cloud REST API `3` | 32 | SDK | jira-js @ 6.2.0 (floor) | 7 | [5](#jira-style) | [6](#jira-style) |
| [jumio-style](adapters/jumio-style/) | Jumio API `v1` | 5 | VM | — | — | [3](#jumio-style) | [6](#jumio-style) |
| [linkedin-style](adapters/linkedin-style/) | LinkedIn API `v2` | 8 | VM | — | — | [4](#linkedin-style) | [3](#linkedin-style) |
-| [llm-style](adapters/llm-style/) | OpenAI API + Anthropic API `OpenAI v1 / Anthropic v1` | 3 | SDK | openai-node @ 7.5.0 (floor) | 2 | [4](#llm-style) | [3](#llm-style) |
+| [llm-style](adapters/llm-style/) | OpenAI API + Anthropic API `OpenAI v1 / Anthropic v1` | 3 | SDK | openai-node @ 7.5.0 (floor) | 2 | [3](#llm-style) | [3](#llm-style) |
| [marketo-style](adapters/marketo-style/) | Marketo Engage REST API `1.0` | 21 | VM | — | — | [5](#marketo-style) | [3](#marketo-style) |
| [microsoft-graph-style](adapters/microsoft-graph-style/) | Microsoft Graph API `v1.0` | 55 | SDK | microsoft-graph-client @ 3.0.7 (floor) | 10 | [8](#microsoft-graph-style) | [6](#microsoft-graph-style) |
| [netsuite-style](adapters/netsuite-style/) | NetSuite SuiteTalk REST API `1.0` | 9 | VM | — | — | [4](#netsuite-style) | [3](#netsuite-style) |
@@ -111,7 +111,7 @@ Behavior columns come in two kinds: **verified** (an official SDK was driven aga
| [psd2-style](adapters/psd2-style/) | Open Banking / PSD2 (Berlin Group NextGenPSD2) `1.3.6` | 19 | VM | — | — | [6](#psd2-style) | [7](#psd2-style) |
| [qbo-style](adapters/qbo-style/) | QuickBooks Online API `v3` | 11 | VM | — | — | [6](#qbo-style) | [4](#qbo-style) |
| [reddit-style](adapters/reddit-style/) | Reddit API `1.0` | 2 | VM | — | — | [5](#reddit-style) | [3](#reddit-style) |
-| [resend-style](adapters/resend-style/) | Resend API `1.0.0` | 6 | SDK | resend-node @ 6.22.0 (floor) | 4 | [6](#resend-style) | [3](#resend-style) |
+| [resend-style](adapters/resend-style/) | Resend API `1.0.0` | 8 | SDK | resend-node @ 6.22.0 (floor) | 4 | [5](#resend-style) | [3](#resend-style) |
| [revenuecat-style](adapters/revenuecat-style/) | RevenueCat API `v1` | 7 | VM | — | — | [5](#revenuecat-style) | [5](#revenuecat-style) |
| [salesforce-style](adapters/salesforce-style/) | Salesforce REST API `v60.0` | 29 | SDK | jsforce @ 3.10.27 (floor) | 6 | [7](#salesforce-style) | [4](#salesforce-style) |
| [sendgrid-style](adapters/sendgrid-style/) | Twilio SendGrid v3 API `v3` | 5 | VM | — | — | [7](#sendgrid-style) | [6](#sendgrid-style) |
@@ -158,13 +158,11 @@ sections in `conformance/node/tests/*.test.ts`).
### aws-sdk-go-v2 @ v1.47.1
-**aws-iam-sts-style**
-
-- GetCallerIdentity with real SigV4 signature
-- AssumeRole -> credentials
-
**aws-s3-style**
+- HeadBucket existence probe
+- CopyObject preserves binary bytes and user metadata; missing source refused
+- DeleteObjects existing and missing keys, XML escaping and quiet mode
- CreateBucket
- PutObject (binary body)
- GetObject byte-exact round-trip (incl. non-UTF-8)
@@ -182,6 +180,11 @@ sections in `conformance/node/tests/*.test.ts`).
- Presigned DELETE (real presigner)
- Presigned GET rejects a tampered signature
+**aws-iam-sts-style**
+
+- GetCallerIdentity with real SigV4 signature
+- AssumeRole -> credentials
+
**dynamodb-style**
- CreateTable via real SigV4
@@ -2591,13 +2594,14 @@ behavior notes live in each adapter's README.
### aws-s3-style
-**Covered** — 9 routes
+**Covered** — 10 routes
Routes
| Method | Route |
|---|---|
| GET | `/{bucket}` |
+| HEAD | `/{bucket}` |
| POST | `/{bucket}` |
| PUT | `/{bucket}` |
| DELETE | `/{bucket}` |
@@ -2609,19 +2613,18 @@ behavior notes live in each adapter's README.
-**Missing** (9)
+**Missing** (8)
- No bucket policy, tagging, ACL, CORS, lifecycle, or website subresources
- No object versioning (?versions listing, versionId delete) or object lock
-- No CopyObject (x-amz-copy-source) or UploadPartCopy
+- No UploadPartCopy; CopyObject supports COPY/REPLACE user metadata but not source conditional headers, version selection, tagging, ACL or encryption options
- No browser form POST uploads (POST policy) — POST /{bucket} returns 501 NotImplemented when SigV4-signed, but a real browser form upload (which authenticates with form fields, so carries no Authorization header) is refused earlier with 403 MissingSecurityHeader
- No object-lock configuration subresource (?object-lock) on the bucket
- No ListMultipartUploads (GET /{bucket}?uploads returns 501 NotImplemented)
-- No multi-object DeleteObjects (POST /{bucket}?delete returns 501 NotImplemented)
- No object-level subresources: ?acl, ?tagging, ?retention, ?legal-hold, ?torrent, ?attributes, ?annotation, ?encryption — 501 NotImplemented rather than falling through to the object operation
- No SelectObjectContent (?select) or RestoreObject (?restore) — POST verbs, answered 501 NotImplemented (a bare POST /{bucket}/{key} with no query is 405)
-**Deviations** (16)
+**Deviations** (17)
- ETags are MD5 hex (multipart MD5(binary-concat)-N)
- Multipart 5 MiB minimum part size not enforced (small parts allowed)
@@ -2630,20 +2633,22 @@ behavior notes live in each adapter's README.
- Unimplemented subresources return 501 NotImplemented rather than falling through to the object operation on the same route. The mutating routes use an allowlist and reject every query parameter except the SigV4 presigned-auth ones and the route's own; the read routes use a denylist. The guard runs before the multipart dispatch
- Starlark handlers are step-bounded: a single ListObjectsV2 or DeleteBucket over a large enough bucket exhausts the budget and returns a JSON 500 rather than S3 XML. The reachable threshold for ListObjectsV2 is a few hundred objects in one un-paginated page; DeleteBucket did not reproduce it in a few hundred rows
- x-amz-meta-* suffixes are lowercased and the first occurrence wins
-- On mutating routes (bucket PUT/DELETE, object PUT/POST/DELETE) x-id must name an operation this adapter routes; the SDK's x-id=CopyObject, x-id=RestoreObject, x-id=SelectObjectContent, x-id=PutObjectLegalHold and x-id=UploadPartCopy all return 501 rather than falling through. AbortMultipartUpload is routed and must not be refused
-- CopyObject selected by the x-amz-copy-source header alone, with no x-id query parameter, still writes a zero-byte object; the query allowlist cannot see a header-selected subresource
+- On mutating routes (bucket PUT/DELETE, object PUT/POST/DELETE) x-id must name an operation this adapter routes; the SDK's x-id=RestoreObject, x-id=SelectObjectContent, x-id=PutObjectLegalHold and x-id=UploadPartCopy all return 501 rather than falling through. AbortMultipartUpload is routed and must not be refused
- PUT /{bucket}/{key}?partNumber=N without uploadId returns 400 InvalidRequest rather than falling through to PutObject
- Per-chunk STREAMING signatures not verified (header SigV4 only)
- Streaming checksum trailers discarded (unsupported-checksum)
- DELETE object against a missing bucket is 204 (real S3: 404 NoSuchBucket)
- GET/HEAD object against a missing bucket is 404 NoSuchKey (real S3: 404 NoSuchBucket)
- SigV4 canonical URI/query rebuilt from decoded values — duplicates indistinguishable
+- Presigned PUT accepts JS SDK CRC32 checksum query parameters but does not validate checksum values
+- DeleteObjects XML parsing supports the SDK Object/Key envelope and named XML entities; numeric character references beyond the five XML entities and namespace-prefixed elements are unsupported
- No RFC 1123 Date fallback; canonical header whitespace collapsing not applied
Derived behavior tags (static — from scripts/*.star, not SDK-verified)
- `GET` `/{bucket}` — query, params, stateful, paginate, filter, errors, clock
-- `POST` `/{bucket}` — query, params, stateful, clock
+- `HEAD` `/{bucket}` — query, params, stateful, errors, clock
+- `POST` `/{bucket}` — query, params, stateful, errors, clock
- `PUT` `/{bucket}` — body, query, params, stateful, errors, clock
- `DELETE` `/{bucket}` — query, params, stateful, errors, clock
- `PUT` `/{bucket}/{key+}` — query, params, stateful, errors, clock
@@ -3966,7 +3971,7 @@ behavior notes live in each adapter's README.
### entra-id-style
-**Covered** — 9 routes
+**Covered** — 10 routes
Routes
@@ -3975,6 +3980,7 @@ behavior notes live in each adapter's README.
| GET | `/common/oauth2/v2.0/authorize` |
| POST | `/common/oauth2/v2.0/token` |
| GET | `/common/discovery/v2.0/keys` |
+| GET | `/v1.0/me/photos/{size}/$value` |
| GET | `/v1.0/me` |
| GET | `/v1.0/users` |
| POST | `/v1.0/users` |
@@ -3984,9 +3990,9 @@ behavior notes live in each adapter's README.
-**Provider surface** — derived from spec msgraph-metadata v1.0 @ v1.0: 17531 real routes · 6 covered · 0% · 17525 not implemented
+**Provider surface** — derived from spec msgraph-metadata v1.0 @ v1.0: 17531 real routes · 7 covered · 0% · 17524 not implemented
-not implemented (17525)
+not implemented (17524)
- `GET` `/v1.0/admin`
- `PATCH` `/v1.0/admin`
@@ -4038,7 +4044,7 @@ behavior notes live in each adapter's README.
- `DELETE` `/v1.0/admin/edge/internetExplorerMode/siteLists/{browserSiteList-id}`
- `GET` `/v1.0/admin/edge/internetExplorerMode/siteLists/{browserSiteList-id}`
- `PATCH` `/v1.0/admin/edge/internetExplorerMode/siteLists/{browserSiteList-id}`
-… and 17475 more
+… and 17474 more
@@ -4065,6 +4071,7 @@ behavior notes live in each adapter's README.
- `GET` `/common/oauth2/v2.0/authorize` — query, stateful, errors
- `POST` `/common/oauth2/v2.0/token` — body, stateful, errors, clock
- `GET` `/common/discovery/v2.0/keys` — —
+- `GET` `/v1.0/me/photos/{size}/$value` — auth, stateful, errors, clock
- `GET` `/v1.0/me` — auth, stateful, clock
- `GET` `/v1.0/users` — query, auth, stateful, paginate, errors, clock
- `POST` `/v1.0/users` — body, auth, stateful, clock
@@ -4702,12 +4709,16 @@ behavior notes live in each adapter's README.
### github-style
-**Covered** — 26 routes · GraphQL schema
+**Covered** — 30 routes · GraphQL schema
Routes
| Method | Route |
|---|---|
+| GET | `/login/oauth/authorize` |
+| POST | `/login/oauth/access_token` |
+| GET | `/user` |
+| GET | `/user/emails` |
| GET | `/app` |
| GET | `/app/installations` |
| POST | `/app/installations/{installation_id}/access_tokens` |
@@ -4737,9 +4748,9 @@ behavior notes live in each adapter's README.
-**Provider surface** — derived from sdk octokit @ 5.0.5 (floor): 998 real routes · 23 covered · 2% · 971 not implemented
+**Provider surface** — derived from sdk octokit @ 5.0.5 (floor): 998 real routes · 25 covered · 2% · 969 not implemented
-not implemented (971)
+not implemented (969)
- `GET` `/advisories`
- `GET` `/advisories/{ghsa_id}`
@@ -4791,7 +4802,7 @@ behavior notes live in each adapter's README.
- `DELETE` `/enterprises/{enterprise}/teams/{team_slug}`
- `GET` `/enterprises/{enterprise}/teams/{team_slug}`
- `PATCH` `/enterprises/{enterprise}/teams/{team_slug}`
-… and 921 more
+… and 919 more
@@ -4799,15 +4810,16 @@ behavior notes live in each adapter's README.
**Missing** (7)
- No X-Hub-Signature (SHA-1) or X-GitHub-Delivery UUID webhook headers
-- No users, orgs, teams, or search endpoints
+- No users beyond OAuth self-profile/email, orgs, teams, or search endpoints
- No git data, contents, branches, or releases endpoints
- No PR review comments, files, or requested_reviewers endpoints
- No actions workflows, jobs, artifacts, or logs endpoints
- No webhook list/patch/delete or deliveries endpoints
- No GraphQL nodes or mutations beyond viewer, repository, issues, pulls
-**Deviations** (4)
+**Deviations** (5)
+- OAuth app sign-in auto-approves synthetic users and accepts any non-empty client secret; registration and scope enforcement not modeled
- POST /graphql served without the REST Bearer/PAT check (transport lacks auth hook)
- App JWT RS256 signature not verified; the credential store is the check
- Webhook body is a stunt {type, payload} envelope, not GitHub's bare event body
@@ -4815,6 +4827,10 @@ behavior notes live in each adapter's README.
Derived behavior tags (static — from scripts/*.star, not SDK-verified)
+- `GET` `/login/oauth/authorize` — query, stateful, errors, clock
+- `POST` `/login/oauth/access_token` — body, stateful, errors, clock
+- `GET` `/user` — auth, stateful
+- `GET` `/user/emails` — auth, stateful
- `GET` `/app` — auth, stateful, clock
- `GET` `/app/installations` — query, auth, stateful, paginate, clock
- `POST` `/app/installations/{installation_id}/access_tokens` — params, auth, stateful, clock
@@ -5258,12 +5274,14 @@ behavior notes live in each adapter's README.
### google-style
-**Covered** — 4 routes
+**Covered** — 6 routes
Routes
| Method | Route |
|---|---|
+| GET | `/o/oauth2/v2/auth` |
+| POST | `/token` |
| GET | `/o/oauth2/auth` |
| POST | `/o/oauth2/token` |
| GET | `/oauth2/v3/certs` |
@@ -5283,6 +5301,8 @@ behavior notes live in each adapter's README.
Derived behavior tags (static — from scripts/*.star, not SDK-verified)
+- `GET` `/o/oauth2/v2/auth` — query, stateful, errors
+- `POST` `/token` — body, stateful, errors, clock
- `GET` `/o/oauth2/auth` — query, stateful, errors
- `POST` `/o/oauth2/token` — body, stateful, errors, clock
- `GET` `/oauth2/v3/certs` — —
@@ -6090,10 +6110,9 @@ behavior notes live in each adapter's README.
-**Missing** (4)
+**Missing** (3)
- No embeddings (POST /v1/embeddings) or legacy completions endpoints
-- No Anthropic SSE streaming (stream:true only handled for OpenAI)
- No tool use, function calling, or JSON mode
- No image or multimodal content blocks
@@ -6101,7 +6120,7 @@ behavior notes live in each adapter's README.
- Responses deterministic: echo of the last user message; no model or randomness
- Reply derived solely from the last user message; earlier history ignored
-- stream:true (OpenAI) returns one SSE chunk plus [DONE], not token-by-token
+- stream:true returns the complete reply in one text delta, not token-by-token
Derived behavior tags (static — from scripts/*.star, not SDK-verified)
@@ -7520,12 +7539,14 @@ behavior notes live in each adapter's README.
### resend-style
-**Covered** — 6 routes
+**Covered** — 8 routes
Routes
| Method | Route |
|---|---|
+| POST | `/emails/batch` |
+| GET | `/domains` |
| POST | `/emails` |
| GET | `/emails` |
| GET | `/emails/{id}` |
@@ -7535,9 +7556,9 @@ behavior notes live in each adapter's README.
-**Provider surface** — derived from sdk resend-node @ 6.22.0 (floor): 20 real routes · 2 covered · 10% · 18 not implemented
+**Provider surface** — derived from sdk resend-node @ 6.22.0 (floor): 20 real routes · 3 covered · 15% · 17 not implemented
-not implemented (18)
+not implemented (17)
- `POST` `/api-keys`
- `POST` `/automations`
@@ -7547,7 +7568,6 @@ behavior notes live in each adapter's README.
- `POST` `/contacts/imports`
- `POST` `/domains`
- `POST` `/domains/claim`
-- `POST` `/emails/batch`
- `POST` `/events`
- `POST` `/events/send`
- `POST` `/segments`
@@ -7560,11 +7580,10 @@ behavior notes live in each adapter's README.
-**Missing** (6)
+**Missing** (5)
-- No domains surface (create, list, verify, delete)
+- Domain list is an authenticated empty result; no domain create, verify, or delete
- No API keys management (/api-keys)
-- No batch send (POST /emails/batch)
- No scheduled sends (schedule, cancel schedule)
- No audiences or contacts
- No broadcasts or tags
@@ -7577,6 +7596,8 @@ behavior notes live in each adapter's README.
Derived behavior tags (static — from scripts/*.star, not SDK-verified)
+- `POST` `/emails/batch` — body, auth, stateful, errors, clock
+- `GET` `/domains` — auth
- `POST` `/emails` — body, auth, stateful, clock
- `GET` `/emails` — query, auth, stateful, paginate, webhooks, errors, clock
- `GET` `/emails/{id}` — params, auth, stateful, webhooks, errors, clock
@@ -8033,7 +8054,7 @@ behavior notes live in each adapter's README.
Derived behavior tags (static — from scripts/*.star, not SDK-verified)
-- `GET` `/auth/authorize` — query, stateful, errors
+- `GET` `/auth/authorize` — query, stateful, errors, clock
- `POST` `/auth/token` — body, stateful, errors, clock
- `GET` `/auth/keys` — —
diff --git a/adapters/aws-s3-style/README.md b/adapters/aws-s3-style/README.md
index edf7239c..09d24a42 100644
--- a/adapters/aws-s3-style/README.md
+++ b/adapters/aws-s3-style/README.md
@@ -31,6 +31,9 @@ integration testing without a real AWS account:
`ListMultipartUploads` is not implemented, a client that has lost an upload
id cannot discover which upload is blocking the delete — `stunt reset
aws-s3-style` clears the service state.
+- **Head bucket:** `HEAD /{bucket}` verifies SigV4 and bucket existence.
+- **Copy object:** `PUT /{bucket}/{key}` with `x-amz-copy-source` copies bytes, content type and user metadata; `x-amz-metadata-directive: REPLACE` replaces metadata.
+- **Batch delete:** `POST /{bucket}?delete` deletes up to 1000 keys from the SDK XML envelope; missing keys succeed and `Quiet` suppresses successful entries.
- **Upload object:** `PUT /{bucket}/{key}` (body = object content) → `200` with `ETag`.
- **Download object:** `GET /{bucket}/{key}` → `200` with raw body.
- **Object metadata:** `HEAD /{bucket}/{key}` → `200` with `Content-Length`, `ETag`, `Last-Modified`.
@@ -359,3 +362,5 @@ api:
name: "Amazon S3 API"
version: "2006-03-01"
```
+
+CopyObject does not implement source conditions, version selection, tagging, ACL or encryption options. DeleteObjects supports the SDK Object/Key XML envelope; namespace-prefixed elements and numeric character references beyond the five XML entities are unsupported. Presigned PUT CRC32 checksum query parameters are accepted for SDK compatibility; checksum values are not verified.
diff --git a/adapters/aws-s3-style/adapter.yaml b/adapters/aws-s3-style/adapter.yaml
index 2d966f28..8532ca90 100644
--- a/adapters/aws-s3-style/adapter.yaml
+++ b/adapters/aws-s3-style/adapter.yaml
@@ -24,8 +24,12 @@ endpoints:
- route: /{bucket}
method: GET
handler: scripts/objects.star#on_list_or_location
- # Every bucket-level POST in S3 is unimplemented here — DeleteObjects
- # (?delete), CreateBucketMetadataConfiguration (?metadataConfiguration),
+ # HeadBucket authenticated connection probe.
+ - route: /{bucket}
+ method: HEAD
+ handler: scripts/buckets.star#on_head_bucket
+ # Bucket POST implements DeleteObjects (?delete); unsupported operations
+ # include CreateBucketMetadataConfiguration (?metadataConfiguration),
# CreateBucketMetadataTableConfiguration (?metadataTable), and the browser
# form POST Object. Routed so the answer is S3-shaped 501 XML rather than the
# JSON catch-all 404 below.
diff --git a/adapters/aws-s3-style/scripts/buckets.star b/adapters/aws-s3-style/scripts/buckets.star
index 7cd4317b..c160ff2e 100644
--- a/adapters/aws-s3-style/scripts/buckets.star
+++ b/adapters/aws-s3-style/scripts/buckets.star
@@ -71,8 +71,7 @@ def on_create_bucket(req):
"x-amz-request-id": _req_id(),
})
-# on_post_bucket handles POST /{bucket}. Every bucket-level POST in real S3 is
-# unimplemented here, so the route answers 501 for all of them:
+# on_post_bucket implements DeleteObjects; other bucket POST operations return 501:
# ?delete DeleteObjects (multi-object delete)
# ?metadataConfiguration CreateBucketMetadataConfiguration
# ?metadataTable CreateBucketMetadataTableConfiguration
@@ -88,8 +87,8 @@ def on_post_bucket(req):
bucket = _xml_escape(req["params"]["bucket"])
if _query_present_ci(req, "delete"):
- return _xml_error("NotImplemented", "DeleteObjects (POST /{bucket}?delete) is not implemented by this simulator.", bucket, 501)
- return _xml_error("NotImplemented", "No bucket-level POST is implemented by this simulator: DeleteObjects (?delete), CreateBucketMetadataConfiguration (?metadataConfiguration), CreateBucketMetadataTableConfiguration (?metadataTable) and browser form POST Object uploads are all unsupported.", bucket, 501)
+ return _delete_objects(req)
+ return _xml_error("NotImplemented", "Unsupported bucket-level POST: CreateBucketMetadataConfiguration (?metadataConfiguration), CreateBucketMetadataTableConfiguration (?metadataTable) and browser form POST Object uploads are all unsupported.", bucket, 501)
# _bucket_not_empty returns the real S3 409 BucketNotEmpty XML error. Built
# at the point of return rather than hoisted above the emptiness checks,
@@ -159,3 +158,15 @@ def on_delete_bucket(req):
return respond(204, "", {
"x-amz-request-id": _req_id(),
})
+
+
+# HeadBucket is an authenticated existence check used by connection probes.
+def on_head_bucket(req):
+ err = _require_auth(req)
+ if err != None:
+ return err
+ bucket = req["params"]["bucket"]
+ for b in store_collection("buckets").list():
+ if b.get("name", "") == bucket:
+ return respond(200, "", {"x-amz-bucket-region": b.get("region", "us-east-1")})
+ return _no_such_bucket_error(bucket)
diff --git a/adapters/aws-s3-style/scripts/lib.star b/adapters/aws-s3-style/scripts/lib.star
index b88aae82..65122f7d 100644
--- a/adapters/aws-s3-style/scripts/lib.star
+++ b/adapters/aws-s3-style/scripts/lib.star
@@ -885,7 +885,7 @@ def _reject_bucket_query(req, bucket):
# DELETE on an object are the most destructive routes in the API, and a denylist
# there would let one token added to S3 later silently re-open overwriting or
# destroying an object. Mirrors _reject_bucket_query for the same reason.
-_OBJECT_WRITE_PARAMS = ["partnumber", "uploadid", "x-id"]
+_OBJECT_WRITE_PARAMS = ["partnumber", "uploadid", "x-id", "x-amz-checksum-crc32", "x-amz-sdk-checksum-algorithm"]
# versionId is accepted on delete because the real SDK always sends it and,
# on a bucket with no versioning, any id addresses the single object — which is
# what real S3 does too. Without it, every versioned delete regressed from 204
@@ -901,7 +901,7 @@ _OBJECT_DELETE_PARAMS = ["uploadid", "x-id", "versionid"]
# returned 501 and the only route to clearing an in-progress upload — the thing
# that releases the 409 BucketNotEmpty on DeleteBucket — was closed off to
# every SDK client.
-_OBJECT_WRITE_OPS = ["putobject", "uploadpart"]
+_OBJECT_WRITE_OPS = ["putobject", "uploadpart", "copyobject"]
_OBJECT_DELETE_OPS = ["deleteobject", "abortmultipartupload"]
# POST /{bucket}/{key} carries CreateMultipartUpload (?uploads) and
@@ -941,7 +941,7 @@ def _query_val_ci(req, key):
# _reject_object_write_query allows only `allowed` on a mutating object route,
# and requires `x-id` to name one of `ops`. Checking the x-id VALUE matters as
# much as the key: an SDK sends `x-id=` on every call, so allowing
-# the key would let `?x-id=CopyObject` or `?x-id=RestoreObject` reach PutObject
+# the key would let `?x-id=RestoreObject` reach PutObject
# or DeleteObject and mutate the object behind a mis-selected operation. Call
# it BEFORE the ?uploadId / ?partNumber multipart dispatch, so that the dispatch
# cannot be reached with a subresource the allowlist should have refused —
@@ -1893,3 +1893,78 @@ def _check_preconditions(req, obj, bucket, key, op):
if lm_unix <= ims_ts:
return _not_modified(cur_etag, lm_unix, lm_valid)
return None
+
+# CopySource is a percent-encoded path, not a form/query value (+ stays +).
+def _copy_source_decode(text):
+ raw_bytes = crypto.base64_decode(_SIG_ALL_BYTES_B64)
+ out = ""
+ i = 0
+ while i < len(text):
+ if text[i] == "%":
+ if i + 2 >= len(text) or not _is_hex(text[i+1:i+3]):
+ return None
+ out += raw_bytes[int(text[i+1:i+3], 16)]
+ i += 3
+ else:
+ out += text[i]
+ i += 1
+ return out
+
+# Shared by single and batch deletion. Missing keys are successful no-ops.
+def _delete_stored_object(bucket, key):
+ obj = _find_object(bucket, key)
+ if obj != None:
+ store_collection("objects").delete(obj.get("id", ""))
+ bid = obj.get("bid", "")
+ if bid:
+ store_blob("s3-objects").delete(bid)
+
+# DeleteObjects accepts the same SDK XML envelope as multipart completion.
+# Validate the entire key list before mutating anything.
+def _delete_objects(req):
+ err = _require_auth(req)
+ if err != None:
+ return err
+ bucket = req["params"]["bucket"]
+ if not _query_present_ci(req, "delete"):
+ return _xml_error("NotImplemented", "The requested operation is not implemented", "/" + _xml_escape(bucket), 501)
+ for name in req.get("query", {}):
+ want = _ascii_lower(name)
+ if _is_presigned_param(name):
+ continue
+ if want not in ["delete", "x-id"] or (want == "x-id" and _ascii_lower(_query_val_ci(req, "x-id")) != "deleteobjects"):
+ return _xml_error("NotImplemented", "Unsupported DeleteObjects parameter", "/" + _xml_escape(bucket), 501)
+ found = False
+ for b in store_collection("buckets").list():
+ if b.get("name", "") == bucket:
+ found = True
+ if not found:
+ return _no_such_bucket_error(bucket)
+ raw = req.get("raw_body", "") or ""
+ keys = []
+ pos = 0
+ malformed = raw.find("") < 0
+ while True:
+ start = raw.find("", start)
+ if end < 0:
+ malformed = True
+ break
+ text = _xml_tag_text(raw[start:end], "Key")
+ if not text:
+ malformed = True
+ keys.append(_xml_unescape(text))
+ pos = end + len("")
+ if raw.find("") >= 0:
+ return _xml_error("NotImplemented", "Versioned batch deletion is not implemented", "/" + _xml_escape(bucket), 501)
+ if malformed or len(keys) == 0 or len(keys) > 1000:
+ return _xml_error("MalformedXML", "The XML you provided was not well-formed or did not validate against our published schema", "/" + _xml_escape(bucket), 400)
+ quiet = _xml_tag_text(raw, "Quiet") == "true"
+ xml = ''
+ for key in keys:
+ _delete_stored_object(bucket, key)
+ if not quiet:
+ xml += '' + _xml_escape(key) + ''
+ return respond(200, xml + '', {"Content-Type": "application/xml", "x-amz-request-id": _req_id()})
diff --git a/adapters/aws-s3-style/scripts/objects.star b/adapters/aws-s3-style/scripts/objects.star
index 48b5cbb6..86dc3b90 100644
--- a/adapters/aws-s3-style/scripts/objects.star
+++ b/adapters/aws-s3-style/scripts/objects.star
@@ -65,6 +65,9 @@ def on_put_object(req):
if unsupported != None:
return unsupported
+ if _query_present_ci(req, "uploadId") and (_ascii_lower(_query_val_ci(req, "x-id")) == "copyobject" or req.get("headers", {}).get("x-amz-copy-source", "")):
+ return _xml_error("NotImplemented", "UploadPartCopy is not implemented", _xml_escape("/" + bucket + "/" + key), 501)
+
# Multipart upload part (?partNumber=N&uploadId=...).
if _query_present_ci(req, "uploadId"):
return _mpu_upload_part(req, bucket, key)
@@ -79,6 +82,11 @@ def on_put_object(req):
if bucket_doc == None:
return _no_such_bucket_error(bucket)
+ if req.get("headers", {}).get("x-amz-copy-source", ""):
+ return _copy_object(req, bucket, key)
+ if _ascii_lower(_query_val_ci(req, "x-id")) == "copyobject":
+ return _invalid_argument("x-amz-copy-source", "", "CopyObject requires a copy source")
+
obj = _find_object(bucket, key)
cond = _check_preconditions(req, obj, bucket, key, "put")
if cond != None:
@@ -222,18 +230,7 @@ def on_delete_object(req):
if cond != None:
return cond
- oc = store_collection("objects")
- obj_id = None
- bid = None
- for o in oc.list():
- if o.get("bucket", "") == bucket and o.get("key", "") == key:
- obj_id = o.get("id", "")
- bid = o.get("bid", "")
- break
- if obj_id != None and obj_id != "":
- oc.delete(obj_id)
- if bid != None and bid != "":
- store_blob("s3-objects").delete(bid)
+ _delete_stored_object(bucket, key)
return respond(204, "", {
"x-amz-request-id": _req_id(),
@@ -499,3 +496,34 @@ def _no_such_key(bucket, key):
xml = xml + "" + _xml_escape(key) + ""
xml = xml + "" + _req_id() + ""
return respond(404, xml, {"Content-Type": "application/xml"})
+
+# CopyObject returns XML even though both ordinary PUT and copy use PUT.
+def _copy_object(req, bucket, key):
+ headers = req.get("headers", {})
+ source = _copy_source_decode(headers.get("x-amz-copy-source", ""))
+ if source == None:
+ return _invalid_argument("x-amz-copy-source", "", "Invalid copy source")
+ if source.startswith("/"):
+ source = source[1:]
+ split = source.find("/")
+ if split < 1:
+ return _invalid_argument("x-amz-copy-source", source, "Invalid copy source")
+ source_bucket, source_key = source[:split], source[split+1:]
+ obj = _find_object(source_bucket, source_key)
+ if obj == None:
+ return _no_such_key(source_bucket, source_key)
+ raw = store_blob("s3-objects").get(obj.get("bid", "")) or ""
+ directive = headers.get("x-amz-metadata-directive", "COPY")
+ if directive not in ["COPY", "REPLACE"]:
+ return _invalid_argument("x-amz-metadata-directive", directive, "Invalid metadata directive")
+ metadata = obj.get("metadata", {})
+ ct = obj.get("contentType", "application/octet-stream")
+ if directive == "REPLACE":
+ metadata, err = _collect_metadata(req)
+ if err != None:
+ return err
+ ct = headers.get("Content-Type", "application/octet-stream")
+ etag = _etag(raw)
+ _upsert_object(bucket, key, raw, ct, etag, metadata)
+ xml = '' + _unix_to_iso8601(clock.now_unix()) + '"' + etag + '"'
+ return respond(200, xml, {"Content-Type": "application/xml", "x-amz-request-id": _req_id()})
diff --git a/adapters/entra-id-style/README.md b/adapters/entra-id-style/README.md
index a9f756ad..a1a62716 100644
--- a/adapters/entra-id-style/README.md
+++ b/adapters/entra-id-style/README.md
@@ -51,3 +51,5 @@ stunt up
```
All data is synthetic. See [DISCLAIMER](DISCLAIMER).
+
+When `openid` is requested, token responses also include a real RS256 identity token with `oid`, `tid`, `sub`, `email`, `name`, issuer and audience claims. The synthetic tenant is `mock-tenant`. `GET /v1.0/me/photos/{size}/$value` validates the delegated bearer token then returns Graph `ImageNotFound`, modeling an account without a profile photo.
diff --git a/adapters/entra-id-style/adapter.yaml b/adapters/entra-id-style/adapter.yaml
index fb23c947..4af7c3fe 100644
--- a/adapters/entra-id-style/adapter.yaml
+++ b/adapters/entra-id-style/adapter.yaml
@@ -29,6 +29,11 @@ endpoints:
method: GET
handler: scripts/oauth.star#on_jwks
+ # A newly created synthetic user has no profile photo.
+ - route: /v1.0/me/photos/{size}/$value
+ method: GET
+ handler: scripts/graph.star#on_photo
+
# --- Graph /me (delegated identity) ---
- route: /v1.0/me
method: GET
diff --git a/adapters/entra-id-style/scripts/graph.star b/adapters/entra-id-style/scripts/graph.star
index 2a16d7b5..da48938f 100644
--- a/adapters/entra-id-style/scripts/graph.star
+++ b/adapters/entra-id-style/scripts/graph.star
@@ -260,3 +260,10 @@ def _seed_service_principals():
]
for sp in sps:
spc.insert(sp)
+
+# Missing photos are an ordinary Graph response, after bearer validation.
+def on_photo(req):
+ user, err = _require_bearer(req)
+ if err != None:
+ return err
+ return respond(404, {"error": {"code": "ImageNotFound", "message": "No photo is stored for this user."}})
diff --git a/adapters/entra-id-style/scripts/oauth.star b/adapters/entra-id-style/scripts/oauth.star
index eb4e0b6a..4cc4f6ad 100644
--- a/adapters/entra-id-style/scripts/oauth.star
+++ b/adapters/entra-id-style/scripts/oauth.star
@@ -75,7 +75,7 @@ def _issue_tokens(user, scope, aud):
rdoc["scope"] = scope
rc.insert(rdoc)
- return {
+ response = {
"token_type": "Bearer",
"scope": scope,
"expires_in": 3599,
@@ -84,6 +84,10 @@ def _issue_tokens(user, scope, aud):
"refresh_token": refresh,
}
+ if _contains(scope, "openid"):
+ response["id_token"] = _mint_id_token(user, aud)
+ return response
+
# --- handlers ---
# on_authorize handles the authorization-code redirect.
@@ -193,3 +197,12 @@ def on_jwks(req):
key["alg"] = "RS256"
key["use"] = "sig"
return respond(200, {"keys": [key]})
+
+# OIDC identity tokens are distinct from delegated Graph access tokens.
+def _mint_id_token(user, aud):
+ now = clock.now_unix()
+ claims = {"sub": user["id"], "oid": user["id"], "tid": "mock-tenant", "name": user["displayName"], "email": user["mail"], "email_verified": True, "iss": _JWT_ISS, "aud": aud, "iat": now, "exp": now + 3599}
+ header = crypto.base64url_encode(json.encode({"alg": "RS256", "typ": "JWT", "kid": _JWT_KID}))
+ payload = crypto.base64url_encode(json.encode(claims))
+ signing_input = header + "." + payload
+ return signing_input + "." + crypto.rsa_sign(_JWT_PRIVATE_KEY, signing_input, encoding="base64url")
diff --git a/adapters/github-style/README.md b/adapters/github-style/README.md
index daf8b21c..8f17aee1 100644
--- a/adapters/github-style/README.md
+++ b/adapters/github-style/README.md
@@ -287,3 +287,7 @@ real vocabulary) and the usual `workflow_run` `completed` delivery.
Issues, PRs, and workflow runs are seeded for `octocat/hello-world`. New records
created via POST persist for the server's lifetime.
+
+## OAuth app sign-in
+
+`GET /login/oauth/authorize` auto-approves a synthetic user and returns a single-use code, bound to client, redirect URI and optional PKCE verifier. `POST /login/oauth/access_token` exchanges it using form client credentials. `GET /user` and `GET /user/emails` accept that OAuth bearer token; the profile has a private email, so clients must consult the verified primary email list. OAuth clients accept any non-empty synthetic client secret; client registration, refresh/revocation and scope enforcement are not modeled. OAuth tokens are distinct from GitHub App installation tokens.
diff --git a/adapters/github-style/adapter.yaml b/adapters/github-style/adapter.yaml
index 2cbd560b..78cac57b 100644
--- a/adapters/github-style/adapter.yaml
+++ b/adapters/github-style/adapter.yaml
@@ -16,6 +16,20 @@ api:
# NOTE: literal routes must come BEFORE parameterized routes so they are
# matched first (the dispatch engine checks in declaration order).
endpoints:
+ # --- OAuth app social sign-in ---
+ - route: /login/oauth/authorize
+ method: GET
+ handler: scripts/oauth.star#on_authorize
+ - route: /login/oauth/access_token
+ method: POST
+ handler: scripts/oauth.star#on_token
+ - route: /user
+ method: GET
+ handler: scripts/oauth.star#on_user
+ - route: /user/emails
+ method: GET
+ handler: scripts/oauth.star#on_emails
+
# --- App metadata + installation token exchange ---
- route: /app
method: GET
@@ -133,6 +147,10 @@ graphql:
# Backing stores — collections for stateful data.
resources:
+ - name: oauth_codes
+ kind: collection
+ - name: oauth_tokens
+ kind: collection
- name: issues
kind: collection
- name: pulls
diff --git a/adapters/github-style/scripts/oauth.star b/adapters/github-style/scripts/oauth.star
new file mode 100644
index 00000000..95ef25e9
--- /dev/null
+++ b/adapters/github-style/scripts/oauth.star
@@ -0,0 +1,53 @@
+# Synthetic OAuth-app sign-in, separate from GitHub App installation tokens.
+def on_authorize(req):
+ q = req["query"]
+ client = q.get("client_id", "")
+ redirect = q.get("redirect_uri", "")
+ state = q.get("state", "")
+ if client == "" or redirect == "" or state == "":
+ return respond(400, {"error": "invalid_request"})
+ code = "stunt_oauth_code_" + str(store_kv_incr("oauth", "code_seq"))
+ store_collection("oauth_codes").insert({"id": code, "client_id": client, "redirect_uri": redirect, "scope": q.get("scope", ""), "code_challenge": q.get("code_challenge", ""), "code_challenge_method": q.get("code_challenge_method", "plain"), "expires_at": clock.now_unix() + 600})
+ sep = "&" if "?" in redirect else "?"
+ return respond(302, headers={"Location": redirect + sep + "code=" + code + "&state=" + state})
+
+def on_token(req):
+ body = req["body"] or {}
+ code = body.get("code", "")
+ codes = store_collection("oauth_codes")
+ doc = codes.get(code)
+ if doc == None or doc["expires_at"] <= clock.now_unix():
+ return respond(400, {"error": "bad_verification_code"})
+ if body.get("client_id", "") != doc["client_id"] or body.get("client_secret", "") == "" or body.get("redirect_uri", "") != doc["redirect_uri"]:
+ return respond(400, {"error": "incorrect_client_credentials"})
+ challenge = doc["code_challenge"]
+ if challenge != "":
+ verifier = body.get("code_verifier", "")
+ method = doc["code_challenge_method"]
+ actual = crypto.sha256(verifier, encoding="base64url") if method == "S256" else verifier
+ if method not in ["S256", "plain"] or actual != challenge:
+ return respond(400, {"error": "bad_verification_code"})
+ codes.delete(code)
+ seq = store_kv_incr("oauth", "token_seq")
+ token = "stunt_oauth_access_" + str(seq)
+ store_collection("oauth_tokens").insert({"id": token, "user_id": seq, "scope": doc["scope"]})
+ return respond(200, {"access_token": token, "token_type": "bearer", "scope": doc["scope"]})
+
+def _oauth_user(req):
+ auth = req["headers"].get("Authorization", "")
+ if not auth.startswith("Bearer "):
+ return None
+ return store_collection("oauth_tokens").get(auth[7:])
+
+def on_user(req):
+ user = _oauth_user(req)
+ if user == None:
+ return respond(401, {"message": "Bad credentials"})
+ uid = user["user_id"]
+ return respond(200, {"id": uid, "login": "stunt-user-" + str(uid), "name": "Stunt User " + str(uid), "email": None, "avatar_url": "https://avatars.example.test/stunt/" + str(uid)})
+
+def on_emails(req):
+ user = _oauth_user(req)
+ if user == None:
+ return respond(401, {"message": "Bad credentials"})
+ return respond(200, [{"email": "stunt-user-" + str(user["user_id"]) + "@example.test", "primary": True, "verified": True, "visibility": "private"}])
diff --git a/adapters/google-style/README.md b/adapters/google-style/README.md
index c461d99e..b3292a7e 100644
--- a/adapters/google-style/README.md
+++ b/adapters/google-style/README.md
@@ -86,3 +86,5 @@ services:
```
Then `stunt up` and make requests to the served address.
+
+Modern OAuth clients may use `GET /o/oauth2/v2/auth` and `POST /token`; the legacy `/o/oauth2/auth` and `/o/oauth2/token` paths remain supported.
diff --git a/adapters/google-style/adapter.yaml b/adapters/google-style/adapter.yaml
index df9b2bcd..5c94ab24 100644
--- a/adapters/google-style/adapter.yaml
+++ b/adapters/google-style/adapter.yaml
@@ -15,6 +15,12 @@ api:
# Endpoints — each maps a route + method to a Starlark handler.
endpoints:
# --- OAuth2 ---
+ - route: /o/oauth2/v2/auth
+ method: GET
+ handler: scripts/oauth.star#on_authorize
+ - route: /token
+ method: POST
+ handler: scripts/oauth.star#on_token
- route: /o/oauth2/auth
method: GET
handler: scripts/oauth.star#on_authorize
diff --git a/adapters/llm-style/README.md b/adapters/llm-style/README.md
index a944ea13..82b18986 100644
--- a/adapters/llm-style/README.md
+++ b/adapters/llm-style/README.md
@@ -37,8 +37,9 @@ This guarantees test stability — no randomness, no model, no network. Tests as
`choices[0].message.content` (OpenAI) or `content[0].text` (Anthropic) will always pass
with the same input.
-If the request sets `stream: true` (OpenAI only), the response is a single SSE data
-chunk followed by `data: [DONE]`.
+If the request sets `stream: true`, OpenAI returns one SSE data chunk followed by `data: [DONE]`; Anthropic returns its message-start, content-block, message-delta, and message-stop SSE events.
+
+`GET /v1/models` also accepts Anthropic `x-api-key` authentication and returns the Anthropic model-list envelope for those requests.
## Endpoints
diff --git a/adapters/llm-style/scripts/anthropic.star b/adapters/llm-style/scripts/anthropic.star
index a2483f38..851a8099 100644
--- a/adapters/llm-style/scripts/anthropic.star
+++ b/adapters/llm-style/scripts/anthropic.star
@@ -31,6 +31,20 @@ def on_messages(req):
n = store_kv_incr("llm", "message_seq")
message_id = "msg_stunt_" + str(n)
+ if body.get("stream", False):
+ events = [
+ {"type": "message_start", "message": {"id": message_id, "type": "message", "role": "assistant", "model": model, "content": [], "stop_reason": None, "stop_sequence": None, "usage": {"input_tokens": _est_tokens(user_msg), "output_tokens": 0}}},
+ {"type": "content_block_start", "index": 0, "content_block": {"type": "text", "text": ""}},
+ {"type": "content_block_delta", "index": 0, "delta": {"type": "text_delta", "text": reply}},
+ {"type": "content_block_stop", "index": 0},
+ {"type": "message_delta", "delta": {"stop_reason": "end_turn", "stop_sequence": None}, "usage": {"output_tokens": _est_tokens(reply)}},
+ {"type": "message_stop"},
+ ]
+ raw = ""
+ for event in events:
+ raw += "event: " + event["type"] + "\ndata: " + json.encode(event) + "\n\n"
+ return respond(200, raw, {"Content-Type": "text/event-stream", "Cache-Control": "no-cache"})
+
return respond(200, {
"id": message_id,
"type": "message",
diff --git a/adapters/llm-style/scripts/openai.star b/adapters/llm-style/scripts/openai.star
index 0041f5dd..f95807e2 100644
--- a/adapters/llm-style/scripts/openai.star
+++ b/adapters/llm-style/scripts/openai.star
@@ -70,6 +70,11 @@ def on_chat_completions(req):
# last object returned). The response carries the OpenAI-canonical has_more
# flag; the client passes the last id back as `after` to fetch the next page.
def on_list_models(req):
+ if req.headers.get("x-api-key", "") != "":
+ err = _require_api_key(req)
+ if err != None:
+ return err
+ return respond(200, {"data": [{"id": "claude-sonnet-4-20250514", "type": "model", "display_name": "Synthetic Claude", "created_at": "2025-05-14T00:00:00Z"}], "has_more": False, "first_id": "claude-sonnet-4-20250514", "last_id": "claude-sonnet-4-20250514"})
err = _require_bearer(req)
if err != None:
return err
diff --git a/adapters/resend-style/README.md b/adapters/resend-style/README.md
index 1aef45d7..f6d11b56 100644
--- a/adapters/resend-style/README.md
+++ b/adapters/resend-style/README.md
@@ -15,6 +15,8 @@ develop and test email-sending client code locally — assert that an email was
"sent", retrieve it, and list all sent emails — without creating a real Resend
account or hitting the network.
+- **Batch:** `POST /emails/batch` accepts 1–100 email objects, stores each through the single-send path, and returns `{data: [{id}, ...]}`.
+- **Domains:** `GET /domains` returns an authenticated empty list for connection checks; domain management is not simulated.
- **Send:** `POST /emails` with `{from, to, subject, html, text, ...}` → `{id}`.
- **Retrieve:** `GET /emails/{id}` returns the stored email (useful for test
assertions that an email was sent).
diff --git a/adapters/resend-style/adapter.yaml b/adapters/resend-style/adapter.yaml
index af324c13..a80a35f1 100644
--- a/adapters/resend-style/adapter.yaml
+++ b/adapters/resend-style/adapter.yaml
@@ -16,6 +16,13 @@ api:
# NOTE: literal routes must come BEFORE parameterized routes so they are
# matched first (the dispatch engine checks in declaration order).
endpoints:
+ - route: /emails/batch
+ method: POST
+ handler: scripts/emails.star#on_send_batch
+ - route: /domains
+ method: GET
+ handler: scripts/domains.star#on_list_domains
+
# --- Send email ---
- route: /emails
method: POST
diff --git a/adapters/resend-style/scripts/domains.star b/adapters/resend-style/scripts/domains.star
new file mode 100644
index 00000000..299bbc55
--- /dev/null
+++ b/adapters/resend-style/scripts/domains.star
@@ -0,0 +1,6 @@
+# Read-only connection probe; a fresh simulator owns no verified domains.
+def on_list_domains(req):
+ err = _require_auth(req)
+ if err != None:
+ return err
+ return respond(200, {"object": "list", "data": [], "has_more": False})
diff --git a/adapters/resend-style/scripts/emails.star b/adapters/resend-style/scripts/emails.star
index 51555c29..ca85e838 100644
--- a/adapters/resend-style/scripts/emails.star
+++ b/adapters/resend-style/scripts/emails.star
@@ -166,3 +166,20 @@ def _event_payload(event_type, email_id, doc):
"created_at": doc["created_at"],
},
}
+
+# Batch uses the same send path and persistence as individual sends.
+def on_send_batch(req):
+ err = _require_auth(req)
+ if err != None:
+ return err
+ emails = (req.body or {}).get("_batch", [])
+ if type(emails) != "list" or len(emails) == 0 or len(emails) > 100:
+ return respond(422, {"name": "validation_error", "message": "Batch must contain between 1 and 100 emails.", "statusCode": 422})
+ for email in emails:
+ if type(email) != "dict":
+ return respond(422, {"name": "validation_error", "message": "Each batch entry must be an email object.", "statusCode": 422})
+ data = []
+ for email in emails:
+ result = on_send_email({"headers": req.headers, "body": email})
+ data.append(result["body"])
+ return respond(200, {"data": data})
diff --git a/adapters/signin-with-apple-style/README.md b/adapters/signin-with-apple-style/README.md
index cedcef11..576a52bc 100644
--- a/adapters/signin-with-apple-style/README.md
+++ b/adapters/signin-with-apple-style/README.md
@@ -79,3 +79,5 @@ services:
```
Then `stunt up` and run through the OAuth2 flow.
+
+`response_type=code id_token` with `response_mode=form_post` returns an auto-submitting HTML form with escaped `code`, `state` and `id_token` fields. The front-channel and exchanged ID tokens identify the same synthetic user. The original code-only redirect remains supported.
diff --git a/adapters/signin-with-apple-style/scripts/oauth.star b/adapters/signin-with-apple-style/scripts/oauth.star
index c5e1bc08..ef76d421 100644
--- a/adapters/signin-with-apple-style/scripts/oauth.star
+++ b/adapters/signin-with-apple-style/scripts/oauth.star
@@ -22,14 +22,20 @@ def on_authorize(req):
"error_description": "missing required parameters (client_id, redirect_uri)",
})
- if response_type != "code":
+ if response_type not in ["code", "code id_token"]:
return respond(400, {
"error": "unsupported_response_type",
})
+ if response_type == "code id_token" and req["query"].get("response_mode", "") != "form_post":
+ return respond(400, {"error": "unsupported_response_mode"})
+
code_seq = store_kv_incr("siwa", "code_seq")
code = "c." + str(code_seq) + "." + "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
+ user_id = _generate_user_id()
+ email = _generate_email(_to_int(store_kv_get("siwa", "user_seq")))
+
# Store the auth code (single-use).
cc = store_collection("auth_codes")
cc.insert({
@@ -37,6 +43,8 @@ def on_authorize(req):
"client_id": client_id,
"redirect_uri": redirect_uri,
"scope": req["query"].get("scope", ""),
+ "user_id": user_id,
+ "email": email,
})
sep = "?"
@@ -48,6 +56,15 @@ def on_authorize(req):
if state != "":
location = location + "&state=" + state
+ if req["query"].get("response_mode", "") == "form_post":
+ fields = {"code": code, "state": state}
+ if response_type == "code id_token":
+ fields["id_token"] = _mint_id_token(client_id, user_id, email)
+ body = ''
+ return respond(200, body, {"Content-Type": "text/html; charset=utf-8", "Cache-Control": "no-store"})
return respond(302, headers={"Location": location})
# on_token handles both authorization_code and refresh_token grants.
@@ -106,11 +123,8 @@ def _handle_auth_code(body):
cc.delete(code)
# Mint tokens.
- user_id = _generate_user_id()
- user_seq = store_kv_get("siwa", "user_seq")
- if user_seq == None:
- user_seq = "1"
- email = _generate_email(_to_int(user_seq))
+ user_id = code_doc["user_id"]
+ email = code_doc["email"]
access_seq = store_kv_incr("siwa", "access_seq")
refresh_seq = store_kv_incr("siwa", "refresh_seq")
@@ -198,3 +212,7 @@ def on_get_keys(req):
key["use"] = "sig"
key["alg"] = "ES256"
return respond(200, {"keys": [key]})
+
+# Hidden field values and the form action can contain caller-controlled text.
+def _html_escape(value):
+ return value.replace("&", "&").replace('"', """).replace("<", "<").replace(">", ">").replace("'", "'")
diff --git a/conformance/aws_storage_test.go b/conformance/aws_storage_test.go
new file mode 100644
index 00000000..fa1c8e39
--- /dev/null
+++ b/conformance/aws_storage_test.go
@@ -0,0 +1,83 @@
+package conformance
+
+import (
+ "bytes"
+ "context"
+ "io"
+ "net/url"
+ "testing"
+
+ "github.com/aws/aws-sdk-go-v2/config"
+ "github.com/aws/aws-sdk-go-v2/credentials"
+ "github.com/aws/aws-sdk-go-v2/service/s3"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+)
+
+func TestAWSS3StorageOperations(t *testing.T) {
+ ctx := context.Background()
+ endpoint := Boot(t, "aws-s3-style")
+ cfg, err := config.LoadDefaultConfig(ctx, config.WithRegion("us-east-1"), config.WithCredentialsProvider(credentials.NewStaticCredentialsProvider("AKIAIOSFODNN7EXAMPLE", "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", "")))
+ if err != nil {
+ t.Fatal(err)
+ }
+ client := s3.NewFromConfig(cfg, func(o *s3.Options) { o.BaseEndpoint = &endpoint; o.UsePathStyle = true })
+ bucket := "storage-contract"
+ if _, err := client.CreateBucket(ctx, &s3.CreateBucketInput{Bucket: &bucket}); err != nil {
+ t.Fatal(err)
+ }
+ if _, err := client.HeadBucket(ctx, &s3.HeadBucketInput{Bucket: &bucket}); err != nil {
+ t.Fatalf("HeadBucket: %v", err)
+ }
+ if _, err := client.HeadBucket(ctx, &s3.HeadBucketInput{Bucket: ptr("missing-bucket")}); err == nil {
+ t.Fatal("missing HeadBucket succeeded")
+ }
+ Record(t, "aws-sdk-go-v2", "aws-s3-style", "HeadBucket existence probe")
+
+ source, destination := "copy/a +&é.bin", "copy/destination.bin"
+ body := []byte{0, 127, 128, 255}
+ if _, err := client.PutObject(ctx, &s3.PutObjectInput{Bucket: &bucket, Key: &source, Body: bytes.NewReader(body), ContentType: ptr("application/octet-stream"), Metadata: map[string]string{"owner": "synthetic"}}); err != nil {
+ t.Fatal(err)
+ }
+ copySource := bucket + "/" + url.PathEscape(source)
+ copied, err := client.CopyObject(ctx, &s3.CopyObjectInput{Bucket: &bucket, Key: &destination, CopySource: ©Source})
+ if err != nil {
+ t.Fatalf("CopyObject: %v", err)
+ }
+ if copied.CopyObjectResult == nil || copied.CopyObjectResult.ETag == nil {
+ t.Fatal("CopyObject result missing ETag")
+ }
+ got, err := client.GetObject(ctx, &s3.GetObjectInput{Bucket: &bucket, Key: &destination})
+ if err != nil {
+ t.Fatal(err)
+ }
+ actual, err := io.ReadAll(got.Body)
+ got.Body.Close()
+ if err != nil || !bytes.Equal(body, actual) || got.Metadata["owner"] != "synthetic" {
+ t.Fatalf("copy bytes/metadata: %x %v %v", actual, got.Metadata, err)
+ }
+ if _, err := client.HeadObject(ctx, &s3.HeadObjectInput{Bucket: &bucket, Key: &source}); err != nil {
+ t.Fatalf("copy removed source: %v", err)
+ }
+ if _, err := client.CopyObject(ctx, &s3.CopyObjectInput{Bucket: &bucket, Key: ptr("missing-copy"), CopySource: ptr(bucket + "/missing")}); err == nil {
+ t.Fatal("copy of missing source succeeded")
+ }
+ Record(t, "aws-sdk-go-v2", "aws-s3-style", "CopyObject preserves binary bytes and user metadata; missing source refused")
+
+ result, err := client.DeleteObjects(ctx, &s3.DeleteObjectsInput{Bucket: &bucket, Delete: &types.Delete{Objects: []types.ObjectIdentifier{{Key: &source}, {Key: &destination}, {Key: ptr("absent")}}}})
+ if err != nil {
+ t.Fatalf("DeleteObjects: %v", err)
+ }
+ if len(result.Deleted) != 3 || len(result.Errors) != 0 {
+ t.Fatalf("DeleteObjects result: %+v", result)
+ }
+ for _, key := range []string{source, destination} {
+ if _, err := client.HeadObject(ctx, &s3.HeadObjectInput{Bucket: &bucket, Key: &key}); err == nil {
+ t.Fatalf("deleted object %q remains", key)
+ }
+ }
+ quiet, err := client.DeleteObjects(ctx, &s3.DeleteObjectsInput{Bucket: &bucket, Delete: &types.Delete{Quiet: ptr(true), Objects: []types.ObjectIdentifier{{Key: ptr("absent")}}}})
+ if err != nil || len(quiet.Deleted) != 0 {
+ t.Fatalf("quiet DeleteObjects: %+v %v", quiet, err)
+ }
+ Record(t, "aws-sdk-go-v2", "aws-s3-style", "DeleteObjects existing and missing keys, XML escaping and quiet mode")
+}
diff --git a/conformance/matrix.json b/conformance/matrix.json
index b06128db..16833136 100644
--- a/conformance/matrix.json
+++ b/conformance/matrix.json
@@ -1,7 +1,7 @@
{
"summary": {
"adapters": 99,
- "checks": 241,
+ "checks": 244,
"tiers": {
"sdk_and_vm": 2,
"sdk_only": 34,
@@ -9363,7 +9363,7 @@
"real_hosts": [],
"api_name": "Amazon S3 API",
"api_version": "2006-03-01",
- "routes": 9,
+ "routes": 10,
"verification": "SDK",
"sdks": [
{
@@ -9373,6 +9373,9 @@
}
],
"behaviors": [
+ "HeadBucket existence probe",
+ "CopyObject preserves binary bytes and user metadata; missing source refused",
+ "DeleteObjects existing and missing keys, XML escaping and quiet mode",
"CreateBucket",
"PutObject (binary body)",
"GetObject byte-exact round-trip (incl. non-UTF-8)",
@@ -9393,11 +9396,10 @@
"missing": [
"No bucket policy, tagging, ACL, CORS, lifecycle, or website subresources",
"No object versioning (?versions listing, versionId delete) or object lock",
- "No CopyObject (x-amz-copy-source) or UploadPartCopy",
+ "No UploadPartCopy; CopyObject supports COPY/REPLACE user metadata but not source conditional headers, version selection, tagging, ACL or encryption options",
"No browser form POST uploads (POST policy) — POST /{bucket} returns 501 NotImplemented when SigV4-signed, but a real browser form upload (which authenticates with form fields, so carries no Authorization header) is refused earlier with 403 MissingSecurityHeader",
"No object-lock configuration subresource (?object-lock) on the bucket",
"No ListMultipartUploads (GET /{bucket}?uploads returns 501 NotImplemented)",
- "No multi-object DeleteObjects (POST /{bucket}?delete returns 501 NotImplemented)",
"No object-level subresources: ?acl, ?tagging, ?retention, ?legal-hold, ?torrent, ?attributes, ?annotation, ?encryption — 501 NotImplemented rather than falling through to the object operation",
"No SelectObjectContent (?select) or RestoreObject (?restore) — POST verbs, answered 501 NotImplemented (a bare POST /{bucket}/{key} with no query is 405)"
],
@@ -9409,14 +9411,15 @@
"Unimplemented subresources return 501 NotImplemented rather than falling through to the object operation on the same route. The mutating routes use an allowlist and reject every query parameter except the SigV4 presigned-auth ones and the route's own; the read routes use a denylist. The guard runs before the multipart dispatch",
"Starlark handlers are step-bounded: a single ListObjectsV2 or DeleteBucket over a large enough bucket exhausts the budget and returns a JSON 500 rather than S3 XML. The reachable threshold for ListObjectsV2 is a few hundred objects in one un-paginated page; DeleteBucket did not reproduce it in a few hundred rows",
"x-amz-meta-* suffixes are lowercased and the first occurrence wins",
- "On mutating routes (bucket PUT/DELETE, object PUT/POST/DELETE) x-id must name an operation this adapter routes; the SDK's x-id=CopyObject, x-id=RestoreObject, x-id=SelectObjectContent, x-id=PutObjectLegalHold and x-id=UploadPartCopy all return 501 rather than falling through. AbortMultipartUpload is routed and must not be refused",
- "CopyObject selected by the x-amz-copy-source header alone, with no x-id query parameter, still writes a zero-byte object; the query allowlist cannot see a header-selected subresource",
+ "On mutating routes (bucket PUT/DELETE, object PUT/POST/DELETE) x-id must name an operation this adapter routes; the SDK's x-id=RestoreObject, x-id=SelectObjectContent, x-id=PutObjectLegalHold and x-id=UploadPartCopy all return 501 rather than falling through. AbortMultipartUpload is routed and must not be refused",
"PUT /{bucket}/{key}?partNumber=N without uploadId returns 400 InvalidRequest rather than falling through to PutObject",
"Per-chunk STREAMING signatures not verified (header SigV4 only)",
"Streaming checksum trailers discarded (unsupported-checksum)",
"DELETE object against a missing bucket is 204 (real S3: 404 NoSuchBucket)",
"GET/HEAD object against a missing bucket is 404 NoSuchKey (real S3: 404 NoSuchBucket)",
"SigV4 canonical URI/query rebuilt from decoded values — duplicates indistinguishable",
+ "Presigned PUT accepts JS SDK CRC32 checksum query parameters but does not validate checksum values",
+ "DeleteObjects XML parsing supports the SDK Object/Key envelope and named XML entities; numeric character references beyond the five XML entities and namespace-prefixed elements are unsupported",
"No RFC 1123 Date fallback; canonical header whitespace collapsing not applied"
],
"covered": [
@@ -9424,6 +9427,10 @@
"method": "GET",
"route": "/{bucket}"
},
+ {
+ "method": "HEAD",
+ "route": "/{bucket}"
+ },
{
"method": "POST",
"route": "/{bucket}"
@@ -9471,6 +9478,17 @@
"clock"
]
},
+ {
+ "method": "HEAD",
+ "route": "/{bucket}",
+ "tags": [
+ "query",
+ "params",
+ "stateful",
+ "errors",
+ "clock"
+ ]
+ },
{
"method": "POST",
"route": "/{bucket}",
@@ -9478,6 +9496,7 @@
"query",
"params",
"stateful",
+ "errors",
"clock"
]
},
@@ -29938,7 +29957,7 @@
"real_hosts": [],
"api_name": "Microsoft Graph / Entra ID",
"api_version": "v1.0",
- "routes": 9,
+ "routes": 10,
"verification": "SDK",
"sdks": [
{
@@ -29985,6 +30004,10 @@
"method": "GET",
"route": "/common/discovery/v2.0/keys"
},
+ {
+ "method": "GET",
+ "route": "/v1.0/me/photos/{size}/$value"
+ },
{
"method": "GET",
"route": "/v1.0/me"
@@ -30013,7 +30036,7 @@
"surface": {
"source": "spec msgraph-metadata v1.0 @ v1.0",
"provider_routes": 17531,
- "covered_routes": 6,
+ "covered_routes": 7,
"coverage_pct": 0,
"missing_routes": [
{
@@ -74620,10 +74643,6 @@
"method": "DELETE",
"route": "/v1.0/me/photos/{profilePhoto-id}/$value"
},
- {
- "method": "GET",
- "route": "/v1.0/me/photos/{profilePhoto-id}/$value"
- },
{
"method": "PUT",
"route": "/v1.0/me/photos/{profilePhoto-id}/$value"
@@ -100144,6 +100163,16 @@
"route": "/common/discovery/v2.0/keys",
"tags": []
},
+ {
+ "method": "GET",
+ "route": "/v1.0/me/photos/{size}/$value",
+ "tags": [
+ "auth",
+ "stateful",
+ "errors",
+ "clock"
+ ]
+ },
{
"method": "GET",
"route": "/v1.0/me",
@@ -102770,7 +102799,7 @@
"real_hosts": [],
"api_name": "GitHub REST + GraphQL API",
"api_version": "2022-11-28",
- "routes": 26,
+ "routes": 30,
"graphql": true,
"verification": "SDK",
"sdks": [
@@ -102795,7 +102824,7 @@
],
"missing": [
"No X-Hub-Signature (SHA-1) or X-GitHub-Delivery UUID webhook headers",
- "No users, orgs, teams, or search endpoints",
+ "No users beyond OAuth self-profile/email, orgs, teams, or search endpoints",
"No git data, contents, branches, or releases endpoints",
"No PR review comments, files, or requested_reviewers endpoints",
"No actions workflows, jobs, artifacts, or logs endpoints",
@@ -102803,12 +102832,29 @@
"No GraphQL nodes or mutations beyond viewer, repository, issues, pulls"
],
"deviations": [
+ "OAuth app sign-in auto-approves synthetic users and accepts any non-empty client secret; registration and scope enforcement not modeled",
"POST /graphql served without the REST Bearer/PAT check (transport lacks auth hook)",
"App JWT RS256 signature not verified; the credential store is the check",
"Webhook body is a stunt {type, payload} envelope, not GitHub's bare event body",
"Runs advance on fixed clock (queued+1s, in_progress+3s); dispatch takes simulate_fail"
],
"covered": [
+ {
+ "method": "GET",
+ "route": "/login/oauth/authorize"
+ },
+ {
+ "method": "POST",
+ "route": "/login/oauth/access_token"
+ },
+ {
+ "method": "GET",
+ "route": "/user"
+ },
+ {
+ "method": "GET",
+ "route": "/user/emails"
+ },
{
"method": "GET",
"route": "/app"
@@ -102917,7 +102963,7 @@
"surface": {
"source": "sdk octokit @ 5.0.5 (floor)",
"provider_routes": 998,
- "covered_routes": 23,
+ "covered_routes": 25,
"coverage_pct": 2,
"missing_routes": [
{
@@ -106228,10 +106274,6 @@
"method": "GET",
"route": "/search/users"
},
- {
- "method": "GET",
- "route": "/user"
- },
{
"method": "PATCH",
"route": "/user"
@@ -106344,10 +106386,6 @@
"method": "DELETE",
"route": "/user/emails"
},
- {
- "method": "GET",
- "route": "/user/emails"
- },
{
"method": "POST",
"route": "/user/emails"
@@ -106808,6 +106846,42 @@
"derived": true
},
"derived_behaviors": [
+ {
+ "method": "GET",
+ "route": "/login/oauth/authorize",
+ "tags": [
+ "query",
+ "stateful",
+ "errors",
+ "clock"
+ ]
+ },
+ {
+ "method": "POST",
+ "route": "/login/oauth/access_token",
+ "tags": [
+ "body",
+ "stateful",
+ "errors",
+ "clock"
+ ]
+ },
+ {
+ "method": "GET",
+ "route": "/user",
+ "tags": [
+ "auth",
+ "stateful"
+ ]
+ },
+ {
+ "method": "GET",
+ "route": "/user/emails",
+ "tags": [
+ "auth",
+ "stateful"
+ ]
+ },
{
"method": "GET",
"route": "/app",
@@ -109298,7 +109372,7 @@
"real_hosts": [],
"api_name": "Google OAuth2 API",
"api_version": "v2",
- "routes": 4,
+ "routes": 6,
"verification": "SDK",
"sdks": [
{
@@ -109330,6 +109404,14 @@
"id_tokens signed by a fixed synthetic RSA key (kid mock-google-key-1)"
],
"covered": [
+ {
+ "method": "GET",
+ "route": "/o/oauth2/v2/auth"
+ },
+ {
+ "method": "POST",
+ "route": "/token"
+ },
{
"method": "GET",
"route": "/o/oauth2/auth"
@@ -109348,6 +109430,25 @@
}
],
"derived_behaviors": [
+ {
+ "method": "GET",
+ "route": "/o/oauth2/v2/auth",
+ "tags": [
+ "query",
+ "stateful",
+ "errors"
+ ]
+ },
+ {
+ "method": "POST",
+ "route": "/token",
+ "tags": [
+ "body",
+ "stateful",
+ "errors",
+ "clock"
+ ]
+ },
{
"method": "GET",
"route": "/o/oauth2/auth",
@@ -116580,14 +116681,13 @@
],
"missing": [
"No embeddings (POST /v1/embeddings) or legacy completions endpoints",
- "No Anthropic SSE streaming (stream:true only handled for OpenAI)",
"No tool use, function calling, or JSON mode",
"No image or multimodal content blocks"
],
"deviations": [
"Responses deterministic: echo of the last user message; no model or randomness",
"Reply derived solely from the last user message; earlier history ignored",
- "stream:true (OpenAI) returns one SSE chunk plus [DONE], not token-by-token"
+ "stream:true returns the complete reply in one text delta, not token-by-token"
],
"covered": [
{
@@ -194950,7 +195050,7 @@
"real_hosts": [],
"api_name": "Resend API",
"api_version": "1.0.0",
- "routes": 6,
+ "routes": 8,
"verification": "SDK",
"sdks": [
{
@@ -194966,9 +195066,8 @@
"delivery state derives on read (sent -\u003e delivered)"
],
"missing": [
- "No domains surface (create, list, verify, delete)",
+ "Domain list is an authenticated empty result; no domain create, verify, or delete",
"No API keys management (/api-keys)",
- "No batch send (POST /emails/batch)",
"No scheduled sends (schedule, cancel schedule)",
"No audiences or contacts",
"No broadcasts or tags"
@@ -194979,6 +195078,14 @@
"Webhook events fire exactly once on the first deriving read, not on real delivery"
],
"covered": [
+ {
+ "method": "POST",
+ "route": "/emails/batch"
+ },
+ {
+ "method": "GET",
+ "route": "/domains"
+ },
{
"method": "POST",
"route": "/emails"
@@ -195007,8 +195114,8 @@
"surface": {
"source": "sdk resend-node @ 6.22.0 (floor)",
"provider_routes": 20,
- "covered_routes": 2,
- "coverage_pct": 10,
+ "covered_routes": 3,
+ "coverage_pct": 15,
"missing_routes": [
{
"method": "POST",
@@ -195042,10 +195149,6 @@
"method": "POST",
"route": "/domains/claim"
},
- {
- "method": "POST",
- "route": "/emails/batch"
- },
{
"method": "POST",
"route": "/events"
@@ -195086,6 +195189,24 @@
"derived": true
},
"derived_behaviors": [
+ {
+ "method": "POST",
+ "route": "/emails/batch",
+ "tags": [
+ "body",
+ "auth",
+ "stateful",
+ "errors",
+ "clock"
+ ]
+ },
+ {
+ "method": "GET",
+ "route": "/domains",
+ "tags": [
+ "auth"
+ ]
+ },
{
"method": "POST",
"route": "/emails",
@@ -197117,7 +197238,8 @@
"tags": [
"query",
"stateful",
- "errors"
+ "errors",
+ "clock"
]
},
{
diff --git a/conformance/matrix.yaml b/conformance/matrix.yaml
index 468b8249..a011ad84 100644
--- a/conformance/matrix.yaml
+++ b/conformance/matrix.yaml
@@ -156,23 +156,23 @@ adapters:
- "Unimplemented subresources return 501 NotImplemented rather than falling through to the object operation on the same route. The mutating routes use an allowlist and reject every query parameter except the SigV4 presigned-auth ones and the route's own; the read routes use a denylist. The guard runs before the multipart dispatch"
- "Starlark handlers are step-bounded: a single ListObjectsV2 or DeleteBucket over a large enough bucket exhausts the budget and returns a JSON 500 rather than S3 XML. The reachable threshold for ListObjectsV2 is a few hundred objects in one un-paginated page; DeleteBucket did not reproduce it in a few hundred rows"
- "x-amz-meta-* suffixes are lowercased and the first occurrence wins"
- - "On mutating routes (bucket PUT/DELETE, object PUT/POST/DELETE) x-id must name an operation this adapter routes; the SDK's x-id=CopyObject, x-id=RestoreObject, x-id=SelectObjectContent, x-id=PutObjectLegalHold and x-id=UploadPartCopy all return 501 rather than falling through. AbortMultipartUpload is routed and must not be refused"
- - "CopyObject selected by the x-amz-copy-source header alone, with no x-id query parameter, still writes a zero-byte object; the query allowlist cannot see a header-selected subresource"
+ - "On mutating routes (bucket PUT/DELETE, object PUT/POST/DELETE) x-id must name an operation this adapter routes; the SDK's x-id=RestoreObject, x-id=SelectObjectContent, x-id=PutObjectLegalHold and x-id=UploadPartCopy all return 501 rather than falling through. AbortMultipartUpload is routed and must not be refused"
- "PUT /{bucket}/{key}?partNumber=N without uploadId returns 400 InvalidRequest rather than falling through to PutObject"
- "Per-chunk STREAMING signatures not verified (header SigV4 only)"
- "Streaming checksum trailers discarded (unsupported-checksum)"
- "DELETE object against a missing bucket is 204 (real S3: 404 NoSuchBucket)"
- "GET/HEAD object against a missing bucket is 404 NoSuchKey (real S3: 404 NoSuchBucket)"
- "SigV4 canonical URI/query rebuilt from decoded values — duplicates indistinguishable"
+ - "Presigned PUT accepts JS SDK CRC32 checksum query parameters but does not validate checksum values"
+ - "DeleteObjects XML parsing supports the SDK Object/Key envelope and named XML entities; numeric character references beyond the five XML entities and namespace-prefixed elements are unsupported"
- "No RFC 1123 Date fallback; canonical header whitespace collapsing not applied"
missing:
- "No bucket policy, tagging, ACL, CORS, lifecycle, or website subresources"
- "No object versioning (?versions listing, versionId delete) or object lock"
- - "No CopyObject (x-amz-copy-source) or UploadPartCopy"
+ - "No UploadPartCopy; CopyObject supports COPY/REPLACE user metadata but not source conditional headers, version selection, tagging, ACL or encryption options"
- "No browser form POST uploads (POST policy) — POST /{bucket} returns 501 NotImplemented when SigV4-signed, but a real browser form upload (which authenticates with form fields, so carries no Authorization header) is refused earlier with 403 MissingSecurityHeader"
- "No object-lock configuration subresource (?object-lock) on the bucket"
- "No ListMultipartUploads (GET /{bucket}?uploads returns 501 NotImplemented)"
- - "No multi-object DeleteObjects (POST /{bucket}?delete returns 501 NotImplemented)"
- "No object-level subresources: ?acl, ?tagging, ?retention, ?legal-hold, ?torrent, ?attributes, ?annotation, ?encryption — 501 NotImplemented rather than falling through to the object operation"
- "No SelectObjectContent (?select) or RestoreObject (?restore) — POST verbs, answered 501 NotImplemented (a bare POST /{bucket}/{key} with no query is 405)"
azure-devops-style:
@@ -514,13 +514,14 @@ adapters:
- "No createTable or other table requests (insertTableRow, updateTableCellStyle)"
github-style:
deviations:
+ - "OAuth app sign-in auto-approves synthetic users and accepts any non-empty client secret; registration and scope enforcement not modeled"
- "POST /graphql served without the REST Bearer/PAT check (transport lacks auth hook)"
- "App JWT RS256 signature not verified; the credential store is the check"
- "Webhook body is a stunt {type, payload} envelope, not GitHub's bare event body"
- "Runs advance on fixed clock (queued+1s, in_progress+3s); dispatch takes simulate_fail"
missing:
- "No X-Hub-Signature (SHA-1) or X-GitHub-Delivery UUID webhook headers"
- - "No users, orgs, teams, or search endpoints"
+ - "No users beyond OAuth self-profile/email, orgs, teams, or search endpoints"
- "No git data, contents, branches, or releases endpoints"
- "No PR review comments, files, or requested_reviewers endpoints"
- "No actions workflows, jobs, artifacts, or logs endpoints"
@@ -690,10 +691,9 @@ adapters:
deviations:
- "Responses deterministic: echo of the last user message; no model or randomness"
- "Reply derived solely from the last user message; earlier history ignored"
- - "stream:true (OpenAI) returns one SSE chunk plus [DONE], not token-by-token"
+ - "stream:true returns the complete reply in one text delta, not token-by-token"
missing:
- "No embeddings (POST /v1/embeddings) or legacy completions endpoints"
- - "No Anthropic SSE streaming (stream:true only handled for OpenAI)"
- "No tool use, function calling, or JSON mode"
- "No image or multimodal content blocks"
marketo-style:
@@ -924,9 +924,8 @@ adapters:
- "simulate_fail: true in POST /emails forces bounced terminal (simulator extension)"
- "Webhook events fire exactly once on the first deriving read, not on real delivery"
missing:
- - "No domains surface (create, list, verify, delete)"
+ - "Domain list is an authenticated empty result; no domain create, verify, or delete"
- "No API keys management (/api-keys)"
- - "No batch send (POST /emails/batch)"
- "No scheduled sends (schedule, cancel schedule)"
- "No audiences or contacts"
- "No broadcasts or tags"
diff --git a/internal/engine/aws_s3_style_test.go b/internal/engine/aws_s3_style_test.go
index 07335727..587cfe43 100644
--- a/internal/engine/aws_s3_style_test.go
+++ b/internal/engine/aws_s3_style_test.go
@@ -1885,10 +1885,10 @@ func TestAWSS3SubresourcesDoNotTouchTheBucket(t *testing.T) {
}
}
- // POST ?delete is S3's multi-object delete, unimplemented here.
+ // POST ?delete validates its XML before deleting anything.
body, status := s3Post(t, base+"/guard?delete", []byte(""), now)
- if status != 501 || !strings.Contains(body, "NotImplemented") {
- t.Fatalf("POST ?delete -> status %d, want 501 NotImplemented; body %s", status, body)
+ if status != 400 || !strings.Contains(body, "MalformedXML") {
+ t.Fatalf("POST ?delete -> status %d, want 400 MalformedXML; body %s", status, body)
}
// A real create/delete still works.
@@ -2313,7 +2313,7 @@ func TestAWSS3XIdMustNameAnImplementedOperation(t *testing.T) {
// Operations the adapter does not implement, on both mutating verbs.
for _, op := range []string{
- "CopyObject", "RestoreObject", "SelectObjectContent", "PutObjectLegalHold",
+ "RestoreObject", "SelectObjectContent", "PutObjectLegalHold",
"GetObjectAttributes", "PutObjectTagging", "UploadPartCopy", "ObjectLockToken",
} {
if body, status := s3Put(t, base+"/xid/keep.txt?x-id="+op, []byte("OVERWRITTEN"), now); status != 501 {
diff --git a/internal/engine/llm_resend_parity_test.go b/internal/engine/llm_resend_parity_test.go
new file mode 100644
index 00000000..c8d5c411
--- /dev/null
+++ b/internal/engine/llm_resend_parity_test.go
@@ -0,0 +1,106 @@
+package engine
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "io"
+ "net/http"
+ "path/filepath"
+ "strings"
+ "testing"
+
+ "stuntapi.com/stunt/internal/manifest"
+)
+
+func TestLLMResendClientParity(t *testing.T) {
+ for _, adapter := range []string{"llm-style", "resend-style"} {
+ t.Run(adapter, func(t *testing.T) {
+ dir, err := filepath.Abs(filepath.Join("..", "..", "adapters", adapter))
+ if err != nil {
+ t.Fatal(err)
+ }
+ e, err := New(&manifest.Manifest{Path: filepath.Join(t.TempDir(), "stunt.yaml"), Version: 1, Network: manifest.Network{Mode: "port"}, Services: map[string]manifest.Service{"api": {Adapter: dir}}})
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer e.Close()
+ addrs, cancel, err := e.ServeForTest(context.Background())
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer cancel()
+ request := func(method, path, key string, body any) (int, []byte) {
+ t.Helper()
+ raw, _ := json.Marshal(body)
+ req, _ := http.NewRequest(method, addrs["api"]+path, bytes.NewReader(raw))
+ req.Header.Set("Content-Type", "application/json")
+ if adapter == "llm-style" {
+ req.Header.Set("x-api-key", key)
+ } else {
+ req.Header.Set("Authorization", "Bearer "+key)
+ }
+ res, err := http.DefaultClient.Do(req)
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer res.Body.Close()
+ data, _ := io.ReadAll(res.Body)
+ return res.StatusCode, data
+ }
+ if adapter == "llm-style" {
+ status, body := request("GET", "/v1/models", "sk-test-key", nil)
+ if status != 200 || !bytes.Contains(body, []byte(`"type":"model"`)) {
+ t.Fatalf("models: %d %s", status, body)
+ }
+ status, _ = request("GET", "/v1/models", "invalid", nil)
+ if status != 401 {
+ t.Fatalf("invalid key: %d", status)
+ }
+ status, body = request("POST", "/v1/messages", "sk-test-key", map[string]any{"model": "synthetic-model", "stream": true, "messages": []any{map[string]any{"role": "user", "content": "synthetic prompt"}}})
+ if status != 200 {
+ t.Fatalf("stream: %d %s", status, body)
+ }
+ for _, event := range []string{"message_start", "content_block_start", "content_block_delta", "content_block_stop", "message_delta", "message_stop"} {
+ if !strings.Contains(string(body), "event: "+event+"\n") {
+ t.Errorf("missing %s in %s", event, body)
+ }
+ }
+ if !bytes.Contains(body, []byte("Echo: synthetic prompt")) {
+ t.Fatalf("missing echo: %s", body)
+ }
+ } else {
+ status, body := request("GET", "/domains", "synthetic-key", nil)
+ if status != 200 || !bytes.Contains(body, []byte(`"data":[]`)) {
+ t.Fatalf("domains: %d %s", status, body)
+ }
+ status, _ = request("GET", "/domains", "", nil)
+ if status != 401 {
+ t.Fatalf("unauthenticated domains: %d", status)
+ }
+ status, body = request("POST", "/emails/batch", "synthetic-key", []any{map[string]any{"from": "sender@example.test", "to": "one@example.test", "subject": "first"}, map[string]any{"from": "sender@example.test", "to": "two@example.test", "subject": "second"}})
+ var result struct {
+ Data []struct {
+ ID string `json:"id"`
+ } `json:"data"`
+ }
+ if err := json.Unmarshal(body, &result); err != nil {
+ t.Fatal(err)
+ }
+ if status != 200 || len(result.Data) != 2 || result.Data[0].ID == result.Data[1].ID {
+ t.Fatalf("batch: %d %s", status, body)
+ }
+ for _, entry := range result.Data {
+ status, body = request("GET", "/emails/"+entry.ID, "synthetic-key", nil)
+ if status != 200 {
+ t.Fatalf("retrieve: %d %s", status, body)
+ }
+ }
+ status, _ = request("POST", "/emails/batch", "synthetic-key", []any{})
+ if status != 422 {
+ t.Fatalf("empty batch: %d", status)
+ }
+ }
+ })
+ }
+}
diff --git a/internal/engine/social_oauth_clients_test.go b/internal/engine/social_oauth_clients_test.go
new file mode 100644
index 00000000..feca4282
--- /dev/null
+++ b/internal/engine/social_oauth_clients_test.go
@@ -0,0 +1,171 @@
+package engine
+
+import (
+ "context"
+ "encoding/base64"
+ "encoding/json"
+ "html"
+ "io"
+ "net/http"
+ "net/url"
+ "path/filepath"
+ "regexp"
+ "strings"
+ "testing"
+
+ "stuntapi.com/stunt/internal/manifest"
+)
+
+func socialAdapter(t *testing.T, adapter string) string {
+ t.Helper()
+ path, err := filepath.Abs(filepath.Join("..", "..", "adapters", adapter))
+ if err != nil {
+ t.Fatal(err)
+ }
+ e, err := New(&manifest.Manifest{Path: filepath.Join(t.TempDir(), "stunt.yaml"), Version: 1, Network: manifest.Network{Mode: "port", BasePort: 0}, Services: map[string]manifest.Service{"identity": {Adapter: path}}})
+ if err != nil {
+ t.Fatal(err)
+ }
+ t.Cleanup(func() { e.Close() })
+ addresses, cancel, err := e.ServeForTest(context.Background())
+ if err != nil {
+ t.Fatal(err)
+ }
+ t.Cleanup(cancel)
+ return addresses["identity"]
+}
+
+func TestSocialOAuthModernClients(t *testing.T) {
+ for _, tc := range []struct{ name, authorize, token string }{
+ {"google-style", "/o/oauth2/v2/auth", "/token"},
+ {"github-style", "/login/oauth/authorize", "/login/oauth/access_token"},
+ {"entra-id-style", "/common/oauth2/v2.0/authorize", "/common/oauth2/v2.0/token"},
+ } {
+ t.Run(tc.name, func(t *testing.T) {
+ base := socialAdapter(t, tc.name)
+ redirect := "http://localhost:3000/callback"
+ q := url.Values{"client_id": {"synthetic-client"}, "redirect_uri": {redirect}, "state": {"synthetic-state"}, "response_type": {"code"}, "scope": {"openid email profile offline_access"}, "code_challenge": {"synthetic-verifier"}, "code_challenge_method": {"plain"}}
+ response := googleGetNoRedirect(t, base+tc.authorize+"?"+q.Encode())
+ response.Body.Close()
+ if response.StatusCode != 302 {
+ t.Fatalf("authorize status = %d", response.StatusCode)
+ }
+ callback, err := url.Parse(response.Header.Get("Location"))
+ if err != nil {
+ t.Fatal(err)
+ }
+ if callback.Query().Get("state") != "synthetic-state" {
+ t.Fatal("state did not round trip")
+ }
+ form := url.Values{"grant_type": {"authorization_code"}, "client_id": {"synthetic-client"}, "client_secret": {"synthetic-secret"}, "redirect_uri": {redirect}, "code": {callback.Query().Get("code")}, "code_verifier": {"synthetic-verifier"}}
+ if tc.name == "github-style" {
+ form.Set("code_verifier", "wrong-verifier")
+ if body, status := googlePostForm(t, base+tc.token, form); status != 400 {
+ t.Fatalf("wrong PKCE verifier = %d: %s", status, body)
+ }
+ form.Set("code_verifier", "synthetic-verifier")
+ }
+ body, status := googlePostForm(t, base+tc.token, form)
+ if status != 200 {
+ t.Fatalf("exchange status = %d: %s", status, body)
+ }
+ var tokens map[string]any
+ if err := json.Unmarshal([]byte(body), &tokens); err != nil {
+ t.Fatal(err)
+ }
+ if tokens["access_token"] == nil {
+ t.Fatal("no access token")
+ }
+ if tc.name == "entra-id-style" {
+ token, _ := tokens["id_token"].(string)
+ parts := strings.Split(token, ".")
+ if len(parts) != 3 {
+ t.Fatalf("invalid id_token: %v", tokens["id_token"])
+ }
+ payload, err := base64.RawURLEncoding.DecodeString(parts[1])
+ if err != nil {
+ t.Fatal(err)
+ }
+ var claims map[string]any
+ if err := json.Unmarshal(payload, &claims); err != nil {
+ t.Fatal(err)
+ }
+ for _, key := range []string{"oid", "tid", "email", "sub", "iss", "aud"} {
+ if claims[key] == nil {
+ t.Fatalf("missing identity claim %s: %s", key, payload)
+ }
+ }
+ }
+ if tc.name == "github-style" {
+ for _, route := range []string{"/user", "/user/emails"} {
+ request, _ := http.NewRequest("GET", base+route, nil)
+ request.Header.Set("Authorization", "Bearer "+tokens["access_token"].(string))
+ resp, err := http.DefaultClient.Do(request)
+ if err != nil {
+ t.Fatal(err)
+ }
+ raw, _ := io.ReadAll(resp.Body)
+ resp.Body.Close()
+ if resp.StatusCode != 200 {
+ t.Fatalf("%s = %d: %s", route, resp.StatusCode, raw)
+ }
+ bad := googleGetNoRedirect(t, base+route)
+ bad.Body.Close()
+ if bad.StatusCode != 401 {
+ t.Fatalf("anonymous %s = %d", route, bad.StatusCode)
+ }
+ }
+ }
+ if body, status := googlePostForm(t, base+tc.token, form); status != 400 {
+ t.Fatalf("code replay status = %d: %s", status, body)
+ }
+ })
+ }
+}
+
+func TestAppleHybridFormPost(t *testing.T) {
+ base := socialAdapter(t, "signin-with-apple-style")
+ redirect := "http://localhost:3000/callback"
+ q := url.Values{"client_id": {"com.example.signin.service"}, "redirect_uri": {redirect}, "state": {`state<&"`}, "response_type": {"code id_token"}, "response_mode": {"form_post"}, "scope": {"email name"}}
+ resp := googleGetNoRedirect(t, base+"/auth/authorize?"+q.Encode())
+ raw, _ := io.ReadAll(resp.Body)
+ resp.Body.Close()
+ if resp.StatusCode != 200 || !strings.Contains(resp.Header.Get("Content-Type"), "text/html") {
+ t.Fatalf("form_post = %d: %s", resp.StatusCode, raw)
+ }
+ fields := map[string]string{}
+ for _, match := range regexp.MustCompile(`name="([^"]+)" value="([^"]*)"`).FindAllStringSubmatch(string(raw), -1) {
+ fields[match[1]] = html.UnescapeString(match[2])
+ }
+ if fields["state"] != q.Get("state") {
+ t.Fatalf("state not escaped/round-tripped: %s", raw)
+ }
+ body, status := siwaPostForm(t, base+"/auth/token", url.Values{"grant_type": {"authorization_code"}, "client_id": {"com.example.signin.service"}, "client_secret": {siwaMintClientSecret(t, 3600)}, "redirect_uri": {redirect}, "code": {fields["code"]}})
+ if status != 200 {
+ t.Fatalf("exchange = %d: %s", status, body)
+ }
+ var tokens map[string]any
+ if err := json.Unmarshal([]byte(body), &tokens); err != nil {
+ t.Fatal(err)
+ }
+ // The front-channel and exchanged identity tokens identify the same login.
+ for _, token := range []string{fields["id_token"], tokens["id_token"].(string)} {
+ parts := strings.Split(token, ".")
+ if len(parts) != 3 {
+ t.Fatal("missing hybrid id_token")
+ }
+ payload, err := base64.RawURLEncoding.DecodeString(parts[1])
+ if err != nil {
+ t.Fatal(err)
+ }
+ var claims map[string]any
+ if err := json.Unmarshal(payload, &claims); err != nil {
+ t.Fatal(err)
+ }
+ if fields["sub"] == "" {
+ fields["sub"] = claims["sub"].(string)
+ } else if fields["sub"] != claims["sub"] {
+ t.Fatal("hybrid and exchanged subjects differ")
+ }
+ }
+}