Skip to content

Route CLI requests across regional deployments (0.7.4) - #85

Merged
rmorehig merged 3 commits into
mainfrom
rafa/regional-api-routing
Oct 20, 2026
Merged

rmorehig merged 3 commits into
mainfrom
rafa/regional-api-routing

Conversation

@rmorehig

@rmorehig rmorehig commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

CLI user sessions previously listed clusters through only the default deployment, so clusters in other regions could be missing or receive requests at the wrong endpoint. Discovery now merges enabled regional catalogs and joins each cluster's region ID to authoritative deployment metadata. Requests to the public RawTree API use deployment-specific hosts and retain routing and client headers.

Duplicate records are selected by catalog authority: the owning deployment wins over gateway or other-deployment copies, even when those copies contain a region ID. This preserves full cluster fields and routing independently of response order, including separate deployments in the same AWS region.

Supports 8-character and legacy 32-character deployment IDs, preserves custom API URLs and API-key behavior, and carries request deadlines through discovery. Regional failures do not cache partial results. Cluster lists without an organization discover across accessible organizations. Patch version: 0.7.3 → 0.7.4.

Current main is merged, including the workflow schedule API compatibility fix from #87; this removes the old flat enabled/interval_seconds payloads responsible for the earlier Compose failures. The S3 contract fixture includes the new discovery requests.

Validation:

  • cargo test --locked: 239 passed.
  • Current-head CI passed CLI tests and all seven live Platform Docker Compose tests: https://github.com/rawtreedb/rawtree-cli/actions/runs/39386954924.
  • Strict review through P3 and secret scan: no actionable findings.
  • cargo fmt --all -- --check and git diff --check: passed.
  • Regression demonstrated metadata loss before the fix; the updated test covers both catalog orders, gateway stubs with/without region metadata, and separate deployments in the same region.
  • Strict Clippy remains blocked by existing diagnostics in insert/query commands and storage tests; no routing diagnostics.

Related Platform change: https://github.com/rawtreedb/rawtree-platform/pull/1566.
Companion MCP change: rawtreedb/rawtree-mcp#36. Duplicate-cluster UI follow-up: https://github.com/rawtreedb/rawtree-platform/pull/1575.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 39fa9a6. Configure here.

Comment thread src/client/discovery.rs
@rmorehig rmorehig changed the title Route CLI requests across regional deployments (0.7.2) Route CLI requests across regional deployments (0.7.4) Oct 20, 2026
@rmorehig
rmorehig merged commit 5d8e6a6 into main Oct 20, 2026
8 checks passed
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.

1 participant