Skip to content

docs(uploads): note that marked fields are multipart-only - #122

Merged
adnaan merged 2 commits into
mainfrom
docs/chunked-field-boundary
Jul 20, 2026
Merged

docs(uploads): note that marked fields are multipart-only#122
adnaan merged 2 commits into
mainfrom
docs/chunked-field-boundary

Conversation

@adnaan

@adnaan adnaan commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Docs half of livetemplate/livetemplate#508. Pairs with livetemplate/client#152.

lvt-upload-with was documented as a contract without naming the transport it holds on. It holds on the multipart path — always for Proxied (so OnUpload always 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

adnaan and others added 2 commits July 19, 2026 23:24
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
@adnaan

adnaan commented Jul 20, 2026

Copy link
Copy Markdown
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 uploadExternal — a presigned PUT plus a metadata-only completion, touching neither the chunked nor the multipart path. The socket-down sentence was the damaging one: it reads as a workaround, and a reader following it would drop their WebSocket and still find empty values.

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.

@adnaan
adnaan merged commit c452f65 into main Jul 20, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant