Skip to content

Give Rosmar test buckets a source ID Couchbase Lite accepts - #8850

Merged
bbrks merged 3 commits into
mainfrom
CBG-5884-1-source-id
Oct 5, 2026
Merged

bbrks merged 3 commits into
mainfrom
CBG-5884-1-source-id

Conversation

@bbrks

@bbrks bbrks commented Oct 2, 2026

Copy link
Copy Markdown
Member

Prereq for real CBL testing

CBL errors if source ID is not 22 bytes and we currently produce simplified source IDs under testing to allow easier debugging.

Integration Tests

  • n/a

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bbrks
bbrks requested a review from torcolvin October 2, 2026 13:09
@bbrks
bbrks requested review from a team and a balanced review from Copilot October 2, 2026 13:09
@factory-droid

factory-droid Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Droid finished @bbrks's task —— View job


LGTM, this keeps test source IDs Couchbase Lite-compatible (canonical 22-char unpadded base64) while preserving human-readable bucket names when safe, and the added unit test covers the main edge cases.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The padding scheme can assign the same source ID to distinct Rosmar buckets.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds Couchbase Lite-compatible source IDs for Rosmar test buckets while retaining readable bucket-name prefixes.

Changes:

  • Pads valid test bucket names into canonical 22-character source IDs.
  • Falls back to production-style encoding for unsuitable names.
  • Adds source ID validation tests.
File Description
base/​bucket.go Generates valid encoded source IDs for test buckets.
base/​bucket_test.go Tests encoding, fallback, and Couchbase Lite constraints.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread base/bucket.go Outdated
bbrks and others added 2 commits October 2, 2026 19:00
testing/cbltestclient parses the version vector a real Couchbase Lite
client reports for a document, which uses the same format as the blip
wire.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bbrks
bbrks merged commit 1e11ecd into main Oct 5, 2026
67 of 68 checks passed
@bbrks
bbrks deleted the CBG-5884-1-source-id branch October 5, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants