From 13a35a986a7ec3f71233071095e18f412cc49a54 Mon Sep 17 00:00:00 2001 From: clawbot <35+clawbot@noreply.example.org> Date: Mon, 9 Nov 2026 07:43:24 +0100 Subject: [PATCH] Correct two false doc comments (closes #403) Two doc comments described behaviour that no longer exists. The comment on `ExportSnapshotMetadata` described an SQL dump uploaded under `snapshots/`; it now lists the steps the function performs and the two keys it writes. The comment on `EnsureStorageBinding` named `vaultik database purge`; the command is `vaultik database delete`. Comments only. Model: opus-5-5 --- internal/snapshot/snapshot.go | 12 +++++++----- internal/vaultik/storage_bind.go | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/internal/snapshot/snapshot.go b/internal/snapshot/snapshot.go index 80b032c..80c764e 100644 --- a/internal/snapshot/snapshot.go +++ b/internal/snapshot/snapshot.go @@ -271,16 +271,18 @@ func (sm *SnapshotManager) CompleteSnapshot( return sm.MarkSnapshotComplete(ctx, snapshotID) } -// ExportSnapshotMetadata exports snapshot metadata to S3 +// ExportSnapshotMetadata exports snapshot metadata to the backup destination store // // This method executes the complete snapshot metadata export process: // 1. Creates a temporary directory for working files // 2. Copies the main database to preserve its state // 3. Cleans the copy to contain only current snapshot data -// 4. Dumps the cleaned database to SQL -// 5. Compresses the SQL dump with zstd -// 6. Encrypts the compressed data with age (always; recipients are required) -// 7. Uploads to S3 at: snapshots/{snapshot-id}.sql.zst[.age] +// 4. Vacuums the copy to remove the deleted data +// 5. Compresses the copy with zstd +// 6. Encrypts the compressed copy with age (always; recipients are required) +// 7. Builds the blob manifest from the copy, compressed but not encrypted +// 8. Uploads the database to metadata/{remote-key}/db.zst.age +// 9. Uploads the manifest to metadata/{remote-key}/manifest.json.zst // // The only caller (finalizeSnapshotMetadata) does not close the main database // before calling this method: the index is copied at dbPath while it is still diff --git a/internal/vaultik/storage_bind.go b/internal/vaultik/storage_bind.go index d72ae34..c3dcc83 100644 --- a/internal/vaultik/storage_bind.go +++ b/internal/vaultik/storage_bind.go @@ -30,7 +30,7 @@ var errStorageBindingMismatch = errors.New( // nothing and return nil. // - When the two differ, refuse with an error that tells the user // how to recover (revert the config, or run `vaultik database -// purge` to discard the local index and rebuild against the new +// delete` to discard the local index and rebuild against the new // destination on the next backup). // // Read-only inspection commands (remote info, snapshot list, etc.)