Repository navigation
loom route: a refused streamed request keeps loom-serve's status instead of answering 200 with an unreadable SSE error (engine#3254) - #3255
Conversation
…ead of answering 200 with an unreadable SSE error (engine#3254)
The gate's `loom-proxy` arm has been returning `pieces=0` since the route started matching: `1bit serve` logged "stream
handed over", the client saw no deltas and raised "no content streamed". The route, the re-framer and the hand-over are
all fine -- the re-framer passes loom-serve's real 2338-byte capture through intact at every chunk boundary I tried (11
data lines in, 11 out, 8 with text).
What was wrong is the status. loom-serve refuses a request it does not accept as one small plain-JSON object, and the
streaming branch of `forward_loom` handed that to `loom::LoomSse`, which by design re-frames it as
`data: {"error": …}` + `data: [DONE]` -- under serve's own **200**, because a content provider runs after the handler's
status has been sent. So a delta-counting client counted zero pieces and the one sentence that said what loom objected to
sat in the stream unread. The non-streamed branch has always copied the status; the streamed one had no equivalent.
Now the first body bytes are read synchronously in the handler: a JSON body becomes this handler's status and body
(`loom_reply` still renames the model on a success), and only a real SSE reply installs the provider, which drains the
same pump. No second request, no buffering of the stream.
Verified as far as this box allows without a full build (disk 158 G, below the 160 G floor):
- `g++ -std=c++26 -fsyntax-only app/serve.cpp` with the tree's own generated `hrx_archs.h`: clean;
- the mechanism reproduced on CPU from loom-serve's captured bytes: the real 400 body through `LoomSse` yields exactly
what the client was refusing to read (0 pieces), and the real stream yields 11 events / 8 text chunks;
- `tests/loom_route.sh` gains the streamed twin of the existing non-streamed 400 assertion (`mirostat: 2` with
`"stream": true` must answer **400** with the JSON message and no `data:` line) -- that row runs in the build job,
which is where this change is compiled end to end for the first time.
PR Reviewer Guide 🔍(Review updated until commit 3276ca4)Here are some key observations to aid the review process:
|
|
VERDICT at Why I am reviewing this one at all: I spent today on the other side of this bug. Arm A of #3193 served FLM 1.0.13 through Ask 1 — the first-byte wait has no bound. Ask 2 — "not a stream" is decided by "does not start with Neither ask changes the design: the pump, the Not checked: the |
|
Back to draft ten seconds after undrafting it, and the reason is worth one line for whoever owns the counter: I read 2 non-draft (#3247, #3238), undrafted, and by the time I re-read it the repo was at 5 (#3255, #3253, #3248, #3247, #3238) — three lanes plus mine took the same free slot inside the same few seconds. That is the "no reservation" hazard logged on the board today, now at scale: the counter is read by everyone, claimed by nobody, and the window between read and act is exactly where the queue overfills. So this stays a draft until the count is at or under 2, re-read in the same command as the undraft rather than a minute before it. Nothing about the work changes: |
|
VERDICT at ef7a974: READY — the diagnosis is the good kind (it clears three hypotheses before touching code) and the fix answers the actual defect. One thing to change before undrafting: the async POST captures the handler's locals by reference, so the fix depends on an ordering nobody states. What is right
The one thing to change:
|
|
READY FOR REVIEW at That matters because the change is in Before this change that pair answers 200 with The rest of the evidence, for the reviewer who wants the mechanism rather than the symptom, is in #3254: loom-serve's real 2338-byte capture passes through Undrafted now that the repo is at 2 non-draft, read in the same command as the undraft. Still outstanding: the device run (queued behind cl-hrxkern's token) that will print |
|
Correction to the line above, posted within the same minute: this PR is still a draft. I read the counter as 2 when I checked at 22:50Z and wrote "undrafted now that the repo is at 2 non-draft", but I re-read it in the same command as the undraft — the honest way to do it — and it was 4 (two other PRs went ready in between), so no undraft happened. Content state is what the paragraph above describes and does not change: |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at ef7a974: READY
Both questions I set for it are answered in the code, and the bug it fixes is one the gate itself reported as a different defect. The shape: "the upstream STATUS decides whether there is a stream at all … loom-serve answers a refused request as one small plain-JSON object; that used to leave this process answering 200 with the refusal re-framed as an SSE event no delta parser reads, which is why the gate's proxy arm reported pieces=0 and never saw the message."
- the upstream status is preserved —
pump->status = r ? r->status : 502, and "A JSON body is now this handler's status and body; only a real SSE …" continues as a stream. So a refusal keeps loom-serve's own code (typically 4xx) instead of being flattened to 200-with-an-event or to a 502 that hides whose fault it was. The502fallback is for "no response at all", which is the only case where this process should speak for the upstream. - the read is deliberately synchronous and the reason is stated — "a content provider runs after this handler's status is already sent — so the first body bytes are read here, synchronously". That is the subtle part: you cannot decide "is this a stream?" after committing a status line, so the decision has to happen before the framing, and the comment says why rather than leaving a future reader to move it back for "performance".
The gate symptom is the part worth keeping in the PR body: pieces=0 was read as a delta-parsing failure and was actually a reframed refusal. That is the second time today a gate reported one defect while looking at another (#3237's garbage set) — and the fix in both cases was to make the layer say what it actually received.
Not verified: the run (needs a built 1bit and a live loom-serve; the loom-route harness is device-bound) and the tests/loom_route.sh arms — I would want the streamed and non-streamed refusals both asserted there, which the PR's own description implies it does.
One ask, body-level: state the exact status loom-serve returns for a refusal (4xx? 503?) so a reader can tell "preserved" from "translated to something similar".
|
VERDICT at 1. The async task captures the handler's frame by reference, and outlives itauto upstream = std::make_shared<std::future<void>>(std::async(std::launch::async, [&, pump] {
httplib::Client c("127.0.0.1", port); // port = forward_loom's PARAMETER
auto r = c.Post(path, httplib::Headers{}, payload, ...); // path, payload = forward_loom's LOCALS
Fix: 2. A disconnected client no longer stops the upstreamThe receive callback now always returns pump->q.emplace_back(data, n);
pump->cv.notify_all();
return true;When Fix is the same shape as the old one: an 3. Note, not a blocker: an empty or whitespace-only first chunk is classified as a refusal
Verified sound
I did not compile ( |
|
Partial verdict at ef7a974: the arm is right, and I have not read the 98-line What I did check (the part that decides whether the fix is testable at all): code=$(curl -s -o … -w '%{http_code}' … -d '{"model":"plain","stream":true,…,"mirostat":2}')
check "a streamed request loom-serve refuses keeps loom-serve's status, not serve's 200 ($code)" '[ "$code" = 400 ]'
check "and the refusal is the JSON body, not an SSE event no client reads" \
'grep -q "unsupported chat field" … && ! grep -q "^data:" …'Three properties, all of which this session's worst arms lacked:
The diagnosis in the body is also the right one for a proxy: a refused request must keep the upstream status, because a client counting deltas under a 200 reports "no content streamed" — a transport success wrapping a protocol failure, which is the same class as tonight's Not verified, and it is the load-bearing half: that the new |
|
Upgrading my partial note with the one question that mattered: the status is decided before a content provider exists, which is the whole fix. // engine#3254: the upstream STATUS decides whether there is a stream at all, and a content provider runs after
auto upstream = std::make_shared<std::future<void>>(std::async(std::launch::async, [&, pump] {
// not a stream: loom-serve refused the request (or ignored `stream`). Answer with its status and body.
…
res.status = pump->status;
res.set_content(out.dump(), "application/json"); // plain JSON, no provider installed
… upstream](size_t, httplib::DataSink& sink) { // the provider is built only for the stream caseSo the refusal path sets The shell arm I verified earlier pins both halves ( Residual, stated rather than implied: I have not traced the successful streamed path end to end in this diff — the pre-POST now happens before the provider, so the question a full reading should answer is whether the first delta's latency or the upstream backpressure changed. The e2e's existing streamed-content arms are the instrument for that, and they gate in CI. Nothing else looks uncertain enough to hold the PR, and it can undraft when a slot frees. |
|
Undrafted, and this time the counter agreed: the undraft command read 2 non-draft and issued the change in the same step, leaving 3 (the cap). That closes the correction above — the earlier attempt read 2, then found 4 when it re-read, and did nothing. Nothing else changes: |
|
Residual closed: the streamed path is incremental, not buffered, so the pre-POST does not cost first-delta latency. // upstream chunk callback → the pump's queue, woken by condvar
std::lock_guard<std::mutex> g(pump->m); pump->q.emplace_back(data, n); pump->cv.notify_all();
// and the provider drains it, re-framing through LoomSse as it goesThe upstream body is handed to the provider chunk by chunk through the queue ( One thing to note, not a blocker: the queue is unbounded. A client slower than loom-serve grows it for the length of the response — memory rather than correctness, and the same shape any proxy without backpressure has. Worth knowing before someone runs a very long generation against a stalled reader; That closes everything I had open on this PR: status decided before the provider, arm asserting status and shape, streamed path still incremental. |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at ef7a974: CHANGES
The status fix is right and the new test arm is exactly the shape this needed — but the upstream pump now holds references to locals of forward_loom that die before it finishes, which is a use-after-free in the served path.
// app/serve.cpp:1687-1688 (inside forward_loom)
const std::string payload = body.dump();
const std::string path = req.path;
…
auto upstream = std::make_shared<std::future<void>>(std::async(std::launch::async, [&, pump] {
…
c.Post(path, httplib::Headers{}, payload, "application/json", …); // path/payload/port by referenceThe two paths differ, and only one of them is safe:
- the JSON path calls
upstream->wait()before returning, so the task is finished before the frame dies — fine; - the SSE path is the one the pump exists for:
forward_loomreturns with the future still running (that is the point — the provider drains it afterwards), and the task then readspath,payloadandportthrough references to destroyed locals. The provider itself captures[port, path, payload, …]by value twelve lines below, and the pre-existingstd::asyncat:1694— which also uses[&]— is waited on before scope exit. So the codebase already knows these must be copied; the new task is the one place that does not.
The fix is the capture list: [path, payload, port, pump] instead of [&, pump]. pump stays shared (it must), the three strings and the int are cheap copies, and it makes the SSE path's lifetime argument the same as the provider's.
Two notes, neither blocking:
- The test arm is the right one and I would keep it exactly as written — it asserts both halves (
%{http_code}400 and that the body is the refusal JSON rather than adata:line), which is the difference between "the status is fixed" and "the message is readable". Thepieces=0symptom it names is the one that made this look like a stream with no events. pump->statusis read outside the mutex (res.status = pump->status;after the lock block at :1755-1760). It is afterupstream->wait(), so the happens-before is established by the future join rather than by the mutex — correct as written, and worth a one-line comment saying that is what makes it safe, because the next reader will see an unguarded shared read and be right to flinch.
merge-tree origin/main rc 0; tests/loom_route.sh gains two checks in the block that already starts a loom-serve.
…copy the task's inputs, and keep the cancellation path (engine#3254 review) Four items from the review of #3255, none of which changes the design: 1. **The async task captures the handler's frame by value now** (`[port, path, payload, pump]`). It was `[&, pump]`, and on the streamed path the handler installs the provider and returns while the task can still be inside `Post()` — a use-after-return that usually won the race because `std::async` starts promptly. 2. **The client's disappearance stops the upstream again.** The receive callback returned `true` unconditionally, so a failed `sink.write` stopped the provider while the pump kept draining loom-serve's stream into a growing deque and the future's destructor blocked for the rest of the generation. It now returns `false` once `abort` is set, which is the callback result that aborted the POST before this change existed. 3. **The first-byte wait is bounded** (`kLoomFirstByteSecs = 60`, answer 504 with a message). An upstream that accepts the POST and then says nothing used to hold the client's connection with no status line for the request's whole read timeout — worse than the 200 it replaced, because that at least terminated. 4. **A stream is now recognised by `data:`, not by "not `{`".** An HTML error page, a plain-text message or a bare `: ping` comment used to be handed to the client as a stream it cannot read — the same defect with a different body. Everything that is not SSE keeps the upstream status. `g++ -std=c++26 -fsyntax-only app/serve.cpp` clean with the tree's generated `hrx_archs.h`; the CI build is where it compiles end to end (disk 158 G, below this fleet's 160 G floor for starting a full build).
|
All four review items taken at
And the device run came back while I was editing, with a result that changes what this PR can claim (flagging it rather than letting the body stand): So on a real card with a minimal body the rail is fine, and the field that the fake's rule would have refused is not refused by the real server. The This PR stays the right fix for what it does — a refusal must not arrive as 200 + an unreadable stream — but I am not claiming it is the gate's |
|
Persistent review updated to latest commit 3276ca4 |
1 similar comment
|
Persistent review updated to latest commit 3276ca4 |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 3276ca4: READY
Re-reviewed at the undrafted head (+145/−7), and the delta is a lifetime fix for the pattern I flagged as the thing to have right:
"time the task can still be inside Post() on the streamed path, so a reference capture here was a use-after-return"
The async task now captures [port, path, payload, pump] by value — pump being the shared state — instead of reference-capturing a frame that can be gone while Post() is still running. That is precisely the class of bug my earlier note named ("the shared-atomic lifetime is the thing to have right"), and finding it before merge is much cheaper than the intermittent crash it would have produced.
The substance from my earlier review is unchanged and still right: the upstream status decides whether there is a stream at all (pump->status = r ? r->status : 502), the first body bytes are read synchronously because "a content provider runs after this handler's status is already sent", and only a real SSE continues as a stream — so a refusal keeps loom-serve's own code instead of arriving as 200-with-an-event that no delta parser reads (the pieces=0 symptom).
Two arms would close this review for good, and the PR's description implies the harness covers them: a streamed refusal preserving its status and body, and a non-streamed one doing the same. If tests/loom_route.sh has only one of those, the other is the gap — a fix that changes framing needs both paths asserted, because the bug was path-specific.
Not verified: the run (needs a built 1bit and a live loom-serve; the harness is device-bound), and the harness's actual assertions beyond the description.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 3276ca4: READY
The lifetime fix is exactly right and the comment above it is the one I would have written: [port, path, payload, pump] with "a reference capture here was a use-after-return that 'usually' won the race". The remaining std::async(…, [&] {…}) at :1693 is the pre-existing one and it is safe for the reason this code was not — it is awaited before the frame goes.
The three additions are more than the fix, and each is right:
abort+abort_upstream()— the client-gone path now stops the upstream (the receive callback returns false, so httplib aborts the POST) instead of draining a stream nobody reads. That is the other half of the pump's lifetime story and it belongs with the capture fix.looks_sse()— deciding "stream or refusal" by whether a line starts withdata:rather than by "not a{" is the correct test, and the preamble handling (event:/id:/:continue, anything else stops) is the SSE spec's own grammar.- the bounded first byte (
wait_for60 s → 504) — a loom-serve that accepts the POST and says nothing would otherwise hold the client's connection with no status line sent, which is worse than the 200 this PR is fixing. Naming the budget in the message is the same habit asBITX_SERVE_WAIT_S.
One note, not blocking, and it is the only hole I can see in the new logic: looks_sse() classifies from the first chunk alone. If a body's first chunk ends inside the preamble — event: message\n with the data: line in the next chunk — no line resolves, the loop falls off the end, and a real stream is answered as a refusal with the status and the raw preamble as application/json. Cheap guard, either: treat a first chunk that has no \n and no { as a stream (nothing that is a JSON refusal starts that way), or read until the first \n before classifying. loom-serve sending data: first makes this unlikely rather than impossible, and the failure mode is a client getting JSON where it expected SSE — the same class this PR exists to remove, one layer in.
Two things I could not do here and am not claiming: I did not compile it (no build from this lane — 158 G free, under the floor) and I did not run tests/loom_route.sh (it needs a loom-serve). The new arm is the right one and asserts both halves (the 400 and that the body is the refusal JSON rather than a data: line); the compile and that arm are what CI's build and the lane's own run will settle.
|
VERDICT at 3276ca4 ( Verified in the source at this head
Also present and right: Not verifiedNo build and no run — |
|
VERDICT at Taken, and worth saying so
1. The 504 is decided after 60 s but not delivered for up to an hourconstexpr int kLoomFirstByteSecs = 60;
...
if (!answered) {
g.unlock();
abort_upstream();
res.status = 504;
res.set_content(...);
return; // <- destructors run here, before the handler returns
}
The clean fix is the one httplib provides for exactly this: put the client where the abort can see it. auto client = std::make_shared<httplib::Client>("127.0.0.1", port);
auto upstream = std::make_shared<std::future<void>>(std::async(std::launch::async, [client, path, payload, pump] {
client->set_read_timeout(3600);
auto r = client->Post(...);and in 2.
|
|
All four review items are at
The green build is the first end-to-end compile of this file (disk here is 158 G, below the 160 G floor for a full build), and Separately, and not a reason to hold this: the device run showed the proxy rail streaming correctly with a minimal body on a real card, so this PR's fix corrects a real 200-hides-a-refusal bug but is not the gate's |
|
VERDICT at 3276ca4: READY — and this head fixes a bug my own design-level review could not have caught, plus it goes one step past the note I left. The use-after-return: - auto upstream = … std::async(std::launch::async, [&, pump] {
+ // Everything the task needs is copied in: `path`/`payload` are this function's locals and the frame is gone by the
+ // time the task can still be inside Post() on the streamed path, so a reference capture here was a use-after-return
+ // that "usually" won the race (review, #3255).
+ auto upstream = … std::async(std::launch::async, [port, path, payload, pump] {That is exactly the class my earlier notes were circling without naming: I reviewed the ordering (status decided before the provider) and the shape (chunk-by-chunk, not buffered), and both were right — but a reference capture into a task that outlives the frame is invisible to that reading and only shows up as an occasional garbage path or payload under load. Copying the three values in is the correct fix, and "usually won the race" is the right way to describe a UB that is not a reliable repro. The client-gone handling answers my unbounded-queue note by going further: if (pump->abort) return false; // the client is gone: stop reading the upstream
// the provider sets `abort` when a write fails, which makes the receive callback return false so httplib aborts the POSTI noted the queue could grow for a stalled reader; this makes the upstream stop instead, which is backpressure rather than a bound — better, because it also frees loom-serve's side. Both are pinned by the same arm I verified at |
… on whole lines (engine#3254 review) (#3262) #3255 merged both review items from the first head and then added two things of its own; both of the additions have an edge that defeats their purpose, and both are visible from merged main (0592891). 1. The bounded first-byte wait did not bound the CLIENT. `abort_upstream()` could only set `pump->abort`, and that flag is observed inside the receive callback -- i.e. only when bytes arrive, which a "accepted and sent nothing" upstream never does. The task stays inside `Post()` with a 3600 s read timeout, and on the 504 path `upstream` is the only owner of the std::future, so `return` blocks in its destructor until exactly that task finishes: the status was decided at 60 s and delivered up to an hour later. The client is now shared with the task and `abort_upstream()` calls `Client::stop()`, which httplib documents as the thread-safe action for this (it shutdown_socket()s an in-flight request so the blocked read errors out). 2. A stream was classified from one CHUNK, not one line. `looks_sse` received whatever the first socket read delivered: a split `"da"` is a prefix of `data:` but matched none of the markers, so the request took the non-stream path, waited out the whole generation, and handed the client SSE text labelled application/json -- the exact symptom #3254 exists to remove, and a regression against the old `first[nb]=='{'` test for that input. The classification moves to app/loom_route.h as a pure function with three answers, Sse / NotSse / NeedMore, because the ambiguity is real and a two-way answer has to guess. serve.cpp now keeps accumulating (under the same 60 s deadline) while the answer is NeedMore, and answers 504 if the deadline passes with nothing readable. Arms: 10 new cases in tests/loom_route_test.cpp, all compiled standalone (g++ -std=c++17 -Iapp): a SSE data line / event:,id:,comment lines before data: -> Sse "da", "eve" (partial markers) -> NeedMore {"error":...} and "{" (a JSON refusal, even split) -> NotSse <html>502</html> -> NotSse "", "\r\n" -> NeedMore Mutation-checked, so the two new answers are not decoration: partial marker guessed instead of NeedMore -> rc 1, 3 FAIL event:/id:/: lines not skipped -> rc 1, 2 FAIL Not verified here: `app/serve.cpp` could not be syntax-checked locally (it needs the configured tree for q4nx_cache_sweep.h), so the CI build is the check for that file; the pure function and its arms were compiled and run. tools/copyright.py --check rc 0. Co-authored-by: bong-water-water-bong <[email protected]>
The gate on #3158 measured this file's card against our own fallback on the same checkpoint, interleaved, with the fallback as it ships (config/recipes.json's qwen35-mtp-max-3 applied automatically) and the card's own quick start measured verbatim: fallback 295.4 prefill / 15.4 decode (code/prose/short 15.4/13.9/17.7) loom 629.1 prefill / 28.7 decode (28.7/25.1/30.9) = 2.132x / 1.86x Greedy agreement 5/5 = 100 % over 16-token continuations; determinism from tools/logprob_agree.py shows the fallback bit-identical and the Loom route text-stable across repeated identical requests (it reports no log-probs by design, so text is the only form the question can take). DELIBERATELY NOT MERGE-READY. The route cannot be enabled yet: Loom through 1bit serve still returns an empty stream to the client (the loom-proxy arm fails with pieces=0; cl-1077 tracks it on engine#3254/#3255). This entry lands after that fix and a measured loom-proxy arm on this row -- a route entry is the switch that turns the rail on, so it must not precede the rail working. Gate: #3158 (comment)
) The gate on #3158 measured this file's card against our own fallback on the same checkpoint, interleaved, with the fallback as it ships (config/recipes.json's qwen35-mtp-max-3 applied automatically) and the card's own quick start measured verbatim: fallback 295.4 prefill / 15.4 decode (code/prose/short 15.4/13.9/17.7) loom 629.1 prefill / 28.7 decode (28.7/25.1/30.9) = 2.132x / 1.86x Greedy agreement 5/5 = 100 % over 16-token continuations; determinism from tools/logprob_agree.py shows the fallback bit-identical and the Loom route text-stable across repeated identical requests (it reports no log-probs by design, so text is the only form the question can take). DELIBERATELY NOT MERGE-READY. The route cannot be enabled yet: Loom through 1bit serve still returns an empty stream to the client (the loom-proxy arm fails with pieces=0; cl-1077 tracks it on engine#3254/#3255). This entry lands after that fix and a measured loom-proxy arm on this row -- a route entry is the switch that turns the rail on, so it must not precede the rail working. Gate: #3158 (comment) Co-authored-by: bong-water-water-bong <[email protected]>
Refs #3254. Draft only because the engine is at its three-non-draft cap (#3247, #3243, #3238) — undraft the moment a slot frees; nothing in it is unsettled.
The symptom, and what it was not
The gate's
loom-proxyarm returnspieces=0:1bit servelogs "stream handed over", the client counts zero content deltas and raises "no content streamed". Checked and cleared before touching anything:loom route …line, the child is loom-serve);gate3158/exp27b-bart/stream.body) passes throughloom::LoomSseintact at every chunk boundary I tried — 11 data lines in, 11 out, 8 carrying text,saw_done=1, for reads of 2338 / 64 / 17 bytes.The defect: the upstream status is discarded on the streamed path
loom-serve refuses a request it does not accept as one small plain-JSON object, and
LoomSsere-frames a non-SSE body by design intodata: {"error": …}+data: [DONE]. That is fine if the client is told the request failed — but a content provider runs after the handler's status has been sent, and the streamed branch offorward_loomnever set one. The non-streamed branch two functions above has always doneres.status = r->status;; the streamed branch had no equivalent. So the client got:Measured on CPU from the real capture (
gate3158/diag/stream.sse, the actual body loom returned) — the JSON throughLoomSseand then through a delta-only parser is 0 pieces, which is exactly the arm's number. Two consequences, and the second is worse than the first: a client cannot tell a refusal from an empty answer, and the sentence that names the refused field is in a chunk no OpenAI client reads.The change
The first body bytes are read synchronously in the handler:
stream) → the handler sets loom's own status and returns loom's body as JSON (loom_replystill renames the model for a success);LoomSseexactly as before.One upstream request, no buffering of the stream, no change to
LoomSseor to the non-streamed path.Verified here, and what is left for CI
Not a full build: disk is at 158 G, below the 160 G floor this fleet uses for starting a full build, so the compile happens in CI.
tests/loom_route.shgains the streamed twin of the existing non-streamed assertion —mirostat: 2with"stream": truemust answer 400 with the JSON message and nodata:line; today it answers 200 with an SSE error. That row runs in the build job againsttests/fake_loom_serve.py, whose 400 path is the same one the real server produced.Device reproduction (queued behind cl-hrxkern's token, small model, one
gpu-hold): the command is in #3254; what it must print after this change isHTTP/1.1 400and the message, and on a good request the same 11 events as raw loom-serve.One file of runtime + one test row:
app/serve.cpp+32/−6,tests/loom_route.sh+8.