Implement unique filename generation to prevent overwriting existing session files #4

Merged
space merged 1 commits from no-overrides into main 2026-04-08 20:16:19 +02:00
Owner
No description provided.
space added 1 commit 2026-04-08 20:13:03 +02:00
Author
Owner

@luna review

@luna review
Collaborator

Nice fix. The new getUniqueFilePath helper does what we want and prevents filename collisions by appending -1, -2, etc., and wiring it into the write path looks clean. Non-blocking note: this is still check-then-write, so there is a tiny race window under concurrent writes. If we ever want to harden it fully, we can switch to atomic creation (open with wx) or temp-file + rename. LGTM from my side.

Nice fix. The new `getUniqueFilePath` helper does what we want and prevents filename collisions by appending `-1`, `-2`, etc., and wiring it into the write path looks clean. Non-blocking note: this is still check-then-write, so there is a tiny race window under concurrent writes. If we ever want to harden it fully, we can switch to atomic creation (`open` with `wx`) or temp-file + rename. LGTM from my side.
luna approved these changes 2026-04-08 20:14:57 +02:00
space merged commit 6fb7697c0c into main 2026-04-08 20:16:19 +02:00
space deleted branch no-overrides 2026-04-08 20:16:23 +02:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: space/openclaw-propper-session-memory#4