Reconcile purge against remote by hashed key, not human ID #183

Merged
clawbot merged 1 commits from issue-160-purge-reconcile-by-remote-key into next 2026-09-22 12:11:49 +02:00
1 Commits
Author SHA1 Message Date
sneak d7e150f52b Reconcile purge against remote by hashed key, not human ID (closes #160)
check / check (pull_request) Successful in 3m21s
syncWithRemote compared human snapshot IDs against the hashed
metadata/<key>/ directory names, which never match, so it deleted every
local snapshot record; the purge that followed then found nothing to
remove remotely. Reconcile via listAllRemoteSnapshotKeys and
RemoteSnapshotKey(id), matching CleanupLocalSnapshots, so a row still
backed by remote metadata is kept.

The purge tests only passed because their stubs used the human-ID layout
production never writes; they now write metadata under the hashed remote
key. New tests prove remotely-backed local rows survive the reconcile and
that a purge removes the local row and remote metadata together.

Model: opus-4-8
2026-09-22 09:56:03 +00:00