Revert "Revert "fix(cost-insights): decouple usage rollups and gate plan suggestions""#4596
Conversation
…lan sugg…" This reverts commit 4567f02.
| if (await repairClaimedDailyUsageRollup(database, row)) { | ||
| summary.repaired += 1; | ||
| } else { | ||
| await failDailyUsageRollupRepair(database, row, 'daily_usage_rollup_repair_deferred'); |
There was a problem hiding this comment.
WARNING: Deferred repairs are not counted in the summary
When repairClaimedDailyUsageRollup returns false (claim lost / advisory lock contended), the row is requeued via failDailyUsageRollupRepair, but it is not added to summary.failed. Callers that assume claimed === repaired + failed.length will silently undercount outstanding/backlogged repairs (e.g. { claimed: 5, repaired: 3, failed: [] } while 2 rows were actually deferred). Consider recording deferred rows in the summary as well so monitoring/alerting reflects the true outstanding backlog.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (15 files)
( Fix these issues in Kilo Cloud Reviewed by claude-sonnet-5 · Input: 32 · Output: 11K · Cached: 730.8K Review guidance: REVIEW.md from base branch |
Reverts #4594