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
fix(ops): the nightly R2 prune never leaves the first page #107
It never reads listed.cursor / listed.truncated, so it only ever inspects the first 100 keys in lexicographic order. Cache keys are corx/v1/<sha256> — random order — so an expired object at position 5,000 becomes visible only after the 4,900 before it have been deleted. In practice the bucket grows without bound for any deployment with more than a page of distinct cached URLs (free tier storage is 10 GB). FEATURES.md says "a 100-object batch", which is honest about the size but not about the consequence.
Lazy expiry on read (cache.ts → getCached) only reclaims URLs that are requested again, so a long tail of one-shot URLs is never freed at all.
Change
Sweep pages: follow cursor while truncated, bounded by a per-run budget (a page count and/or key count) so the cron stays inside its own Class A ops budget.
Keep the run idempotent and non-fatal (it is today).
State the real bound in FEATURES.md / README.md instead of "a 100-object batch".
Acceptance
A bucket with 250 keys, 200 of them expired, is fully pruned across runs (test the multi-page walk with a cursor-returning mock).
The budget caps the number of list calls per run and is documented.
Activity