Skip to content

Test unbuffered refusal bodies with an explicit sender gate - #998

Merged
ashhart merged 1 commit into
ashhart:mainfrom
cwschroeder:diagnose/http-refusal-20261017
Oct 18, 2026
Merged

ashhart merged 1 commit into
ashhart:mainfrom
cwschroeder:diagnose/http-refusal-20261017

Conversation

@cwschroeder

@cwschroeder cwschroeder commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

The refusal-body test assumes a 20 ms sender sleep finishes inside the reader's 100 ms budget. A traced macOS failure showed a 113.61 ms sleep, with the body written after the reader timed out.

Replace that timed “soon” case with an explicit sender gate. The new test receives the head with an empty body buffer, releases the sender, and checks the complete body through stream.errorBody. Both cleanup paths release the gate. Existing late-body deadline tests and the SSE fixture remain intact. errorBody becomes visible to the test module; HTTP behavior and the 100 ms limit stay unchanged.

Draft at faa41253 on upstream 6ee828c2, Zig 0.17.0:

  • Debug and Fast controls: 6/6 each, including the no-fake guard and SSE neighbor. Disabling bounded body fill gives 5 passes and one failure in the new test.
  • Whole-tree format and lean delta pass. The final Astra source review found no material issue.
  • All four current-head remote CI checks pass, including the complete Linux No GPU workflow.
  • The latest unchanged-candidate local rerun still passes 367/369 server tests; the Ctrl-C total-time and late-refusal timing assertions fail. Earlier unchanged-base testing passed 366/368 server tests and 5/5 JSON, with trickle and “soon” failures. The base did not reach its later refusal timing assertion. Local timing qualification remains open; this is not PR-ready.

Follow-up measurements separate the Ctrl-C signal producer from the response: start to stop.request takes 222.894 / 247.819 / 250.072 ms despite the producer requesting a 50 ms sleep; after stop.request returns, stream.run returns another 192.468 / 143.100 / 146.165 ms later. All three attempts produce one cancelled sample. The total includes both delays. Earlier tracing measured late-body task cancellation at 0.937 ms and cleanup at 0.156 ms, followed by another 189.816 ms before the outer poll observed completion.

A separate C child tested its own thread's reported QoS class in A/B/A order, 9 → 33 → 9. Both 20 ms wait methods still took about 190 to 222 ms. That class change did not restore the requested waits; the OS cause remains unassigned. No timeout, QoS or TCP runtime patch follows from these results.

Patch, raw and sanitized logs, signal stamps, timer control and compiler/source/binary hashes. Diagnostic-only instrumentation was restored byte for byte; the source commit is unchanged. No GPU/model run, binary promotion, merge or deployment.

@ashhart
ashhart merged commit 6f8b2e2 into ashhart:main Oct 18, 2026
4 checks passed
ashhart added a commit that referenced this pull request Oct 18, 2026
@ashhart

ashhart commented Oct 18, 2026

Copy link
Copy Markdown
Owner

Thank you, @cwschroeder, for replacing the sender's 20 ms assumption with an observable gate and a planted-fault control.

We merged the test change for 1.1.0 in 6f8b2e2. It retains the 100 ms refusal deadline, late-body handling and SSE behaviour while proving that the response body has not already been buffered.

The separate whole-suite interrupt and late-refusal timing failures still need their own investigation.

Posted by Ash's AI Assistant Synthena

BlivionIaG pushed a commit to BlivionIaG/TensorFold that referenced this pull request Oct 20, 2026
BlivionIaG pushed a commit to BlivionIaG/TensorFold that referenced this pull request Oct 20, 2026
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.

2 participants