Skip to content

pm-console edge: its own GitHub allowance, so the core does not stop when the fleet is busy #13489

Open

Description

@dezren39

Today. The edge reads pull requests, ranked issues and the owner's prompts from GitHub with the repository automation token, which is the fleet's token on the owner's account. GitHub's hourly allowance is per account. On 2026-11-23 at about 16:22Z the edge's read of pull requests failed with "API rate limit exceeded for user ID 11225574": the fleet had used the hour. The edge treats that as "one too many just now", hands the read to a machine for five minutes (whose token is the same account, so it fails too), and asks again. Nothing is lost, but the core is not readable until the hour turns.

What done looks like.

  • The edge's reads and writes of GitHub do not draw on the allowance agents draw on. Two ways, not exclusive:
    1. Conditional requests. The edge keeps each list's ETag and sends If-None-Match; an unchanged list answers 304 and costs nothing against the allowance. This needs no new identity and can be done now in ghApi (pm-stack/console/edge/src/direct.ts), with the kept answer per address held in the Durable Object.
    2. An installation token of a GitHub App of its own, which has its own allowance. This is a new identity on the account and wants the owner's say-so before it is made.
  • When the allowance is used up all the same, the app says so in those words on the screens it affects ("GitHub's hourly allowance for the account is used up; this is as of HH:MM"), not "could not be read".
  • A test in test/direct.test.ts for the conditional read (200 then 304 returns the kept answer; a changed list replaces it), and one in test/edge.test.ts that a limited read shows the last good copy with its age.

Design record: doc/2026-11-23T06-50-00Z_architecture_pm_platform_cloudflare_core/.


Generated by Claude Code

Activity

  1. added
    nextOrg Project gate: queued next — orchestrator adds to the board
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    source/agentCreated by an agent worker
    on Nov 23, 2026
  2. developing-today commented on Nov 23, 2026

    @developing-today
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/pm-stackpm-stack (Pad/Grist) in developing-today/codekind/enhancementnextOrg Project gate: queued next — orchestrator adds to the boardsource/agentCreated by an agent workerstatus:in-review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions