Conformance APIs
Experimental wire-fixture record, replay, fault-injection, conformance case, and runner subpaths.
Experimental.
@yolk-sdk/conformancemay change in any canary release. It is new after0.1.0-canary.95; keep it on the same lockstep version as the other public packages.
@yolk-sdk/conformance records real HTTP exchanges with outside services, replays them in tests
offline (fail closed), and injects wire faults. It also defines conformance cases, each proving one
claim about how a service really behaves on the wire, and a runner that gates cases by safety and
reports. It depends only on effect and never performs
network I/O itself: for live recording, your host supplies the real HttpClient.
There is no root export. Import an explicit subpath.
Fixture
@yolk-sdk/conformance/fixture
| Export | Purpose |
|---|---|
WireFixture | Schema and type: id, caseId, evidence, recordedAt (YYYY-MM-DD), account, endpoint, model?, note?, exchanges |
WireExchange, WireRequest, WireResponse | One request (method, absolute URL, allowlisted headers, JSON or text body) and its response |
WireBodyResponse, WireTextBodyResponse, WireBase64BodyResponse | Whole body: exactly one of body (valid UTF-8 string) or bodyBase64 (exact bytes, for example a PDF) |
WireStreamResponse, WireChunk | Streamed chunks with original boundaries; each entry is a string (valid UTF-8 on its own, empty chunks "") or { base64 } with the exact bytes |
WireFixtureEvidence, WireHeaders | verified / unverified; lowercase header record |
decodeWireFixture | Decode unknown input (for example a JSON file) into a fixture |
isWireStreamResponse, isWireBase64BodyResponse | Narrow a response to the streamed or base64 body shape |
fixtureAgeDays, isFixtureStale | Whole UTC days since recordedAt; stale after maxAgeDays (default 30) |
PortFixture, PortFailure, decodePortFixture | One non-HTTP port call: id, port, method, credential-free JSON request, exactly one of response or failure (expected / error), observed?, note? |
redactPortPayload, scanPortFixtureForSecrets | Drop credential fields (AWS-style accessKeyId / secretAccessKey / sessionToken included) from a port payload; scan a port fixture (token patterns, credential fields, any non-null credential(s), credential query parameters inside JSON strings, note, and failure.message) |
PortValueFixture, PortFailureFixture, isPortFixture, isPortFailureFixture, isPortCredentialKey | The two port fixture branches, their narrowing helpers, and the credential-key predicate redactPortPayload uses |
ConformanceFixture, conformanceFixtureEvidence | WireFixture | PortFixture; evidence and date (a port fixture is verified only with observed) |
scanFixtureForSecrets, FixtureSecretIssue | Pure scan for credential headers, bearer tokens, API-key prefixes, JWTs, credential query/form params and JSON fields |
syntheticPortCredentialParams | Frozen exact synthetic placeholders, keyed by parameter name (SigV4 x-amz-signature, x-amz-credential): the only values scanPortFixtureForSecrets accepts, compared with the whole raw value (up to &, #, whitespace, ", <, >, or the end; never ? or ') after percent-decoding; scanFixtureForSecrets accepts none |
Fixtures must contain synthetic or scrubbed data only. The scan covers metadata strings, URLs,
headers, request and response bodies (including decodable bodyBase64 text), each chunk, and the
reassembled stream, so a secret split across chunks is still found. JSON bodies and SSE data:
payloads get the credential-field scan (access_token, client_secret, password, token, ...);
numeric usage counters such as max_tokens are not flagged. SSE framing with CRLF, LF, or bare CR
line endings is recognized. The scan errs toward flagging: a field named exactly token (for
example an OpenAI logprobs entry) is flagged, so avoid recording logprobs. It reports locations,
never secret values, and is a safety net rather than a guarantee.
A PortFixture records one call through a host port that is not HTTP, such as the generic
EmailClient. Without observed it is a synthetic placeholder (unverified, no date); with
observed: { account, date } it is verified as of that date. Record requests through
redactPortPayload and scan them with scanPortFixtureForSecrets, which also flags credential
query parameters inside any JSON string, the note, or the failure message (a signed URL a port
answered, such as an S3 presigned URL's X-Amz-Signature). Every name= is found and judged on its
own. The only exemption: the raw value, up to a structural boundary (&, #, whitespace, ",
<, >, or the end; a raw ? or ' and encoded delimiters such as %3F or %26 stay inside it),
percent-decoded, exactly equals that parameter's entry in syntheticPortCredentialParams. It does
not see parameters with escaped names (& before them, percent-encoded names), which port
owners check themselves (the R2 port cases ship findR2PortFixtureSecrets). Replaying port fixtures
belongs to the port owner (for example makeEmailReplayBackend); the runner accepts both fixture
kinds for its fixture warnings.
Replay
@yolk-sdk/conformance/replay
| Export | Purpose |
|---|---|
ReplayHttpClient.layer(fixtures, options?) | Layer<HttpClient.HttpClient | ReplayLedger> with fresh state per build |
makeReplayHttpClient | Effect returning { client, ledger } for manual wiring |
ReplayLedger.entries, ReplayLedgerEntry | Every request: method, URL, redacted headers, body text/JSON, attempt, match outcome (matched, injected, unmatched, invalid), applied fault tag |
ReplayLedger.remaining | Recorded exchanges (fixtureId, exchangeIndex) not consumed yet, in fixture order |
WireFault | StatusOnAttempt, FailAfterChunks, TruncateAfterChunks, HoldAfterChunks constructors |
WireTransportFault | Cause attached to a body stream failed by FailAfterChunks |
WireReplayInvalid | Cause of the HttpClientError for a matched exchange that cannot be replayed as requested |
Requests match by method and normalized absolute URL (hash removed, query parameters sorted). Each
exchange is consumed once, in recorded order per method and URL. Unknown requests fail with an
HttpClientError whose message names the method and URL only, and are still recorded in the
ledger as unmatched; faults never answer them, so StatusOnAttempt fires only when an
unconsumed recorded exchange exists for the method and URL. Replay emits the exact recorded bytes:
one Uint8Array per recorded chunk (including empty ones), each produced only when pulled, and
bodyBase64 as the original bytes. A fault match.url matches exactly, or as a prefix when it
ends with *.
A chunk fault that cannot take effect fails the request with an HttpClientError whose cause is
WireReplayInvalid, recorded in the ledger as invalid without a fault tag: any chunk fault
matched against a whole-body response, TruncateAfterChunks or HoldAfterChunks with chunks at
or beyond the recorded chunk count, or FailAfterChunks with chunks beyond it. The error reason
is a TransportError, which generic transient-retry policies retry; when a test runs through a
retrying client, also assert the ledger has no invalid outcome.
import { Effect } from 'effect'
import { ReplayHttpClient, ReplayLedger, WireFault } from '@yolk-sdk/conformance/replay'
const replayLayer = ReplayHttpClient.layer([hostFixture], {
faults: [WireFault.StatusOnAttempt({ attempt: 1, status: 429, headers: { 'retry-after': '2' } })]
})
const ledgerEntries = Effect.gen(function* () {
const ledger = yield* ReplayLedger
return yield* ledger.entries
})hostFixture is a placeholder for your own WireFixture. Provide replayLayer below the code
under test, for example a provider layer.
Record
@yolk-sdk/conformance/record
| Export | Purpose |
|---|---|
WireRecorder.layer(options?) | Wraps the HttpClient already in context; provides the recording client and WireRecorder |
makeRecordingHttpClient | Effect returning { client, recorder } around a given client |
WireRecorderApi.drain | Take recorded exchanges; fails with WireRecordingIncomplete if a request failed or was unread |
makeWireFixture | Validate a fixture; fails with WireFixtureInvalid on schema errors or WireFixtureSecretsFound on any scan issue |
WireFixtureInvalid, WireFixtureSecretsFound, WireRecordingIncomplete | Typed errors from makeWireFixture and drain |
defaultRecordedRequestHeaders, defaultRecordedResponseHeaders, defaultStreamMediaTypes | Allowlist defaults |
The recorder keeps content-type and accept request headers and content-type, retry-after,
retry-after-ms, and rate-limit response headers by default. Credential headers such as
authorization, cookie, set-cookie, and token/key-bearing names such as x-auth-token,
private-token, or x-*-key are always dropped. text/event-stream responses are teed chunk by
chunk without changing what the caller receives; each chunk is recorded standalone as text when
valid UTF-8, otherwise as { base64 }. Other bodies are recorded as body or bodyBase64. A
request still pending when drain runs is reported by that drain and then dropped; it never lands
in a later drain.
Case
@yolk-sdk/conformance/case
| Export | Purpose |
|---|---|
ConformanceCase<E, R> | id, title?, safety, docs (what the docs claim), wire (what the wire does), observed?, fixtures (fixture ids), run: Effect<void, E, R> |
defineConformanceCase | Validates case metadata; throws ConformanceCaseInvalid for an invalid definition |
ConformanceSafety | Schema and type: read, write-reversible (leaves the account as it found it), write-irreversible (never automated) |
ConformanceObservation | Schema and type: { account, date }, a synthetic account label and YYYY-MM-DD; absent on a case means unverified |
ConformanceCaseId | Schema: dotted lower-case id, two or more segments |
expectConformance(condition, message, details?) | Fails with ConformanceMismatch when condition is false |
expectEqual(actual, expected, message) | Structural JSON equality (Equal.equals); fails with ConformanceMismatch carrying both values |
ConformanceMismatch, ConformanceCaseInvalid | Typed mismatch (message, optional JSON expected / actual); invalid-definition error |
Runner
@yolk-sdk/conformance/runner
| Export | Purpose |
|---|---|
runConformance(cases, options) | Effect<ConformanceReport, never, LR>; runs allowed cases one at a time by default, each with a freshly built options.layer(case) |
ConformanceRunOptions | target, layer, fixtures? (wire or port), now? (default Clock), maxFixtureAgeDays? (default 30), concurrency? (default 1) |
ConformanceTarget | replay, in-process, emulated, or live with account, allowWrites? (none default / reversible), and allowIrreversible? (exact ids) |
conformanceSkipReason | The safety policy: undefined (runs), writes-not-allowed, or manual-only |
conformanceCaseWarnings, ConformanceWarning | unverified-case, stale-observation, unverified-fixture, stale-fixture, missing-fixture |
ConformanceReport, ConformanceCaseResult | Target, startedAt, per-case status / skipReason / sanitized failure / durationMs / warnings, and a summary |
formatConformanceReport, conformanceReportFailed | Plain-text report (one line per case plus a summary, no colors); true when any case failed |
sanitizeConformanceMessage | Best-effort message sanitizer the runner applies to non-mismatch failures (credentials and credential header lines redacted, JSON spans elided, capped) |
ConformanceCaseRequirements | Requirements of a case type (or union); what layer must provide |
| Target | read | write-reversible | write-irreversible |
|---|---|---|---|
replay, in-process, emulated | runs | runs | runs |
live | runs | runs only with allowWrites: 'reversible', else writes-not-allowed | runs only if its exact id is in allowIrreversible, else manual-only |
Skipped cases never build their layer. Each running case calls options.layer(case) and builds
the result fresh (fresh memo map and scope), so state a layer allocates when it is built (replay
consumption, ledgers, emulator state) never leaks between cases. Layers must allocate their
mutable state when built: a service captured in a shared value (one Layer.succeed(service, instance) reused across cases) or provided by the caller's environment is not rebuilt and stays
shared. Failures, layer build failures, a throwing layer factory, and defects become failed
results; interruption still interrupts the run.
Failure reports carry an identifier-like, non-credential-shaped error tag (other tags are omitted)
and a message, never request bodies, headers, or mismatch expected / actual details. A
ConformanceMismatch keeps its case-authored message with credential patterns redacted. Every
other message is sanitized best-effort by sanitizeConformanceMessage: credential patterns shared
with the fixture secret scan and credential header lines (Cookie:, X-Api-Key:,
Proxy-Authorization:, ...) are redacted, JSON-looking spans become [json], whitespace is
collapsed, and the length is capped at 300 characters. Hosts should still keep secrets out of error
messages.
Live targets omit all fixture-level warnings (unverified-fixture, stale-fixture,
missing-fixture) because fixtures are not used live; case-level warnings always apply. On other
targets fixture warnings need fixtures.
import { Effect } from 'effect'
import { ReplayHttpClient } from '@yolk-sdk/conformance/replay'
import { formatConformanceReport, runConformance } from '@yolk-sdk/conformance/runner'
const report = runConformance(hostCases, {
target: { kind: 'replay' },
fixtures: hostFixtures,
layer: testCase =>
ReplayHttpClient.layer(hostFixtures.filter(fixture => testCase.fixtures.includes(fixture.id)))
}).pipe(Effect.map(formatConformanceReport))hostCases and hostFixtures are placeholders for your own cases and fixtures.
Provider fixtures
@yolk-sdk/agent/providers/vercel/conformance exports Vercel AI Gateway fixtures for replay tests:
vercelAiGatewayPlainTextFixture, vercelAiGatewayDeepSeekReasoningFixture,
vercelAiGatewayToolCallDeltasFixture, vercelAiGatewayErrorEnvelopeFixture, and
vercelAiGatewayConformanceFixtures. They are verified live recordings (evidence: 'verified',
recorded 2026-09-30 with the synthetic account label synthetic and synthetic prompts) written by
pnpm conformance:gateway --live --owner-approved --account <label>.
The same subpath exports four read conformance cases backed by those fixtures
(vercelAiGatewayPlainTextCase, vercelAiGatewayDeepSeekReasoningCase,
vercelAiGatewayToolCallDeltasCase, vercelAiGatewayErrorEnvelopeCase, and
vercelAiGatewayConformanceCases). They require only an HttpClient and the
VercelAiGatewayConformanceConfig service (API key, output limits, reasoning effort, and model ids;
vercelAiGatewayConformanceDefaultModels holds the live probe's default model ids, which are the
models every fixture was recorded with, including the reasoning model
deepseek/deepseek-v4.1-flash), so they run against replay, the Gateway emulator in
@yolk-sdk/emulators/gateway (whose route is verified against these recordings), or a host's live
client. Each case records the live observation that produced its fixture
(observed: { account: 'synthetic', date: '2026-09-30' }), so reports do not warn
unverified-case.
The same subpath exports four classifier (POST /v1/evaluate) read cases, apart from the chat
arrays: vercelAiGatewayClassifierBooleanCase, vercelAiGatewayClassifierChoiceCase,
vercelAiGatewayClassifierScoreCase, vercelAiGatewayClassifierErrorEnvelopeCase, and
vercelAiGatewayClassifierConformanceCases, backed by four synthetic placeholder fixtures
(evidence: 'unverified') in vercelAiGatewayClassifierConformanceFixtures. They require an
HttpClient and the VercelAiGatewayClassifierConformanceConfig service (API key and model ids;
vercelAiGatewayClassifierConformanceDefaultModels). None is observed live yet, so reports warn
unverified-case and unverified-fixture.
@yolk-sdk/agent/providers/openai/conformance does the same for the generic OpenAI-compatible chat
provider against OpenAI Chat Completions (https://api.openai.com/v1/chat/completions,
max_completion_tokens): seven synthetic fixtures (openAiChatPlainTextFixture,
openAiChatToolCallDeltasFixture, openAiChatErrorEnvelopeFixture,
openAiChatJsonPlainTextFixture, openAiChatReasoningEffortFixture,
openAiChatJsonReasoningUsageFixture, openAiChatUnsupportedParameterFixture, and
openAiConformanceFixtures) and seven read cases (openAiChatPlainTextCase,
openAiChatToolCallDeltasCase, openAiChatErrorEnvelopeCase, openAiChatJsonPlainTextCase,
openAiChatReasoningEffortCase, openAiChatJsonReasoningUsageCase,
openAiChatUnsupportedParameterCase, and openAiConformanceCases). They require an HttpClient
and the OpenAiConformanceConfig service (API key, maxCompletionTokens, the reasoning cases'
reasoningMaxCompletionTokens and reasoningEffort, and model ids;
openAiConformanceDefaultModels holds the fixture model ids). The tool-call case forces its one
tool with tool_choice. The error-envelope case requires provider code model_not_found with
status 404 (or 400, which OpenAI has also used) and fails any other code, a 401/403, or an auth
failure; the JSON case covers stream: false. The reasoning cases send reasoning_effort to the
reasoning model (streamed and JSON) and require no reasoning text and a usage report counting
reasoning tokens (completion_tokens_details.reasoning_tokens); the unsupported-parameter case
sends max_tokens to the reasoning model and requires a non-retryable 400 with provider code
unsupported_parameter.
@yolk-sdk/agent/providers/anthropic/conformance covers Anthropic Messages
(https://api.anthropic.com/v1/messages) through the native Messages provider path OpenCode Go uses
(x-api-key, anthropic-version: 2023-06-01, native system and tool names, message_stop
required), not the Claude subscription provider, which only accepts a Claude OAuth token. It exports
five synthetic fixtures (anthropicMessagesPlainTextFixture,
anthropicMessagesToolUseInputDeltasFixture, anthropicMessagesThinkingBeforeTextFixture,
anthropicMessagesErrorEnvelopeFixture, anthropicMessagesMaxTokensFixture, and
anthropicConformanceFixtures) and five read cases (anthropicMessagesPlainTextCase,
anthropicMessagesToolUseInputDeltasCase, anthropicMessagesThinkingBeforeTextCase,
anthropicMessagesErrorEnvelopeCase, anthropicMessagesMaxTokensCase, and
anthropicConformanceCases). They require an HttpClient and the AnthropicConformanceConfig
service (API key, maxTokens, thinkingBudgetTokens, and model ids;
anthropicConformanceDefaultModels holds the fixture model ids). The tool-use case forces its tool
with tool_choice: { type: 'tool', name, disable_parallel_tool_use: true }; the thinking case
enables thinking and sends max_tokens = maxTokens + thinkingBudgetTokens; the error-envelope
case requires a 404 that is not an auth failure and whose body, read at the case's HttpClient
boundary, is { type: 'error', error: { type: 'not_found_error', message } }; the max-tokens case
requires stop_reason: max_tokens to fail as a non-retryable invalid_response without Done.
The Responses-based subscription providers share one case shape. @yolk-sdk/agent/providers/openai/conformance
also covers the ChatGPT Codex endpoint (https://chatgpt.com/backend-api/codex/responses) through
the public Codex provider, and @yolk-sdk/agent/providers/xai/conformance covers the Grok CLI proxy
(https://cli-chat-proxy.grok.com/v1/responses) through the public Grok provider. Each exports four
synthetic fixtures and four read cases: streamed plain text (non-empty text, one Done(stop), and
usage from response.completed), function_call argument assembly (at least one call, every call
named lookup_weather with distinct call ids and a non-empty string city, then one
Done(tool_use); the providers send no tool_choice; the body, teed at the case's HttpClient
boundary, must assemble its response.function_call_arguments.delta fragments per item into the
completed item's arguments, since the providers read only the completed items), the unknown-model error envelope (a
non-retryable 400 or 404 that is not an auth failure, a status-only message, and a JSON error body
with a message read at the case's HttpClient boundary), and the terminal event (the body, teed
chunk for chunk at the case's HttpClient boundary, ends with exactly one response.completed whose
response.status is completed). Codex exports openAiCodexPlainTextCase,
openAiCodexFunctionCallArgumentsCase, openAiCodexErrorEnvelopeCase,
openAiCodexTerminalEventCase, openAiCodexConformanceCases, the matching openAiCodex*Fixtures,
openAiCodexConformanceFixtures, and OpenAiCodexConformanceConfig (OAuth token and model ids).
Grok exports the same with the xAiGrok prefix and XAiGrokConformanceConfig (OAuth token,
host-owned clientVersion, maxOutputTokens, and model ids). The terminal-event case pins each
provider's behaviour: Grok fails a stream without response.completed as a non-retryable
invalid_response, while Codex keeps EOF-completion compatibility, so only the body check catches
it. pnpm conformance:codex and pnpm conformance:grok are dry-run probes; live runs use
subscription OAuth tokens (OPENAI_CODEX_ACCESS_TOKEN, XAI_GROK_ACCESS_TOKEN) and need the
repository owner's approval (--owner-approved); --live is refused whenever CI is set to any
non-empty value, 0 and false included.
@yolk-sdk/agent/providers/opencode/conformance covers OpenCode Go through the public Go provider
and usage fetcher (https://opencode.ai/inference/go/v1): five synthetic fixtures
(openCodeGoConformanceFixtures) and five read cases (openCodeGoConformanceCases), requiring an
HttpClient and OpenCodeGoConformanceConfig (redacted API key, maxOutputTokens, and one model
id per protocol). openCodeGoChatPlainTextCase, openCodeGoMessagesPlainTextCase, and
openCodeGoResponsesPlainTextCase claim non-empty text, one Done(stop), and usage on each
protocol; openCodeGoResponsesCommentaryReplayCase reads its own request at the case's
HttpClient boundary and requires a replayed tool turn in order with the assistant text tagged
phase: "commentary", then an accepted stream with one Done; openCodeGoUsageSnapshotCase is the
Go usage case. pnpm conformance:opencode is a dry-run probe; live runs need OPENCODE_API_KEY,
owner approval, and real Go model ids for every protocol.
Subscription-usage cases share one shape across vendors: anthropicClaudeUsageSnapshotCase
(@yolk-sdk/agent/providers/anthropic/conformance, AnthropicClaudeUsageConformanceConfig),
openAiCodexUsageSnapshotCase (@yolk-sdk/agent/providers/openai/conformance,
OpenAiCodexUsageConformanceConfig), xAiGrokUsageSnapshotCase
(@yolk-sdk/agent/providers/xai/conformance, XAiGrokUsageConformanceConfig), and
openCodeGoUsageSnapshotCase. Each calls the public fetcher at its default URL and asserts the
normalized ProviderSubscriptionUsageSnapshot: the vendor provider id, at least one window with
distinct known ids in vendor order, and, against the raw body read at the case's HttpClient
boundary, exactly one window per reported wire window with the same id, used percentage, and reset
instant, so no window is fabricated or dropped. The Claude case also accepts model-scoped weekly
windows (scopedWindowIdPrefix, ids such as seven-day-<model> with models), and its synthetic
fixture reports one. The usage cases and fixtures are exported apart
from the model-route suites (anthropicClaudeUsageConformanceCases,
openAiCodexUsageConformanceCases, xAiGrokUsageConformanceCases, and the matching
*UsageConformanceFixtures). pnpm conformance:usage --family claude|codex|grok is a dry-run
probe with the same owner-approval and CI rules.
MCP conformance
Experimental. Conformance/testing only.
@yolk-sdk/mcp/conformance exports nine read cases (mcpConformanceCases) that check the wire
claims @yolk-sdk/mcp/client relies on. Each case runs the real client operations
(listRemoteMcpServerTools, callRemoteMcpServerTool) and wraps the host's HttpClient with the
observing client (makeMcpObservingHttpClient). The observer never sends a request of its own. It
keeps the method, the URL, allowlisted MCP headers, the JSON request body, the status, allowlisted
answer headers, the media type and the answer body. Its guarantees are exactly these:
- it never keeps
authorizationor any other credential-named header; - it never keeps the URL query (origin and path only);
- it never keeps a raw
mcp-session-idvalue, only evidence (McpObservedSession: an equality class such assession#1, and whether it is visible ASCII); - request and response bodies are kept exactly as received. They may reflect anything a server echoes, credentials and session ids included, so they are sensitive: in memory only, never logged or persisted. Persisted or printed output is the live runner's job.
A case that calls a tool (mcp.modern.stateless, mcp.errors.unknown-tool,
mcp.tools.call-read, mcp.tools.call-tool-error) is protected by the observer's fail-closed call
gate. The tools/call is forwarded only when every exchange of the call operation is fully
understood, that operation's own listing (made right before the call) is complete, and that
listing proves the call safe: the absent tool is not listed, or the read tool is marked
readOnlyHint: true. Anything else, including any uncertainty (a 202 answer to a request, a
message delivered on a GET, an unparseable body, an unterminated stream, two responses for one id,
an unknown shape, any server request but the one below), refuses to forward. The one server request
the gate understands is a plain server ping in a POST's answer (jsonrpc: "2.0", a string or
number id, method: "ping", no other member, params absent or empty) that the client answered
exactly once, after it, with only the empty result ({"jsonrpc":"2.0","id":<ping id>,"result":{}}),
and that the server accepted with 202 and no body. A ping is side-effect free (MCP 2025-11-25
basic/utilities/ping: its only answer is an empty result, and the SDK's handler returns {} and
touches no state); it is a request, so it resolves none of the client's requests and carries no
listing, and the accepted answer delivers nothing back. Any other server request, a ping with
params, a ping not answered exactly once, or an answer with no status yet, rejected, or with a body
still refuses, as does an answer in another session than the exchange that carried the ping
(#382). The gate decides from what it has recorded when the call is about to be sent. Pings during
initialize and in the answers of earlier tools/list pages are normally settled by then, since
more round trips follow them (if not, the gate refuses). A ping in the
last tools/list page's answer almost always refuses against a live server: the client buffers the
whole page, sends the ping's answer and finishes the listing at almost the same moment, and does no
network I/O before the call, so the call is gated before the answer's 202 returns (fail closed). A refusal before any forwarded call fails the precondition
with zero forwarded calls; a refused client retry after a forwarded call is reported as a retry.
Earlier preflight listings stay as friendly early failures. Answers are read as the SDK reads them:
JSON with JSON.parse semantics, and event streams with the SDK's own parser
(the same eventsource-parser the client resolves, verified in-repo by a parity test; a consumer
install whose package manager does not dedupe could still resolve two copies), fed the decoder
chunks the client's TextDecoderStream emits.
Mismatch messages carry only structural facts (methods, statuses, counts, positions, codes), never
body text or the target URL. A client failure a case re-raises is reported as the client words it
(it can quote a server body) and is sanitized by the runner (sanitizeConformanceMessage). A
response or listing page delivered on a last-event-id GET (SEP-1699 resumption) is not accepted
(unverified), although the SDK accepts it. Cases name no product: they read the
McpConformanceTarget service (name, url, headers, era, protocolVersion, timeoutMs, and
optional invalidCredentialHeaders) and the McpConformanceConfig seeds (readTool,
invalidArguments, expectedTools, notReadOnly, and absentToolName, default
yolk_conformance_absent). A case whose seed is missing fails with a precondition: mismatch before
any request.
| Case | Claim |
|---|---|
mcp.negotiation.era | The first request is POST server/discover with the _meta envelope, mcp-protocol-version: 2026-07-28 and mcp-method. Classified as the SDK classifies it, the answer selects target.era: modern when the discover result is valid for the 2026 schema and supportedVersions lists 2026-07-28; legacy for any other discover result (invalid, or without that version), any JSON-RPC error but a modern -32022, or a 4xx other than 401/403. Never 5xx, 401 or 403, and at most one corrective -32022 retry. |
mcp.modern.stateless | No answer carries mcp-session-id. Every request carries the envelope, mcp-protocol-version and mcp-method equal to the body method (tools/call: also mcp-name, the encoded tool name). Every result is an object carrying resultType: "complete". The absent-tool call is forwarded only when no raw wire listing names the tool. |
mcp.legacy.session | initialize answers a supported protocolVersion (equal to target.protocolVersion) and capabilities.tools. Any session id is visible ASCII, echoed and accepted. notifications/initialized gets 202 with no body. The standing GET gets 405 or an event stream (unverified). With a session, the client ends it with exactly one DELETE after its last POST, answered 2xx, 404 or 405; without one it sends none. |
mcp.transport.response-encoding | Every 2xx answer to a request is JSON or an SSE stream that ends. Among the events the client reads (completed, non-empty data, no event: or event: message), every one is JSON and the response appears exactly once. Priming events, other event types and notifications after the response are allowed. A 202 answering a POST has no body (a client-sent response, such as an answer to a server ping, is no request; the session-ending DELETE is not constrained). |
mcp.tools.list | The server advertises capabilities.tools. Every page lists tools with a name and an object inputSchema (type: "object"); cursors are followed, never repeat, and the last page has none. Listed tools and McpResolvedTools correspond one to one, with title, outputSchema and the five modeled annotation keys unchanged; adapted names stay unique. |
mcp.tools.call-read | Precondition: the listing, and the call operation's own complete listing (the call gate), mark readTool readOnlyHint: true. The call answers a result object with isError absent or false; with an outputSchema, structuredContent passes SDK validation. |
mcp.tools.call-tool-error | Same precondition. invalidArguments answer a result object with isError: true and text content, not a JSON-RPC error (unverified: some servers answer -32602). |
mcp.errors.unknown-tool | Precondition: no raw wire listing names absentToolName, and the call gate forwards the call only when the call operation's own complete listing proves it absent. Its tools/call gets a JSON-RPC error with the request id (HTTP 200, or 400 for modern targets), never a 5xx or a result, and fails as McpError with cause: "protocol". |
mcp.auth.rejected | The first request, with the invalid credential merged over the non-credential target headers, gets 401 with a Bearer challenge anywhere in WWW-Authenticate; no listing follows, and the error is McpError with cause: "transport". |
mcp.modern.* and mcp.legacy.* cases apply to one era only. selectMcpConformanceCases(cases, era) returns the applicable cases for runConformance and the notApplicable ones (with a
reason) for a dry run to list. The synthetic fixtures (mcpConformanceFixtures, sixteen,
evidence: 'unverified') use two synthetic servers on one reserved origin.
https://mcp.example.test/modern/mcp answers JSON statelessly. https://mcp.example.test/legacy/mcp
answers SSE in session yolk-synthetic-session-0001. The exchanges are in the order the pinned SDK
sends them, the request bodies carry its exact ids and _meta envelope, and authorization is never
recorded. mcpConformanceSyntheticTarget(era) and mcpConformanceFixtureSeeds replay them.
mcpElicitationDeclarationCase (mcp.elicitation.declaration, read, both eras) is opt-in: it is
not in mcpConformanceCases, and its two fixtures are mcpConformanceElicitationFixtures, not part
of mcpConformanceFixtures. Run it for a host that sets McpClientOptions.elicitation. It only
lists: modern tools/list requests carry elicitation.form in their _meta client capabilities and
get an object result; legacy initialize declares no elicitation and no request after the era probe
carries _meta client capabilities. It never calls a tool, so it never triggers a confirmation.
mcpServerPingCase (mcp.legacy.server-ping, read, legacy only) is opt-in too: it is not in
mcpConformanceCases, and its one fixture is mcpConformanceServerPingFixtures. Run it for a
legacy target that pings its clients. MCP 2025-11-25 lets a server ping (basic/utilities/ping:
"The receiver MUST respond promptly with an empty response") but never requires it, and
2026-07-28 removed ping and every server-to-client request. The case lists tools and needs at
least one ping request in an answer (else its precondition fails). For each ping, the client sends
exactly one POST to the target URL holding {"jsonrpc":"2.0","id":<ping id>,"result":{}}, with an
accept listing both media types and the issued session id, and the server accepts it with 202 and
no body (basic/transports, "Sending Messages to the Server"). The client never surfaces a rejected
answer (its send error only reaches onerror), so only the wire shows it, and an answer with no
observed status (a transport failure, or the client closing first) fails the case. The Effect fetch
bridge buffers each whole answer, so the client reads, and answers, a ping only after the SSE stream
carrying it ends: a server that waits for the answer before ending that stream stalls the operation
until the client's timeout (unverified: whether live servers do), and a ping on the standing GET is
unverified. The synthetic fixture
pings inside the initialize answer, before its response; the pinned SDK answers before
notifications/initialized, without mcp-protocol-version. The calling cases run against a pinging
server: the call gate understands a plain ping whose empty-result answer the server accepted with
202 and no body, and still refuses when that answer is missing, rejected, or bodied, when the ping
carries params, or for any other server request (#382).
Every operation is its own connection, so a closing legacy client that holds a session ends it:
it sends DELETE with the session id (MCP 2025-11-25 basic/transports, "Session Management" item
5: a client SHOULD; the server MAY answer 405, and a 404 means the session is already gone). It is awaited (one more round trip, at most 2 s)
but best effort: it never fails or changes the operation's result, and an interrupted operation
sends none. mcp.legacy.session checks it, and every legacy fixture with a session ends with it.
Not covered, because @yolk-sdk/mcp/client never sends them (it lists and calls tools only): the
client's own ping, resources/*, prompts/*, completion/*, logging/setLevel (removed in
2026-07-28), tasks/* (no task capability is declared; an extension in 2026-07-28), and
JSON-RPC batches (removed in 2025-06-18). Servers' notifications/message are ignored (every
legacy fixture answer carries one).
The cases also run in-process against makeMcpToolServer().handleHttpRequest. Five cases apply
there: era, stateless, response encoding, listing and unknown tool. The legacy session never happens
because the client negotiates the modern era. The two call cases stop at their precondition, because
the tool server publishes no readOnlyHint. The auth case does not apply, because the tool server
has no authentication. The MCP emulator (@yolk-sdk/emulators/mcp) answers both synthetic servers
from these fixtures and passes every applicable case offline (give the target a synthetic
Authorization: Bearer header). No case is observed live yet.
Provider targets live with the provider, never in @yolk-sdk/mcp.
@yolk-sdk/connectors/afloat/conformance builds the Afloat target by running the real
afloat.mcp_auth action (makeAfloatMcpConformanceTarget: https://useafloat.com/mcp, modern
2026-07-28, Authorization: Bearer <afloat_ key>, the reserved invalid key
afloat_yolkconformanceinvalid0000 for the auth case), names the published nine-tool subset as
seeds (afloatMcpConformanceLiveSeeds; no readTool, so a live run calls a tool only when a person
names one), and ships eight fixtures derived from the provider's source (owner-supplied; not a live
recording; every case but mcp.legacy.session applies). pnpm conformance:mcp --target afloat
previews the run (a dry run: no network, no credential read); adding --live --owner-approved --account <label> runs the cases by hand with the owner's approval (AFLOAT_API_KEY from the
environment only; refused in CI; tool calls only with the --read-tool flag, never from the
environment); the MCP emulator serves them as profile afloat. See Afloat MCP
conformance. @yolk-sdk/connectors/figma/conformance
builds the Figma target the same way, by running the real figma.mcp_auth
(makeFigmaMcpConformanceTarget: https://mcp.figma.com/mcp, the legacy era with protocol
2025-11-25, unverified, and the access token as Authorization: Bearer), names six known Figma
tool names with synthetic schemas as seeds, and ships eight synthetic placeholder fixtures (every
case but mcp.modern.stateless applies); pnpm conformance:mcp --target figma stays refused until
an owner-approved practice seat exists, and the MCP emulator serves the fixtures as profile figma.
See Figma MCP conformance.
Connector conformance
Experimental. Conformance/testing only.
@yolk-sdk/connectors/conformance provides the connector ports from an Effect HttpClient, so
connector cases run the real connector actions over replay, an emulator, or a host's live client:
| Export | Purpose |
|---|---|
connectorHttpClientFromEffectHttpClientLayer | ConnectorHttpClient over the HttpClient in context; keeps method, URL, headers, string body, content type, status, and body text |
connectorBinaryHttpClientFromEffectHttpClientLayer | GET-only ConnectorBinaryHttpClient; request buffers, then fails oversize 200s (response_too_large) and truncates error bodies; stream streams 200 bodies (failing past maxBytes while streaming) and aborts on scope close |
connectorBinaryWriteHttpClientFromEffectHttpClientLayer | ConnectorBinaryWriteHttpClient with uploadSession: POST/PUT bytes, and PUT ranges / empty DELETE cancellation to pre-authenticated session URLs; refuses bad requests and credential headers on sessions before sending |
connectorHttpClientsFromEffectHttpClientLayer | All three bridges |
ConformanceCleanupReporter | Context.Reference receiving cleanup problems a write case raises while being interrupted; default Effect.logWarning; the Dropbox, Notion, Todoist, and Telegram live runners print WARN lines |
staticCredentialResolverLayer(credentials) | CredentialResolver returning one RuntimeCredential for every slot, or credentials keyed by slot id (missing: credential_missing) |
These bridges are not production adapters. They enforce no redirect, DNS/IP, timeout, or TLS
policy; binary limits are checked only after buffering, except that the binary bridge's stream
counts an HTTP 200 body against maxBytes while it streams. redirect: 'manual'
and credentials: 'omit' are forwarded as FetchHttpClient.RequestInit options, and transport
failures become code-only errors without URLs, headers, or bodies. The static resolver ignores
scopes and never refreshes; hosts own real credential storage.
@yolk-sdk/connectors/fortnox/conformance exports twenty-five Fortnox cases
(fortnoxConformanceCases: seven invoice and customer cases, and eighteen seedless read cases of
company information, the customer list, the read-only resources, and bookkeeping), their synthetic fixtures
(fortnoxConformanceFixtures, evidence: 'unverified'), and the seeds they replay with
(fortnoxConformanceFixtureSeeds). Cases need the connector ports plus
FortnoxConformanceConfig, which holds seed identities in a Fortnox developer test company. A
missing seed fails the case with a precondition: mismatch before any request. None of the cases is
observed live yet, so reports warn unverified-case.
The row and customer mutation cases restore what they change, verify the restore by reading back,
and fail with FortnoxConformanceRestoreFailed instead of hiding a failed restore. The rejection
case restores nothing: it only confirms that the customer is absent before its write, and reports
any invoice Fortnox unexpectedly creates for manual cancellation. See
Fortnox conformance cases for the case table, seeds, and
claims.
@yolk-sdk/connectors/microsoft/conformance exports nineteen Microsoft Graph cases
(microsoftConformanceCases), their synthetic fixtures (microsoftConformanceFixtures), and the
seeds they replay with (microsoftConformanceFixtureSeeds). Cases need ConnectorHttpClient,
CredentialResolver, and MicrosoftConformanceConfig (seed identities in a Microsoft 365 practice
tenant). Outlook, OneDrive, SharePoint site, and Teams cases run the real connector actions. The
connector has no calendar actions yet, so the four calendar cases send raw Graph requests through
the same ports and pin expected Graph behaviour (unverified until a live run) for hosts and the
Microsoft Graph emulator (@yolk-sdk/emulators/microsoft). Write cases create their own event,
draft, or folder and remove it again automatically when its id is recoverable, failing with
MicrosoftConformanceRestoreFailed when the removal fails or a create returns no id. An ambiguous
create (transport or decoding failure, no status, HTTP 408, or HTTP 5xx) fails with
MicrosoftConformanceActionFailed (createOutcome: 'unknown'); both messages carry manual-recovery
advice. The create is not interruptible and the runner has no request timeout. The one
write-irreversible case, microsoft.teams.send-chat-message, posts a real Teams chat message naming
the seeded runId and runs live only by its exact id; an ambiguous send fails with
MicrosoftConformanceActionFailed (sendOutcome: 'unknown'). See Microsoft conformance
cases.
@yolk-sdk/connectors/email/conformance exports ten port-level email cases
(emailConformanceCases), their synthetic PortFixtures (emailConformanceFixtures), and the seeds
they replay with (emailConformanceFixtureSeeds). Yolk never speaks IMAP, POP3, or SMTP: the cases
run the real email actions over the host EmailClient, CredentialResolver, and
EmailConformanceConfig. emailClientLayerFromBackend turns any plain-JSON backend
{ call(method, request) } into the EmailClient layer (requests arrive without credential fields;
responses are decoded with each method's output schema; notEmulated fails closed), and
makeEmailReplayBackend replays the fixtures: each fixture answers at most once, and a call takes
the first unused matching fixture. Testing only, never a production
adapter. See Email conformance cases.
@yolk-sdk/connectors/dropbox/conformance exports eight Dropbox cases (dropboxConformanceCases),
their synthetic fixtures (dropboxConformanceFixtures), and the seeds they replay with
(dropboxConformanceFixtureSeeds). Cases need ConnectorHttpClient,
ConnectorBinaryWriteHttpClient (the upload case runs createDropboxFile / updateDropboxFile),
CredentialResolver, and DropboxConformanceConfig (seed paths in a practice Dropbox account).
Every case runs the real connector actions or host-only helpers. Write cases work only inside an
invocation-unique yolk-conformance-<runId>-* folder (the runId seed; the live runner generates a
fresh one each time, so concurrent runs are supported only through distinct run ids). A definitive
create rejection deletes nothing; an ambiguous create fails with DropboxConformanceActionFailed
(createOutcome: 'unknown') naming the exact path; successful creates are deleted by id and
verified, failing with DropboxConformanceRestoreFailed when that fails; and a path outside the
case folder is never deleted (DropboxConformanceCleanupRefused). Every write inside the case
folder (the create, copy, move, upload, and delete) is not interruptible, and the runner has no
request timeout. findDropboxConformanceLeftovers lists, read-only, the folders under
workFolderPath whose names start with dropboxConformanceRunFolderPrefix
(yolk-conformance-run-; every valid runId starts with run-). The Dropbox emulator
(@yolk-sdk/emulators/dropbox) passes every case offline. See
Dropbox conformance cases.
@yolk-sdk/connectors/notion/conformance exports eight Notion cases (notionConformanceCases),
their synthetic fixtures (notionConformanceFixtures), and the seeds they replay with
(notionConformanceFixtureSeeds). Cases need ConnectorHttpClient, CredentialResolver, and
NotionConformanceConfig (seed ids in a practice Notion workspace). Every case runs the real
connector actions; the pinned-version case observes the outgoing Notion-Version at the
ConnectorHttpClient port. The write case creates its own page and moves it to the trash again,
failing with NotionConformanceRestoreFailed when that fails; an ambiguous create fails with
NotionConformanceActionFailed (createOutcome: 'unknown') and manual-recovery advice. The create
is not interruptible and the runner has no request timeout. findNotionConformanceLeftovers
searches, read-only, bounded (at most 10 search pages), and best effort, for untrashed
yolk-conformance page pages; findDropboxConformanceLeftovers likewise reads at most 50
listing pages. The Notion emulator (@yolk-sdk/emulators/notion) passes every case offline. See
Notion conformance cases.
@yolk-sdk/connectors/todoist/conformance exports eight Todoist cases (todoistConformanceCases),
their synthetic fixtures (todoistConformanceFixtures), and the seeds they replay with
(todoistConformanceFixtureSeeds). Cases need ConnectorHttpClient, CredentialResolver, and
TodoistConformanceConfig (seed ids in a practice Todoist account). Every case runs the real
connector actions. Write cases each create their own invocation-unique
yolk-conformance-<runId>-<case> project under workProjectId and delete it again by id, failing
with TodoistConformanceRestoreFailed when that fails. A definitive create rejection deletes
nothing; an ambiguous create fails with TodoistConformanceActionFailed (createOutcome: 'unknown')
naming the exact project or task; and a created project without the requested name or with a
seeded project's id, or a task outside the case project, is never deleted
(TodoistConformanceCleanupRefused). No write is interruptible, and the runner has no request
timeout. The cleanup verifies that the project is gone; that its tasks go with it is checked only
by the delete case. findTodoistConformanceLeftovers lists,
read-only and bounded (at most 20 listing pages), the active projects whose names start with
todoistConformanceRunProjectPrefix (yolk-conformance-run-); the project paging case
(todoist.projects.list-cursor-paging) sends its listing request, so a fixture records it. See
Todoist conformance cases.
@yolk-sdk/connectors/telegram/conformance exports four Telegram cases
(telegramConformanceCases), their synthetic fixtures (telegramConformanceFixtures, whose URLs
carry the synthetic telegramConformanceReplayBotToken), and the seeds they replay with
(telegramConformanceFixtureSeeds). Cases need ConnectorHttpClient, ConnectorBinaryHttpClient
(the file case runs downloadTelegramFile), CredentialResolver, and TelegramConformanceConfig
(a practice chat id, a file id, and the run id). The Telegram actions read only HTTP statuses, so
claims about the Bot API ok field are observed at the ports; the host-only downloadTelegramFile
decodes the getFile result. The send case is write-irreversible: a sent
message cannot be deleted through the connector, so it runs only when a person names its exact id
(allowIrreversible); an ambiguous send (including a 2xx whose body lacks ok: true) fails with
TelegramConformanceActionFailed (sendOutcome: 'unknown') naming the text to look for in the
chat. There is no leftover lookup.
See Telegram conformance cases.
@yolk-sdk/connectors/github/conformance exports eight GitHub cases (githubConformanceCases),
their synthetic fixtures (githubConformanceFixtures), and the seeds they replay with
(githubConformanceFixtureSeeds). Cases need ConnectorHttpClient, CredentialResolver, and
GithubConformanceConfig (the practice repository's owner and repo, a work issue, a label, a
text file, and the run id). Every case runs the real connector actions; claims about response bodies
the actions only partly read are observed at the ConnectorHttpClient port. The comment and label
cases are write-reversible: each write names the invocation-unique runId or works only on the
seeded work issue and label, is not interruptible, and is undone by id and verified, failing with
GithubConformanceRestoreFailed when that fails; they cannot undo the notification to the work
issue's subscribers or the label timeline events, so the work issue must be a practice issue nobody
else watches. A definitive rejection undoes nothing; an ambiguous write fails with
GithubConformanceActionFailed (writeOutcome: 'unknown') naming the exact item; an answer outside
the run namespace is never adopted (GithubConformanceCleanupRefused). The issue lifecycle case is
write-irreversible: GitHub issues cannot be deleted through the REST API, so the issue it opens
stays in the repository, closed, and it runs only when a person names its exact id.
findGithubConformanceLeftovers lists, read-only and bounded, open yolk-conformance run-* issues,
run comments on the work issue, and the seeded label on it; the open-listing case
(github.issues.open-listing) sends its listing requests, so a fixture records them. See GitHub conformance
cases.
@yolk-sdk/connectors/google/conformance exports nineteen Gmail, Calendar, and Drive cases
(googleConformanceCases), their synthetic fixtures (googleConformanceFixtures), and the seeds
they replay with (googleConformanceFixtureSeeds). Cases need ConnectorHttpClient,
CredentialResolver, and GoogleConformanceConfig (a practice mailbox address, practice messages
and a label, a practice calendar and time range, a practice Drive folder and file, and the run id).
Every case runs the real connector actions; answers an action returns undecoded are decoded in the
case, and error bodies are observed at the ConnectorHttpClient port. The label, draft, trash,
event, and folder cases are write-reversible: each write names the invocation-unique runId or
works only on the seeded work message, is not interruptible, and is undone by id and verified,
failing with GoogleConformanceRestoreFailed when that fails. Events never have attendees, so no
invitation is ever sent; the folder case trashes its folder and then deletes it permanently. A
definitive rejection undoes nothing; an ambiguous write fails with GoogleConformanceActionFailed
(writeOutcome: 'unknown') naming the exact item; an answer outside the run namespace is never
adopted (GoogleConformanceCleanupRefused). The send case is write-irreversible: Gmail cannot
unsend, so it runs only when a person names its exact id, and it sends one message whose only
recipient is the seeded practice address. findGoogleConformanceLeftovers lists, read-only and
bounded, run labels and drafts, the work message in Trash, run events, and run Drive items; the
label-listing, draft-search, free-text-query, and trashed-listing cases send its requests, so
fixtures record them. See Google conformance cases.
@yolk-sdk/connectors/linkedin-search/conformance exports seven LinkedIn search cases
(linkedInSearchConformanceCases), their synthetic fixtures (linkedInSearchConformanceFixtures,
whose people, companies, and profile URLs are all obviously synthetic), and the seeds they replay
with (linkedInSearchConformanceFixtureSeeds). Cases need ConnectorHttpClient,
CredentialResolver (two API keys, one per slot: linkedInSearchConformanceCredentials keys them
for staticCredentialResolverLayer), and LinkedInSearchConformanceConfig (an Exa people query, a
profile URL, and a profile URL that names no profile). Every case runs the real connector actions
and is a read: Exa people search results and its numResults limit, the Enrich Layer profile and
email lookup answers, an unknown key at each provider, and a missing profile. Answers the actions
decode only partly are observed at the ConnectorHttpClient port. There is nothing to clean up and
no leftover lookup. Live recordings hold real third parties' personal data: promoting one replaces
each recorded 2xx body wholesale with a minimal synthetic body that keeps only the keys and types
the case reads. See LinkedIn search conformance
cases.
@yolk-sdk/connectors/kie/conformance exports six Kie cases (kieConformanceCases), their
synthetic fixtures (kieConformanceFixtures), and the seeds they replay with
(kieConformanceFixtureSeeds). Cases need ConnectorHttpClient, CredentialResolver, and
KieConformanceConfig (a finished success task id, a finished fail task id, a public
first-frame URL, and the run id). Four reads (a finished task with result URLs, a failed task read
as a success, an unknown task id answering Kie code 404 or 422, an invalid key answering
kie_unauthorized) and two write-irreversible creates (every task spends credits and the
connector cannot cancel one), which run only when a person names their exact ids. Envelope code
and HTTP status claims are observed at the ConnectorHttpClient port. A create whose outcome is
unknown fails with KieConformanceActionFailed (taskOutcome: 'unknown') naming the run id to look
for. There is nothing to clean up and no leftover lookup. See Kie conformance
cases.
@yolk-sdk/connectors/r2-storage/conformance exports six port-level R2 cases
(r2ConformanceCases), their synthetic PortFixtures (r2ConformanceFixtures), and the seeds they
replay with (r2ConformanceFixtureSeeds). The connector never talks to R2 itself: the cases run
r2_storage.upload_url over the host R2Presigner and the host-only getR2Object /
createR2Object / updateR2Object over the host R2ObjectClient, plus CredentialResolver and
R2ConformanceConfig. r2PortsLayerFromBackend turns any plain-JSON backend { call(port, method, request) } into both port layers (requests never carry the credentials or the integration;
notEmulated fails closed), and makeR2ReplayBackend replays the fixtures. The two write cases are
write-irreversible: the connector cannot delete R2 objects, so they run only when named by exact
id, write only under yolk-conformance/<runId>/, and report an ambiguous put (any port failure but
conflict) with the exact bucket and key. Presigned URLs in fixtures carry only synthetic
credential placeholders: next to the shared scanPortFixtureForSecrets, the fail-closed
findR2PortFixtureSecrets refuses any X-Amz-Signature, X-Amz-Credential, or
X-Amz-Security-Token name outside an exact canonical placeholder occurrence, in any letter case,
raw or in any variant reachable with up to three rounds of percent-decoding and three of
escape-decoding (JSON \uXXXX, \xXX, \\, numeric HTML character references), in any order,
prose included (deliberate obfuscation is out of scope: a person reviews every recording), and
scrubR2PortFixture rewrites a recorded fixture to the placeholders (not escaped URLs: rerun both
scans). Live verification needs a host implementation of both ports; no live R2 runner ships. See
R2 conformance cases.
When a case is interrupted, the run no longer produces a report, and no further case starts. So
Dropbox, Notion, Todoist, GitHub, Google, and Microsoft write cases, the Fortnox row and customer
mutation cases, the Telegram and Gmail sends, and the R2 puts also hand a cleanup problem raised during the interruption
(a failed cleanup, or a create, send, or put whose outcome is unknown) to ConformanceCleanupReporter
from @yolk-sdk/connectors/conformance, a Context.Reference whose default logs it with
Effect.logWarning. The Fortnox rejection case and the Fortnox email send do not report. With the
Effect version this repository pins (4.2.0), such a run ends as a plain interruption, just like a
run whose cleanup succeeded: Effect drops a typed failure whose recovery handler the interruption
skipped, so the reporter is the only record of the cleanup problem. Drills in the connector tests
pin this, so an Effect upgrade that changes it fails visibly. The Dropbox, Notion, Todoist,
Telegram, GitHub, and Google live runners print reported problems to stderr as WARN lines. Their first
SIGINT/SIGTERM interrupts the run fiber so the cleanup is attempted; duplicates within a second (one
Ctrl-C reaches every process of the foreground group, and the wrappers relay it) are ignored, and a
later signal exits at once. An interrupted run exits with code 130, whether or not its cleanup
succeeded; the WARN lines tell which. After that exit the read-only leftover lookup runs again and
lists what is still present. Run live runs as pnpm conformance:<provider> or with tsx directly:
pnpm exec tsx returns to the prompt at once on Ctrl-C (observed), so later output prints after the
prompt, $? is pnpm's own code, and the runner is then stopped with kill -TERM <pid> (the
first-signal message prints the pid).