Skip to content

[W-11] Harden the GitHub REST client - #334

Merged
EmersonBraun merged 3 commits into
mainfrom
codex/w11-github-client
Oct 3, 2026
Merged

EmersonBraun merged 3 commits into
mainfrom
codex/w11-github-client

Conversation

@EmersonBraun

Copy link
Copy Markdown
Member

What

Route both GitHub review-state and SCM requests through one internal REST client with consistent API/auth headers, bounded JSON reads, same-origin redirects, Link pagination, and rate-limit handling.

Why

GitHub pagination and primary/secondary rate limits were handled differently between the two modules, and list calls could silently stop at the first page. The request path now honors Retry-After and x-ratelimit-reset for rate-limited GETs while keeping writes single-attempt.

How

  • Add the internal src/github-api-client.ts helper and use @agentskit/net 0.2.2 retry and bounded-read primitives.
  • Follow same-origin Link: rel="next" links for pull requests, file lists, comments, reviews, check runs, and commit statuses, with existing safety caps preserved.
  • Add real localhost node:http coverage for three-page pagination, 429 and secondary 403 recovery, primary reset handling, no POST retry, oversized bodies, and redirects.
  • Refresh generated Doc Bridge and README freshness metadata.

Reuse

Published @agentskit/net 0.2.2 provides fetchWithRetry, retry, parseRetryAfter, and readJson; @agentskit/integrations 0.8.1 has GitHub service descriptors and generic HTTP projection, but no GitHub-specific REST client. The shared primitives cover this change, so no Octokit dependency is needed.

Validation

  • npm ci and npm ci --prefix apps/docs
  • npm run check — passed; 327 tests and all configured docs, public API snapshot, CLI help, and README gates passed.
  • npm pack --dry-run — passed.
  • git diff --check — passed.
  • Public API snapshot unchanged.

@EmersonBraun
EmersonBraun merged commit aa8d0fb into main Oct 3, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant