fix(history): harden GC and delete follow-ups, query-aware Home/End - #1477
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (12)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe changes update prompt-history capture warnings and selector key handling, combine store deletion outcomes into a notice, and adjust concurrent-write handling and compaction eligibility. Tests and documentation cover these changes. ChangesPrompt history
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The history changes are mergeable after normal checks. The remaining double-write failure was possible before this PR and is less likely with the new fallback. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to Deletion handling is better at reporting partial failures, but the new compaction rule can leave a hidden prompt on disk longer. In a narrow high-volume case, that prompt could become visible again after its deletion record expires. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
Closes #1476
Summary
Home/Endquery-aware in the selector.rmdirfailure is caught by the caller; sweepENOENTduring GC never reports a false delete).Changes
extensions/history/store.ts.carry-*.jsonlsibling that drains like any store file.extensions/history/index.tsHome/Endgo to the search caret when the query is non-empty.extensions/history/selector-helpers.tsstoreDeleteNoticeand the combined partial-failure text.docs/prompt-history.mdtests/…Test plan
node --experimental-strip-types --test tests/*.test.ts→ 3826 pass, 0 fail, 43 skipped.node scripts/check-types.mjs→ no regressions against the recorded baseline.Summary by CodeRabbit
Bug Fixes
Documentation