fix(antigravity): persist replay expiry - #1613
Conversation
|
✅ Deterministic PR hygiene checks passed. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe replay expiry sweep now marks the durable snapshot dirty when it deletes sessions. A durability test verifies that flushing the snapshot removes expired sessions and their stored signatures. ChangesReplay expiry persistence
Estimated code review effort: 2 (Simple) | ~10 minutes Mergeability Score: 🟡 Moderate · up to The replay expiry fix is localized and its targeted validation passes, but the PR is still marked draft with required readiness checks incomplete, including a non-green full-suite result. Merge should wait for those checks to be completed or explicitly accepted by the owner. Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
✅ READY
Review readiness checklist
✅ 4/4 boxes ticked. This pull request is already Ready for Review. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
eb9fa39 to
a2878cd
Compare
|
@coderabbitai review |
|
067c4a7 to
ec2f7e1
Compare
|
The implementation closes the reported persistence gap with the right mutation boundary. The regression is meaningful rather than tautological: it flushes a real observed signature, performs the public expiry sweep, flushes again, and verifies both an empty persisted session list and removal of the signature text ( This is not merge-ready for today's cut. The PR remains draft, its head is based on DISPOSITION: NEEDS-CHANGE |
ec2f7e1 to
809348f
Compare
|
@coderabbitai review |
|
809348f to
f9036a8
Compare
|
Thanks for this fix. This closes a subtle but important durability gap: expired Antigravity replay sessions are no longer only removed from memory while their stored signatures can survive on disk until some unrelated later mutation. Persisting the expiry makes the one-hour replay lifetime real across restarts and idle periods too, which is cleaner both for correctness and for retained sensitive state. 🙏 |
Summary
The replay cache already expired entries in memory, but expiry did not advance the snapshot mutation generation. During an idle period, the protected
antigravity-replay.jsonfile could therefore retain an opaque thought signature after its one-hour in-memory lifetime until some unrelated replay mutation or a later load rewrote the file.Verification
bun test --isolate tests/google-antigravity-replay.test.ts tests/state-store-sweeper.test.ts(72 pass)bun run typecheckbun run privacy:scanbun test --isolate tests/model-rename-migration.test.ts(9 pass)bun test --isolate tests/state-store-sweeper.test.ts tests/shutdown-drain.test.ts tests/server-background-lifecycle.test.ts tests/storage-mutation-race.test.ts(43 pass)f9036a80798aeda68bfaa5f85b05a611b30256bais rebased ontodevata1e5192b75edbf6dcacae51a30912fab93906f87; the replay+sweeper focused set passes on Bun 1.3.14 and Bun 1.4.0-canary.1 (72 pass each), with typecheck passing on both runtimes and privacy scan passing on Bun 1.3.14.Checklist
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
All CI tests are green on my local testing.
I pushed my PR to the latest dev commit.
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit
Bug Fixes
Tests