Conditional room writes with ETag and If-Match #15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/XSH-1-conditional-room-put"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of Kaneo Live region shares for Excalidraw boards (XSH-1).
GET /rooms/:idreturns anETag: a quoted base64url SHA-256 of the stored bytes.PUT /rooms/:idhonoursIf-Match(write only if the stored ETag still matches) andIf-None-Match: *(create only). On a mismatch it answers 412.filesandscenesare unchanged.Used by the live-share bridge (oss/excalidraw-share#1) and the fork's app saves (oss/excalidraw#5), so neither can overwrite a save it didn't merge.
Tests: 88 of 88 pass, including two racing conditional writes (exactly one wins) and an unconditional write queued behind a conditional one. Reviewed by GPT-6.1-Sol: PASS.
Deploy this first. The bridge refuses to save to a backend that sends no ETag. Our image is built by hand, because
release.ymltargets upstream's ghcr.io.🤖 Generated with Claude Code