Skip to content

Behavioral parity and lifetime checks

Adapter design. This page specifies the unpublished adapter. Run a request with Octokit and Effect.

Compare effective fetch parameters and returned envelopes with a real Octokit client. Use a deterministic fake transport for platform requests, a controlled clock for delays scheduled by the adapter, and a barrier at transport entry for race tests.

Case Observable evidence
Cold/repeated/concurrent operation No fetch at construction. Each run starts fresh. Cancelling A aborts only A. An already-aborted signal prevents a new fetch.
REST and transport Same method, URL, headers, body, hook order, custom fetch, upload host, defaults, response and status for raw, decorated and derived methods. Cover HEAD, 204/205, 304, redirects, binary, streaming bodies and GHES.
Errors and policy HTTP and synthetic transport 500 differ; regular 403 differs from rate limit; 429 and missing/invalid rate headers are handled. Check GraphQL partial data, unknown rejection, redaction and no extra write attempts.
Pagination Exercise Link and commit comparison, nested response normalization, 409 empty result, mapper early exit, second-page failure, blocked-pull abort, concurrent runs, empty page with next link and exact fetch count after early stop.
Auth and Apps Client identity across two installations; borrowed token cache and auth hook survive. Cover failed exchange, refresh, device denial, unconfigured subservice, missing webhook installation and partial traversal.
Hooks and inbound dispatch Preserve before/after/error/wrap, short circuit, recovery and deregistration. Valid raw signature dispatches; invalid signature invokes no normal handler. Preserve handler aggregate, wildcard registration and cleanup races.
Host and observability Observe Node fallthrough, OAuth redirect and headers, Web responses and Lambda v2 results. Check span parentage and that credentials, variables, webhook data and token responses never enter diagnostics.

For an opaque upstream operation, assert the weaker documented cancellation guarantee with an instrumented pending promise. Use synthetic credentials for the transport and parity checks.