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
skill-files cache lacks a stale shield against cold bursts #201
The skill-files handler serves from a plain TTL cache with no stale-while-revalidate shield, so crawler sweeps over cold keys re-run the skill lookup, row read, and upstream tree fetch per request and produced 1,030 D1-overload events (SKILLD-1F), the family's largest culprit.
Verify with:pnpm vitest run test/unit/skill-files-cache.test.ts test/unit/skill-files-tree-outage.test.ts
Estimated to change 2 files.
The daily-checkin routine opened this issue automatically on its 2026-09-11T21:40: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: Handler at layers/registry/server/api/skill-files/[...slug].get.ts:83 uses plain readCache/writeCache (6h TTL, no stale window, no inflight dedup), so cold-key crawler sweeps re-run the upstream tree fetch and compute per request, producing
Next action: Migrate the handler to readThroughCache from shared/server/cache.ts, mirroring layers/registry/server/api/skill-related/[...slug].get.ts:88: wrap the tree fetch + classification in compute, bump the cache key to v4 because readThroughCache stores a {storedAt,value} envelope, map treeResult gone/unavailable to their thrown 410/503 errors, serve stale on compute failure, then add test/unit/skill-files-cache.test.ts (cold miss, fresh hit, stale fallback on upstream failure) and verify with pnpm vitest run test/unit/skill-files-cache.test.ts test/unit/skill-files-tree-outage.test.ts.
Activity
harlan-github-agent commentedon Sep 11, 2026
🤖 ISSUE TRIAGE