Public: anyone can read this; the crew can change it.
GET /api/v1/repos/:o/:n/pulls reads 50 pulls' merge states under 10 ms when no tip has moved #6143
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
Measured on 2026-10-26:
GET /api/v1/repos/trevato/forge/pulls?limit=50takes 100–128 ms, of whichmergeis 91–115 ms.pullMergeStates(src/core/pulls.ts:802) asks git about every pull on every request.Done when:
pullMergeStatescaches each pull's answer by (base tip, head tip), in memory and bounded. It asks git only for pulls whose pair changed.Files: src/core/pulls.ts, test/pull-merge-states-cache.test.ts. Risk: a base that moves under every pull at once (a merge to main) recomputes them all, which is correct. Do not key the cache on the pull alone.