Behavior observed in the published SDK
The following probes run under Bun 1.4.5 with Effect 4.1.5, Core 7.0.8, request 10.0.16, the umbrella’s REST endpoint methods 17.0.0 and paginate-rest 14.0.0, and the separately installed methods 18.0.0 and paginator 16.0.0. The fake fetch returned synthetic responses locally. Run the transport probes with bun run --cwd tools probe after installing the locked research dependencies.
| Probe | Setup | Result and design implication |
|---|---|---|
| Cold request and fiber interrupt | Build Effect.tryPromise around client.request("GET /user", { request: { signal } }). The fake fetch waits for its signal. Run in a fiber, wait for transport entry, then interrupt. |
Zero fetches at construction. The active fetch observed abort. Keep the promise allocation inside the thunk. |
| Iterator-level signal | Fake fetch returns an empty array plus a Link to page two, followed by an empty array. Pass a known signal in the route iterator’s initial options. | Two page fetches, neither received that signal. An empty page also did not mean traversal was complete. |
| Defaulted page method | Same two responses, supply client.rest.pulls.list.defaults({ request: { signal } }) as the iterator’s method. |
Both page fetches received the identical signal. The probe covered the defaulted pulls.list method on one fake transport. The pagination contract covers the other call forms and cancellation races. |
A minimal reproduction of the signal comparison:
const args = { owner: "o", repo: "r", request: { signal } }const route = "GET /repos/{owner}/{repo}/pulls"const method = client.rest.pulls.list.defaults(args)for await (const page of client.paginate.iterator(route, args)) { /* drain */ }for await (const page of client.paginate.iterator(method)) { /* drain */ }// In fake fetch record init.signal === signal separately for each run.Findings from source inspection
Section titled “Findings from source inspection”- The umbrella installs retries and throttling by default. The REST distribution uses a different constructor composition. An adapter-added retry changes the number of upstream attempts. Umbrella · REST
- The REST iterator creates mutable URL state outside its iterator factory and provides no return method. The GraphQL iterator similarly closes over its cursor state. Construct a new iterable for each Effect stream run. REST · GraphQL
- A transport rejection can appear as an Octokit RequestError with status 500 but no response. A received GraphQL error can carry data even when HTTP succeeded. Preserve both distinctions. Fetch wrapper · GraphQL
- App’s optional OAuth and webhooks properties throw when absent. Its installation URL builder can perform I/O. OAuthApp’s authorization URL builder returns synchronously and can generate state. App · Installation URL · OAuth URL
- OAuth event registration has no corresponding public remove. Webhooks has removal for named/wildcard listeners; the runtime uses a special error key that the public removal type does not advertise. Handle lifetime explicitly. OAuthApp · Webhooks
- The umbrella’s named-method and pagination packages resolved
@octokit/types@16.0.0; the request package resolved 18.0.0. The standalone research plugins resolve their own declarations. See the plugin comparison. Route differences