feat: add random write API for store files (storeFileRw*) - #19
Draft
kisielewski wants to merge 2 commits into
Draft
feat: add random write API for store files (storeFileRw*)#19kisielewski wants to merge 2 commits into
kisielewski wants to merge 2 commits into
Conversation
Replace per-operation count and size limits with a single validator (storeFileOperations) that enforces a 5MB cap on the total combined size of all operation data fields in a single storeFileWrite request.
Introduces three new endpoints for random-write store files: - storeFileRwCreate – creates a file with initial rwMeta (rwVersion set to 1 by server) - storeFileRwWrite – applies random-write operations with optimistic locking on rwVersion - storeFileRwPull – fetches current randomWriteMeta and checksums; optionally returns updated store/file when client's version is stale Adds StoreFileRwVersion and StoreFileRwMeta branded types, renames randomWriteMeta fields to rwVersion/rwMeta for consistency, and introduces a dedicated STORE_FILE_RW_VERSION_MISMATCH error code (0x6140). Extends storeFileRead with an optional rwVersion check.
imaTik0
changed the base branch from
feat/store-operations-data-size-limit
to
dev
June 16, 2026 14:25
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.
Important
Depends on:
Do not merge before.
Summary
storeFileRwCreate,storeFileRwWrite,storeFileRwPullStoreFileRwVersionandStoreFileRwMetabranded types, renamesrandomWriteMetafields torwVersion/rwMetafor consistency across the APIstoreFileReadwith an optionalrwVersionparameter and adds a dedicatedSTORE_FILE_RW_VERSION_MISMATCHerror (code0x6140)New endpoints
storeFileRwCreate— creates a new random-write file. Client providesrwMeta; server initializesrwVersionto1.storeFileRwWrite— applies random-write operations with optimistic locking. Client passes currentrwVersion(fetched viastoreFileRwPull); server rejects withINVALID_VERSIONif it doesn't match.storeFileRwPull— fetches currentrandomWriteMetaand checksums. Accepts optionalversion(file update version); if the file has changed since the client's known version, the response also includes updatedstoreandfileobjects.