feat(cloud): stamp an X-Ore-Store routing hint on data-plane calls#96
Merged
Merged
Conversation
`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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The serving, write, and memory verbs (and the
warm=Truepre-hydration stats call) now sendx-ore-store: org/environment/storeso a store-sticky ingress can hash-route a store's traffic to the serving node that already holds it warm.What changes
CloudClient._requestgains an optionalstore_hint; every data-plane verb whose payload names a store passes it. Control-plane calls and store-less payloads send nothing.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.pygreen;ruff checkclean.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.