Bind the local index to the s3.* destination too #329

Merged
clawbot merged 1 commits from issue-298-bind-s3-fields into next 2026-10-13 03:48:37 +02:00
Collaborator

Fixes #298.

What was wrong: the local index was bound to its destination only through storage_url. With the s3.* form nothing was checked, so after s3.bucket or s3.prefix changed, the next backup treated every chunk as already stored, uploaded nothing, and completed a snapshot whose blobs were only at the old destination.

What changed: when storage_url is empty, EnsureStorageBinding records and compares the destination the s3.* fields name, written as an s3:// URL from s3.endpoint, s3.bucket and s3.prefix (for example s3://bucket-a/backups?endpoint=https://s3.example.com). A change to any of them is refused with the same error and advice as a changed storage_url. The new test changes the bucket, the prefix and the endpoint after binding. The database delete paragraph in README.md now names the s3.* fields too.

  • Judgement call: the advice line in the error now reads "revert storage_url (or the s3.* endpoint, bucket and prefix)", since an s3.* config has no storage_url to revert.
  • Judgement call: the fields are compared as written, so a different spelling of the same destination (a trailing / on the prefix, a scheme added to the endpoint) is also refused, as it already is for storage_url. s3.region and s3.use_ssl are not part of the binding.

Model: opus-5-5

Fixes https://git.eeqj.de/sneak/vaultik/issues/298. **What was wrong:** the local index was bound to its destination only through `storage_url`. With the `s3.*` form nothing was checked, so after `s3.bucket` or `s3.prefix` changed, the next backup treated every chunk as already stored, uploaded nothing, and completed a snapshot whose blobs were only at the old destination. **What changed:** when `storage_url` is empty, `EnsureStorageBinding` records and compares the destination the `s3.*` fields name, written as an `s3://` URL from `s3.endpoint`, `s3.bucket` and `s3.prefix` (for example `s3://bucket-a/backups?endpoint=https://s3.example.com`). A change to any of them is refused with the same error and advice as a changed `storage_url`. The new test changes the bucket, the prefix and the endpoint after binding. The `database delete` paragraph in README.md now names the `s3.*` fields too. - Judgement call: the advice line in the error now reads "revert storage_url (or the s3.* endpoint, bucket and prefix)", since an `s3.*` config has no `storage_url` to revert. - Judgement call: the fields are compared as written, so a different spelling of the same destination (a trailing `/` on the prefix, a scheme added to the endpoint) is also refused, as it already is for `storage_url`. `s3.region` and `s3.use_ssl` are not part of the binding. Model: opus-5-5
clawbot self-assigned this 2026-10-13 02:37:53 +02:00
clawbot added 1 commit 2026-10-13 02:37:54 +02:00
The local index was bound to its destination only through storage_url.
With the s3.* form nothing was checked, so after s3.bucket or s3.prefix
changed the next backup treated every chunk as already stored, uploaded
nothing, and completed a snapshot that could not be restored.

Without storage_url, the binding now records the destination the s3.*
fields name, written as an s3:// URL from s3.endpoint, s3.bucket and
s3.prefix, and a change is refused with the same error and advice. The
advice line now names the s3.* fields as well as storage_url.

Judgement call: the fields are compared as written, so an equivalent
spelling (a trailing slash on the prefix, a scheme on the endpoint) is
also refused, as it already is for storage_url.

Model: opus-5-5
clawbot added the needs-review label 2026-10-13 02:37:59 +02:00
Author
Collaborator

Review passed.

Model: opus-5-5

Review passed. Model: opus-5-5
clawbot merged commit 07c957f84b into next 2026-10-13 03:48:37 +02:00
clawbot deleted branch issue-298-bind-s3-fields 2026-10-13 03:48:37 +02:00
Sign in to join this conversation.