fix(large-refs): cleanup based on table read#4716
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview Durable large-value writes now register owner + dependency metadata when persisting ( Log and pause/snapshot persistence now updates reference tables ( Also tightens Reviewed by Cursor Bugbot for commit 4812504. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4812504. Configure here.
Greptile SummaryThis PR replaces a costly
Confidence Score: 3/5The core logic is well-designed and test coverage is solid, but the storage-delete-before-DB-mark ordering in the cleanup path can leave keys permanently uncleanable if the DB update fails and the storage provider is non-idempotent for missing objects. The cleanup path deletes files from storage before calling markLargeValuesDeleted. If the DB call throws, those keys keep deleted_at = null and are re-selected on every subsequent run. If the storage provider returns errors for non-existent objects, the circuit-breaker (result.deleted === 0 → break) silently skips them every run, leaving them permanently stuck. apps/sim/background/cleanup-logs.ts (deleteLargeValueKeys ordering) and packages/db/schema.ts (executionLargeValueReferences source column constraint) Important Files Changed
Reviews (1): Last reviewed commit: "fix(large-refs): cleanup based on table ..." | Re-trigger Greptile |

Summary
Cleanup large refs based on table ref
Type of Change
Testing
Tested manually
Checklist