Repository navigation
fix: unblock local restore after stale Drive state - #827
Conversation
|
Warning Review limit reachedNext included review available in 53 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository: FreeOpenSourcePOS/FloCafe/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
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 |
|
SummaryCoverage focused on database restore and recovery behavior, including normal lifecycle handling, stale or damaged recovery state, cleanup protection, and offline operation. The run exercised business-logic and adversarial edge cases rather than UI or presentation behavior. Not safe to merge yet — this PR has a high-severity restore-safety failure that can allow an import to proceed while recovery state is ambiguous, removing protection against incorrect or lost data. An unrelated medium-severity offline import issue remains a flag for later and does not drive this verdict. Tests run by ItoAdditional Findings DetailsThese findings are unrelated to the current changes but were observed during testing. 🟡 Offline imports can fail before restoring data
Evidence PackageTip Reply with @itoqa to send us feedback on this test run. |
|
SummaryCoverage spans normal and recovery restore flows, including stale-state cleanup, retries after failures, schema-mismatch safety, and continued operation afterward. It also exercises concurrency and edge cases around duplicate restores, Drive work cancellation and queuing, activation failures, and account-state protection, including adversarial scenarios that cannot occur through real application paths. Safe to merge — the run shows no PR-attributable regressions, new failures, or previously flagged failures, and the restore and synchronization protections behave correctly across happy paths, recovery paths, and concurrency edge cases. Any limitations are coverage observations rather than merge-blocking defects. Tests run by Ito
Tip Reply with @itoqa to send us feedback on this test run. |


Intent
Review PR #827 for actionable bugs or regressions, fix approved actionable items, update the PR, and merge it if checks are clean. Preserve the surgical scope of the local backup restore conflict fix and keep active or ambiguous restore conflicts protected.
What Changed
Risk Assessment
✅ Low: The change is narrowly scoped and preserves protection for active, concurrent, and ambiguous restore states while recovering only provably stale boundaries.
Testing
Installed locked dependencies, ran focused backup/Drive tests, built the app, and exercised clean, ambiguous, and active restore boundaries through real Electron preload IPC in an isolated profile. Evidence was captured in the linked log; generated artifacts were removed.
Evidence: Live restore conflict evidence
clean success; ambiguous and active restores returned conflict; 1 passedPipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 1 issue found → auto-fixed ✅
main/ipc.ts:240- Atmain/ipc.ts:240-241, the newconfiguredcheck skipsprepareForDatabaseRestore()whenever OAuth configuration is unavailable. A persisted ambiguous recovery boundary can still be active in that state, sorestore-backupcan proceed intorestoreBackup()and thefinallyblock may release another restore's boundary. This contradicts the required criterion to "keep active or ambiguous restore conflicts protected" and can overwrite the database while recovery is unresolved. Keep the conflict guard independent of Drive configuration;prepareForDatabaseRestore()already distinguishes recoverable stale markers from active or ambiguous states.🔧 Fix applied.
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
npm run test:backupnpm run test:google-drivenpm run buildnpm run build:frontendTargeted Playwright Electron live drive✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.