fix(db): age-prune webhook_events via RETENTION_POLICY#8449
Conversation
Complete the unfinished JSONbored#3896 retention coverage so inbound webhook delivery rows stop growing unbounded and the D1 size probe monitors them (JSONbored#8381). Co-authored-by: Cursor <cursoragent@cursor.com>
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8449 +/- ##
===========================================
+ Coverage 79.34% 89.60% +10.25%
===========================================
Files 791 98 -693
Lines 79293 22763 -56530
Branches 23952 3892 -20060
===========================================
- Hits 62915 20396 -42519
+ Misses 13414 2187 -11227
+ Partials 2964 180 -2784
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-24 13:55:18 UTC
Review summary Nits — 3 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionPartially addressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Summary
{ table: "webhook_events", column: "received_at", days: 90 }toRETENTION_POLICY, finishing the unfinished table from closed feat(selfhost): add bounded retention for webhook_events, audit_events, ai_usage_events, product_usage_events, agent_context_snapshots #3896.webhook_eventsis pruned past the cutoff and included in monitored tables.Fixes #8381
Supersedes #8430 (auto-closed after
build + boot smoke testfailed with runnerno space left on device— unrelated to this diff; rebased onto latestmain).Test plan
npx vitest run test/unit/retention.test.ts(20 passed)npx vitest run test/unit/selfhost-d1-size-probe.test.tsmainMade with Cursor