mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-10-19 20:53:34 +00:00
* feat(managed-agent): bound half-open Hosted event streams behind a keepalive capability (#14135) The Harness advertises its events-route keepalive as event-keepalive/1, and the Java client arms the idle watchdog only against a Harness that advertises it, so a rolling upgrade never aborts the quiet streams of an older Harness. The abort is now the typed HostedHarnessStreamIdleException: the coordinator retries it through the existing re-attach path and never settles or cancels the Turn on silence alone. The watchdog ticks every tenth of the bound, so an abort lands 45 to 49.5 s after the last byte. HostedEventStreamLivenessIT runs the probes on the packaged chain behind a TCP relay that holds the events connection half-open or stalls it, and the hosted-harness-mysql fork budget grows to 4793 s. A design note records the numbers, the capability, the outcome and the other Hosted streams. Closes #14135 * test(managed-agent): frame relayed requests and see virtual-thread readers in the liveness gate The event-stream relay classified a connection, rewrote its Host header and matched keepalives within single reads, so a request or a keepalive split across TCP segments escaped the stall and half-open injection or the cadence count. It now buffers each request head, forwards the body by its Content-Length, matches keepalives across reads, and records and resets a request it cannot frame. HostedEventStreamRelayTest pins each split. The half-open probe checked reader release with Thread.getAllStackTraces(), which leaves out the virtual threads Turn readers run on. It now reads a JDK thread dump, and first requires that dump to show the parked reader. * test(managed-agent): count each keepalive one relay read carries (#14135) The relay recorded one stamp per read that held a keepalive, so two keepalives in one read counted once, and the split-keepalive case could report a size of 1 whenever the pieces happened to land together. It now counts every match in the read window; the carried tail is a byte shorter than a keepalive, so none counts twice. A new case sends two keepalives in one write. * test(sdk-java): park the published-window probe mid-interval (#14135) The watchdog's ticks run from the stream's creation, and the probe parked right after it. A 2000 ms bound is a whole number of half-budget 1000 ms ticks, so that park sat on a tick of the mutant too, and wherever the scheduler ran a few ms late (macOS) the mutant aborted at ~2000 ms and passed. Parking 300 ms in puts the park mid-interval for both ticks: the shipped 200 ms tick aborts at 2100 ms and a 1000 ms tick at 2700 ms, so the limit drops to 2400 ms. |
||
|---|---|---|
| .. | ||
| client | ||
| qwencode | ||