From 5636fb51c02888a2430c7bd25f1cfd04cedfa346 Mon Sep 17 00:00:00 2001 From: phernandez Date: Thu, 12 Feb 2026 13:34:30 -0600 Subject: [PATCH 1/3] fix: use global --header flag for Tigris consistency on all rclone transactions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --header-download and --header-upload only apply to GET and PUT requests. bisync starts by listing files via S3 ListObjectsV2 — neither a download nor upload — so the consistency header was never sent on list requests. Non-US users saw stale edge-cached metadata and bisync reported "0 changes." --header is rclone's global flag that applies to ALL HTTP transactions (list, download, upload), which is a superset of the previous two flags. Co-Authored-By: Claude Opus 4.6 Signed-off-by: phernandez --- .../cli/commands/cloud/rclone_commands.py | 8 ++++---- tests/test_rclone_commands.py | 17 ++++++++--------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/basic_memory/cli/commands/cloud/rclone_commands.py b/src/basic_memory/cli/commands/cloud/rclone_commands.py index e99372eef..c56716629 100644 --- a/src/basic_memory/cli/commands/cloud/rclone_commands.py +++ b/src/basic_memory/cli/commands/cloud/rclone_commands.py @@ -28,12 +28,12 @@ MIN_RCLONE_VERSION_EMPTY_DIRS = (1, 64, 0) # Tigris edge caching returns stale data for users outside the origin region (iad). -# These headers bypass edge cache and force reads/writes against the origin. +# --header is rclone's global flag that applies to ALL HTTP transactions (list, download, +# upload). This is critical because bisync starts with S3 ListObjectsV2, which is neither +# a download nor upload — so --header-download/--header-upload would miss list requests. # See: https://www.tigrisdata.com/docs/objects/consistency/ TIGRIS_CONSISTENCY_HEADERS = [ - "--header-download", - "X-Tigris-Consistent: true", - "--header-upload", + "--header", "X-Tigris-Consistent: true", ] diff --git a/tests/test_rclone_commands.py b/tests/test_rclone_commands.py index f07bbe259..401471b49 100644 --- a/tests/test_rclone_commands.py +++ b/tests/test_rclone_commands.py @@ -41,15 +41,14 @@ def __call__(self, cmd: list[str], **kwargs): def _assert_has_consistency_headers(cmd: list[str]) -> None: - """Assert the rclone command includes Tigris consistency headers.""" - assert "--header-download" in cmd - assert "X-Tigris-Consistent: true" in cmd - assert "--header-upload" in cmd - # Verify upload header value follows --header-upload - upload_idx = cmd.index("--header-upload") - assert cmd[upload_idx + 1] == "X-Tigris-Consistent: true" - download_idx = cmd.index("--header-download") - assert cmd[download_idx + 1] == "X-Tigris-Consistent: true" + """Assert the rclone command includes Tigris consistency headers. + + Uses --header (global flag) so the header applies to ALL HTTP transactions, + including S3 list requests that bisync issues before any download/upload. + """ + assert "--header" in cmd + header_idx = cmd.index("--header") + assert cmd[header_idx + 1] == "X-Tigris-Consistent: true" def _write_filter_file(tmp_path: Path) -> Path: From 5060df5593d305a5d059d96af19d41df1c3c6fcf Mon Sep 17 00:00:00 2001 From: phernandez Date: Thu, 12 Feb 2026 15:14:32 -0600 Subject: [PATCH 2/3] docs: add CHANGELOG entry for v0.18.3 Co-Authored-By: Claude Opus 4.6 Signed-off-by: phernandez --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4b2b1be3..c531b61f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # CHANGELOG +## v0.18.3 (2026-02-12) + +### Bug Fixes + +- Use global `--header` flag for Tigris consistency on all rclone transactions + ([`7fcf587`](https://github.com/basicmachines-co/basic-memory/commit/7fcf587)) + - `--header-download` / `--header-upload` only apply to GET/PUT requests, missing S3 + ListObjectsV2 calls that bisync issues first. Non-US users saw stale edge-cached metadata. + - `--header` applies to ALL HTTP transactions (list, download, upload), fixing bisync for + users outside the Tigris origin region. + ## v0.18.2 (2026-02-11) ### Bug Fixes From a6c71888db94fe80288df271929368eef3a24b52 Mon Sep 17 00:00:00 2001 From: phernandez Date: Thu, 12 Feb 2026 15:15:41 -0600 Subject: [PATCH 3/3] chore: update version to 0.18.3 for v0.18.3 release Co-Authored-By: Claude Opus 4.6 Signed-off-by: phernandez --- server.json | 4 ++-- src/basic_memory/__init__.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server.json b/server.json index dc1d08dbe..1037ffb77 100644 --- a/server.json +++ b/server.json @@ -6,12 +6,12 @@ "url": "https://github.com/basicmachines-co/basic-memory.git", "source": "github" }, - "version": "0.18.2", + "version": "0.18.3", "packages": [ { "registryType": "pypi", "identifier": "basic-memory", - "version": "0.18.2", + "version": "0.18.3", "runtimeHint": "uvx", "runtimeArguments": [ {"type": "positional", "value": "basic-memory"}, diff --git a/src/basic_memory/__init__.py b/src/basic_memory/__init__.py index e2a223f7c..8687ea5ae 100644 --- a/src/basic_memory/__init__.py +++ b/src/basic_memory/__init__.py @@ -1,7 +1,7 @@ """basic-memory - Local-first knowledge management combining Zettelkasten with knowledge graphs""" # Package version - updated by release automation -__version__ = "0.18.2" +__version__ = "0.18.3" # API version for FastAPI - independent of package version __api_version__ = "v0"