Send an SSE heartbeat during silent stretches; link plural forms; draft in English on a non-English turn - #71
Merged
Conversation
…nd sentence-initial forms The first task-battery run on Qwen (main cedc76b) cut four tasks — T2.7, T3.2, T3.8, C12 — as `terminated` between 5 and 7½ minutes in, none near the 900 s cap. Node's fetch (undici) drops a body that is idle for 300 s, and a run on Qwen at four-way concurrency has silent stretches longer than that: a planner round on a busy gateway, a cold class-connectivity aggregation. The stream now carries an SSE comment line (`: keepalive`) every 15 s while nothing else is being sent. A comment carries no event, so the page, the battery runner and EventSource all ignore it; the timer is unref'd and cleared when the run ends. Verified on a local build: six keepalives across a 90 s planner stretch, parsers unaffected. The fifth failure, L3, was the linker: the synthesiser opened with "Mushroom bodies are paired neuropils" about one run in three, and the registry name "mushroom body" was matched letter for letter, so the answer carried no link. linkifyKnownTerms now matches a name's regular plural (-s, -es, -ies) and a capitalised first letter on a lower-case name, keeps the span as written for the link text, and still links each term once. A symbol's case is unchanged: "PN" matches "PNs", not "pn".
Translate-last depends on the draft being English: every gate and linker reads English, and the translation is what the reader sees. Nothing had said so to the model. On "キノコ体とは何ですか?" Qwen wrote the draft in Japanese about one run in three; the linker then found no "mushroom body" to link, the translation step translated Japanese into Japanese, and the reader got a correct answer with no links — battery L3, the one failure left on the heartbeat run (77/78). The rule is added to the synthesis message on non-English turns only, stated last, naming the question's language. Three concurrent local runs of L3 now draft in English with 4/4/11 links; English turns carry no such line. The English source is also logged under VFB_HARNESS_TRACE, since "links=0" was unreadable without the text it was measured on.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The first task-battery run on Qwen (
mainat cedc76b) cut four tasks — T2.7, T3.2, T3.8, C12 — asterminatedbetween 5 and 7½ minutes in, none near the 900 s cap. Node's fetch (undici) drops a body that is idle for 300 s, and a run on Qwen at four-way concurrency has silent stretches longer than that (a planner round on a busy gateway, a cold class-connectivity aggregation). The stream now carries an SSE comment line (: keepalive) every 15 s while nothing else is being sent; a comment carries no event, so the page, the battery runner and EventSource all ignore it. The timer is unref'd and cleared when the run ends. Verified on a local build: six keepalives across a 90 s planner stretch, parsers unaffected.The fifth failure, L3, was the linker: the synthesiser opened with "Mushroom bodies are paired neuropils" (about one run in three at synth temperature 0.7) and the registry name
mushroom bodywas matched letter for letter, so the answer carried no link.linkifyKnownTermsnow matches a name's regular plural (-s/-es/-ies) and a capitalised first letter on a lower-case name, keeps the span as written for the link text, and still links each term once; a symbol's case is unchanged ("PN" matches "PNs", never "pn").Third: the first battery on the heartbeat alone came back 77/78 — zero
terminated, and L3 still unlinked. The English source (now logged underVFB_HARNESS_TRACE) showed why: on a Japanese question Qwen wrote the draft in Japanese about one run in three. Nothing had told it to write English, and translate-last depends on that — the linker found no "mushroom body", and the translation step translated Japanese into Japanese. The synthesis message now carries, on non-English turns only and stated last, "WRITE THE ANSWER IN ENGLISH, even though the question is written in Japanese…". Three concurrent local runs of L3 then drafted in English with 4/4/11 links.Unit suite 1,390/1,392 (two skips), lint clean.