Skip to content

Add bounded GitHub API timeouts, retries, and sanitized structured errors #37

Description

@cervantesh

Maturity context

  • Project maturity: operational (66/100)
  • Dimension: performance_reliability
  • Priority: high

Evidence

  • src/api.ts createClient calls fetch without AbortSignal or timeout
  • Non-2xx handling embeds the full response text in Error.message
  • Response request IDs and rate-limit headers are discarded
  • docs/OPERATIONS.md asks operators to record GitHub request IDs when available

Scope

  • Add a configurable internal request timeout with a safe documented default.
  • Retry only idempotent/read operations and explicitly safe transient failures with bounded exponential backoff and jitter.
  • Parse status, request ID, rate-limit headers, and sanitized GitHub error fields into a typed error.
  • Redact authorization material and cap response-body text in surfaced errors.
  • Expose enough structured detail for recovery without logging automatically.

Acceptance criteria

  • A hanging mocked request aborts within the configured timeout.
  • 429 and retryable 5xx fixtures follow the bounded retry policy; unsafe mutations are not duplicated.
  • Errors include status and request ID when present but never tokens or full sensitive bodies.
  • Rate-limit exhaustion produces an actionable reset/retry signal.
  • docs/OPERATIONS.md documents timeout, retry, and error fields.

Help wanted

Requires careful reliability and security review; mocked response fixtures make it independently testable.


Generated from the repository maturity assessment dated 2026-07-11. Do not include credentials, customer data, or local-only files in public discussion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    authAuth and permission handlinghelp wantedCommunity or collaborator help is welcome.maturityWork derived from a repository maturity assessment.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions