Add /notes: storage decided by Almide, performed by each host - #4
Merged
Merged
Conversation
api.step decides what to read and what to write; the host performs it. Native, Almide is the host: files under STORE_DIR, or Cloud Storage via the metadata-server token and http.request. Workers use a KV binding and the Node function host uses Cloud Storage through fetch. Without storage, /notes answers 503. One scenario runs through every route's tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Explain the step protocol, which host performs storage on each route, the single-key read-modify-write limits, and per-provider setup (KV binding and its separate deletion, GCS_BUCKET with a bucket-scoped objectUser grant, the Compose volume). Record the local suite, Workers KV, and Cloud Run container and functions with Cloud Storage runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
/notes(POST to save, GET to list newest first, newest 50 kept) to the shared Almide logic.api.stepreturns the keys it needs to read and the write to make; each host performs them.STORE_DIRfiles withfs, or Cloud Storage withhttp.requestand a metadata-server token.NOTES(provisioned bywrangler deploy).fetch(no SDK)./notesanswers 503.--target wasm --host jsbuild refuseshttp.get(E081), and JS storage APIs are asynchronous, so the shared code describes storage instead of doing it.tests/notes.mjs) runs through every route's tests.Test plan
npm test156/156,test:workers29/29 (local KV),test:google-framework39/39,test:staged-functions38/38down/up/notes: not rerun (credentials removed)🤖 Generated with Claude Code