docs(uploads): note that marked fields are multipart-only - #122
Merged
Conversation
lvt-upload-with is documented as a contract without naming the transport it holds on. It holds on the multipart path — always for Proxied, and for Volume/Direct only when the socket is down. Over the chunked WebSocket transport the fields never arrive. Say so, and point at the alternative (read context from controller state rather than the upload's form) so the section describes what to do rather than only what not to expect. Refs livetemplate/livetemplate#508 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ui2cwpeGkrUfRt8rh2FgGG
Review caught that the first pass lumped the two together. Volume goes chunked while the socket is up and falls back to multipart when it is down, so marked fields arrive intermittently. Direct routes to uploadExternal — a presigned PUT plus a metadata-only completion — and so never carries them on any path. The old text told readers marked fields "do arrive if the socket is down", which for Direct is a workaround that does not work. Replaced with a per-mode table and an explicit note about the asymmetry, since a handler seeing fields intermittently is its own trap. Refs livetemplate/livetemplate#508 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ui2cwpeGkrUfRt8rh2FgGG
Contributor
Author
|
Correction pushed. The first pass claimed "Volume and Direct uploads go over the WebSocket in chunks" and that marked fields "do arrive if the socket is down." Both are wrong for Direct, which routes to Replaced with a per-mode table (Proxied always / Volume on the fallback only / Direct never) and an explicit note that Volume's intermittent delivery is its own trap — a handler that sees fields sometimes is worse to debug than one that never does. |
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.
Docs half of livetemplate/livetemplate#508. Pairs with livetemplate/client#152.
lvt-upload-withwas documented as a contract without naming the transport it holds on. It holds on the multipart path — always for Proxied (soOnUploadalways sees marked fields), and for Volume/Direct only when the socket is down. Over the chunked WebSocket transport the fields never arrive.The new subsection says so, notes the client now warns at that point, and — more useful than the prohibition — points at what to do instead: read context from the controller state you already hold rather than from the upload's form.
No behaviour change here; this is the boundary the client PR makes diagnosable.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Ui2cwpeGkrUfRt8rh2FgGG