You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Org profile endpoint runs uncached D1 queries per request #183
GET /api/orgs/:owner is a bare defineEventHandler with no route or read-through cache, so every crawler hit runs five-plus D1 queries plus per-repo upstream fetches, which is the recurring D1 overload culprit (SKILLD-1M, SKILLD-1N, and the 2026-08-05 orgs family).
Verify with:pnpm vitest run test/unit/org-profile-cache.test.ts
Estimated to change 2 files.
The sentry-checkin routine opened this issue automatically on its 2026-09-08T20:20:00.000Z run. It is not Harlan's own report. Close it to reject the proposal, and the reason you give stops it being offered again.
Summary: Confirmed by code inspection: layers/registry/server/api/orgs/[owner].get.ts is a bare defineEventHandler, so every request runs the querySkills D1 pass, owners table read/fetch, resolveRepoSourceIdentitiesForOwner, getGeneratedBatch tags q
Next action: Write the failing test test/unit/org-profile-cache.test.ts (assert a second call to the handler's compute path is served from the SWR cache with one D1 pass), then wrap the handler body in cached() from #shared/server/cache with a per-owner key (e.g. orgs:profile:v1:), stale window, and event.waitUntil schedule; verify with pnpm vitest run test/unit/org-profile-cache.test.ts.
Activity
harlan-github-agent commentedon Sep 8, 2026
🤖 ISSUE TRIAGE