Expire recovery scores after source deletion - #1969
Conversation
Add recovery input and score tombstones, migrate existing ClickHouse tables, and filter deleted rows from API consumers. Closes #1771
|
🤖 Review skipped: Repository rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours per repository. Upgrade to a paid plan for unlimited reviews. |
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Warning Review limit reached
Next review available in: 37 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (22)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Summary by QodoExpire recovery inputs/scores when their source data is deleted
AI Description
Diagram
High-Level Assessment
Files changed (22)
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
163 rules✅ Skills:
fix-provider, write-tests, cloudflare 1.
|
|
Storybook previews for This comment updates automatically on each PR push. |
Compare null-safe recovery input values before appending so unchanged rows do not advance downstream incremental refreshes.
|
🤖 Review skipped: Repository rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours per repository. Upgrade to a paid plan for unlimited reviews. |
# Conflicts: # src/db/clickhouse-migrations/registry.test.ts # src/db/clickhouse-migrations/registry.ts
|
🤖 Review skipped: Repository rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours per repository. Upgrade to a paid plan for unlimited reviews. |
Summary
Validation
pnpm lintpnpm exec tsc --noEmitpnpm exec tsc --noEmit(packages/server)pnpm test(13,563 passed, 21 skipped)pnpm exec vitest run --project integration packages/server/src/services/daily-recovery-read-model.integration.test.ts --retry=0Fixes #1771
Summary by cubic
Expire recovery inputs and scores when their source data is removed by writing tombstones and filtering them from all APIs. Also only append “dirty” input rows to avoid unnecessary incremental refreshes (addresses #1771).
Bug Fixes
is_deletedtombstones inanalytics.daily_recovery_inputsandanalytics.daily_recovery, preserving existing keys so deletions are captured.is_deleted = 0across server queries (stress, recovery, dashboard, mobile) and add an end-to-end ClickHouse lifecycle test.Migration
0057_daily_recovery_lifecycleto addis_deleted UInt8 DEFAULT 0to both recovery tables.Written for commit 4f44f0e. Summary will update on new commits.