Durable runtime response-length fix — kill the truncation bug CLASS (generalize #79) #85

Open
opened 2026-08-03 18:55:14 +00:00 by will.anderson · 1 comment
Owner

Tag: POST-BETA · ORTHOGONAL · important
Owner: @tim.lingo

Why

#79 fixed one truncation via a pointer-identity fix, but the underlying class remains: any handler that fs_reads and then returns a body longer than what it read can truncate the reply. This signature has recurred (neuron #96 safety-contact, neuron-ui #184 Windows stale runtime). Per-handler workarounds don't close the class.

Scope

Generalize the fix in the el runtime so response length is governed by the actual body, not by an earlier read buffer / pointer:

  • Audit the HTTP response path for any place a length is carried from a prior fs_read/buffer rather than recomputed from the emitted body.
  • Make the durable, runtime-level fix so no handler can truncate this way, regardless of how it was written.

Acceptance criteria

  • A regression test: a handler that reads a short file then returns a long body returns the full body.
  • The fix is in the runtime response path, not in individual handlers.
  • Reference: builds on #79's pointer-identity fix.
**Tag:** POST-BETA · ORTHOGONAL · **important** **Owner:** @tim.lingo ## Why #79 fixed one truncation via a pointer-identity fix, but the underlying **class** remains: **any handler that `fs_read`s and then returns a body longer than what it read can truncate** the reply. This signature has recurred (neuron #96 safety-contact, neuron-ui #184 Windows stale runtime). Per-handler workarounds don't close the class. ## Scope Generalize the fix in the **el runtime** so response length is governed by the actual body, not by an earlier read buffer / pointer: - Audit the HTTP response path for any place a length is carried from a prior `fs_read`/buffer rather than recomputed from the emitted body. - Make the durable, runtime-level fix so **no** handler can truncate this way, regardless of how it was written. ## Acceptance criteria - A regression test: a handler that reads a short file then returns a long body returns the **full** body. - The fix is in the runtime response path, not in individual handlers. - Reference: builds on #79's pointer-identity fix.
will.anderson added the POST-BETAORTHOGONAL labels 2026-08-03 18:55:14 +00:00
tim.lingo was assigned by will.anderson 2026-08-03 18:55:14 +00:00
Author
Owner

@tim.lingo Confirm the scope with you: the durable fix belongs in the el runtime response path (length governed by the emitted body, not a prior fs_read buffer), not per-handler — agreed? Please coordinate with #79 (the pointer-identity fix this builds on) and #70 (the RSS leak, separate bug).

@tim.lingo Confirm the scope with you: the durable fix belongs in the el runtime response path (length governed by the emitted body, not a prior fs_read buffer), not per-handler — agreed? Please coordinate with #79 (the pointer-identity fix this builds on) and #70 (the RSS leak, separate bug).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: neuron-technologies/el#85