Skip to content

feat(cloud): stamp an X-Ore-Store routing hint on data-plane calls#96

Merged
Davidobot merged 4 commits into
Egoist-Machines:mainfrom
idas0:feat/store-routing-hint
Jul 20, 2026
Merged

feat(cloud): stamp an X-Ore-Store routing hint on data-plane calls#96
Davidobot merged 4 commits into
Egoist-Machines:mainfrom
idas0:feat/store-routing-hint

Conversation

@idas0

@idas0 idas0 commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

The serving, write, and memory verbs (and the warm=True pre-hydration stats call) now send x-ore-store: org/environment/store so a store-sticky ingress can hash-route a store's traffic to the serving node that already holds it warm.

What changes

  • CloudClient._request gains an optional store_hint; every data-plane verb whose payload names a store passes it. Control-plane calls and store-less payloads send nothing.
  • The value is percent-encoded: store names are end-user identifiers, so a non-ASCII id must never turn a valid request into a header-encoding error. Quoting is deterministic — the same store always maps to the same hash bucket.
  • Pure transport hint: the server never reads the header, and any serving node answers correctly without it. No wire-contract change.

Testing

  • tests/test_cloud_routing_hint.py (new): every hinted verb carries the value, the warm stats call carries it, store-less payloads and control-plane calls send nothing, unicode ids encode deterministically, and the hint rides alongside auth + body untouched.
  • tests/test_cloud_store_verbs.py, tests/test_cloud_surface_parity.py, tests/test_cloud_client_api.py, tests/test_cloud_sync.py green; ruff check clean.

Reviewed with a codex review loop until quiet: round one flagged the unhinted warm call and the non-ASCII header crash (both fixed above); round two was clean.

idas0 added 4 commits July 19, 2026 13:22
`lodedb cloud login` and `Client()` now target
https://api.egoistmachines.com when no host is configured, so nobody has
to know the URL; --host / ORECLOUD_HOST stay as the staging/self-host
override. ORECLOUD_TOKEN alone is now enough for CI — it never borrows
the credentials file's host, and ORECLOUD_HOST alone still fails closed.
The default is exported as `lodedb.cloud.DEFAULT_HOST`.
Serving, write, and memory verbs now send x-ore-store: org/env/store so a
store-sticky ingress can hash-route a store's traffic to the pod holding
it warm. Pure transport hint: the server never reads it, any pod answers
correctly without it, and store-less payloads send nothing.
…re hints

Review findings: serving-stats with warm=True is the pre-hydration call,
so it must carry the same routing hint as the queries that follow it; and
store names are end-user identifiers, so a non-ASCII id percent-encodes
into a valid header (deterministically) instead of crashing the request.
@Davidobot
Davidobot merged commit c954747 into Egoist-Machines:main Jul 20, 2026
7 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.

2 participants