Add EvalOps memory export and wipe controls#51
Conversation
PR SummaryMedium Risk Overview Extends the memory sync subsystem with cloud-copy maintenance tools: a settings UI action to export all Kestrel-owned synced memory (paged by type) to a JSON file, and a confirmed wipe action that deletes those remote memories and clears the local retry queue to prevent re-population. Reviewed by Cursor Bugbot for commit f24a831. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.
Reviewed by Cursor Bugbot for commit f24a831. Configure here.
| throw new Error('evalops_memory_offline') | ||
| } | ||
| memories.push(...response.memories) | ||
| if (!response.hasMore && response.memories.length < limit) break |
There was a problem hiding this comment.
Pagination loop break condition may cause infinite loop
High Severity
The break condition in listKestrelSyncedMemories uses && instead of ||. The expression !response.hasMore && response.memories.length < limit only breaks when both conditions are true. If the server returns hasMore: true with an empty memories array (or any count below limit), !response.hasMore is false, so the && short-circuits to false and the loop never terminates. This is an infinite loop that would hang both the export and wipe operations. The operator needs to be || so that either signal — no more pages or a short page — is sufficient to stop.
Reviewed by Cursor Bugbot for commit f24a831. Configure here.


Summary
Refs #15.
Validation
npm run buildgit diff --checkValidation caveat
npm teston this branch because the previous run in the same fresh clone failed inaudio-data-size.test.mjs: the local WAV duration reported0.0sdespite mic buffers and a 158 KB mic file. The TypeScript/Electron build for this change is clean.