Repository navigation
[PR] fix(diagnostics): report large histories without attributing stalls - #5481
Conversation
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复。 open/closed issue 与近期 PR 中无同主题条目(按主题/失败签名检索: large-history 告警 / event-loop stall 归因 / logRequestCost);PR 引用的已关闭 #4528 仅作背景,本 PR 不声称关闭任何 issue。 标签: bug + scope/wiring + p3(缺陷类:诊断日志在无实测证据下断言「事件循环饥饿」并建议重启会话等有损操作;请求管道诊断面;影响仅日志措辞级,无功能破坏) 审核进行中(方向 → 回归清点 → 代码 → 测试有效性 → diff 整洁度)。CI 镜像缓存快照:static-gates / mysql-contract / lane-guard 全绿,test 分片大部分绿、个别分片仍在跑。结论稍后以八问体例回复。 |
…ression (ranxianglei#5481) The positive test only asserted warn-count and info-line content, so the factual rewording — the entire point of the PR — had no regression pin: reintroducing 'starving the event loop' attribution would pass CI. Restore content assertions on the warn line (label, inbound=/local= fields) and pin the explicit non-attribution clause.
…ouched (ranxianglei#5481) Entry said 12 call sites were changed to import from the new module; git grep shows exactly 10 logRequestCost call sites in handle.ts (unchanged), and what moved was the single import statement.
(ai: vllm-qwen/qwen3.8-27b) 审核结论:可合并(CI 在新 head 结构化八问
审核中发现的两处小问题(按「小问题直接修」已推为独立标注 commit):
验证:本地定向测试 4/4 绿(含新钉)、 收工判定:可合并,等剩余 2 个 test 分片转绿即可。 |
|
The remaining red shard matches the pre-existing intermittent failure tracked in #5523, rather than a request-cost regression:
This links the CI signal to the existing flake tracker; it is not a request to hide the failure or substitute a retry for fixing #5523. |
(ai: vllm-qwen/qwen3.8-27b) 核实了你的归因,结论一致(既有间歇失败、非 request-cost 回归),但引用需要更正一处,且我顺手把分支基线同步了: 1. 引用更正:#5523 不是这个 flake 的跟踪条目——#5523 是已合并的「gate-local 断言证据改读 bili.log」PR(Closes #5520),与 PFA 断言无关。这个 flake 的真实档案在 2. 为什么这个分支还会踩中:本 PR 的分叉点早于 #5506——我验证了 3. 已做的动作(无决策依赖,直接修):把 4. 顺带审了你在我工作期间新推的 判定维持:可合并,等 |
…nxianglei#5481) Review nits on PR ranxianglei#5481: the msgs>1000 predicate is claimed preserved verbatim, so pin both sides of the boundary (1000 -> no warn, 1001 -> warn) plus the unknown-count passthrough lane (no warn, '? msgs'), which the existing 1500/500 pair left untested.
) The entry said all local-forge/side/fail-fast accounting boundaries are unchanged, but the codex local-forged path now logs its cost line without an outbound= field (nothing is handed to fetch there) — disclosed in the PR thread but not in the changelog sentence. auto-mode forge, side and fail-fast lines are byte-identical.
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
APPROVE — the change does exactly what it claims: the large-history advisory now reports measured facts only (message count / inbound bytes / local preparation ms), drops the unsupported event-loop-starvation attribution and the restart/compression advice, and the unit moves to src/server/request-cost.ts without a server re-export.
Independent verification (re-done for this review, not taken from the thread): every one of the 10 master call sites is accounted for — seven unchanged direct sites (passthrough, dsh-authored compaction, dsh refusal, auto-mode forge, two side-lane sites, fail-fast) plus the three pre-forward sites (codexForge, codex compact non-intercepted, main intercept) consolidated into the single callback-bearing forward() at handle.ts:2891. In-request re-sends (ws-byte-shed relay.ts:922, role-ladder hop :1036, image-count shed resend :1387, overflow refold resend :1443) each build their own init and call fetchWithTimeout directly, so the onWireBody callback fires at most once per client request — no duplicate cost lines. The mainSend guard refactor (relay.ts:733) is logically equivalent to the old inline condition. No kernel/, config-surface, wire, or persistence change; no stale slow-session / SLOW_SESSION_MSG_WARN references remain anywhere.
Tests carry teeth: the issue903 e2e asserts outbound= equals formatBytes(bytes actually received upstream) EXACTLY under a deliberately length-changing compat-role rewrite (a revert to pre-forward measurement fails), pins the full line shape by regex, and asserts exactly one cost line per request; the issue4528 suite now also pins both sides of the preserved msgs>1000 boundary and the unknown-count lane (added this review). Targeted suites pass locally (issue4528 7/7, issue903 e2e green) and tsc --noEmit is clean.
Disclosed behavior changes (diagnostic surface only, all intended): (1) slow-session -> large-history relabel + rewritten warn text — the purpose of the PR; (2) outbound= now measures the final wire body handed to fetch instead of the pre-forward buffer (differs under V1 wrap / compat-role rewrite / egress shed); (3) codex local-forge requests lose their outbound field (nothing is handed to fetch there); (4) requests that die inside forward() before the wire point (413 fuses, circuit-open fast-fail, client disconnect) no longer emit a cost line or the #5408 noteRequest tick — those paths answer locally and instantly, so no stall observation is lost.
已顺手修:threshold-boundary & unknown-count test pins (commit 411e5e1) + CHANGELOG local-forge accounting wording corrected to match the code (commit fe4ffdb) — pushed to this branch, test/docs only, no runtime change.
(ai: vllm-qwen/qwen3.8-27b) review-worker-r1 独立复核完成(基线 head 2af70db,另推两个 review-nit commit),结论:可合并,APPROVE 已提交(GitHub review id 5736175065)。 审核独立性未沿用前两轮结论,关键点全部重新验证:master 与 PR head 的 logRequestCost 调用点逐一核对(10 处 → 8 处直接点 + 1 个回调);forwardCaptured 内所有重发路径确认各自独立 fetch、不会二次触发回调(ws-byte-shed relay.ts:922 / role-ladder hop :1036 / image-count shed resend :1387 / overflow refold resend :1443);全仓 grep 无 forward/forwardCaptured 递归再入;autoModeForge(handle.ts:2123)、dsh-authored compaction(:2062)、dsh refusal(:2080)等本地应答路径自带直接记账点、不受影响;mainSend 守卫重构(relay.ts:733)与旧内联条件逻辑等价;全仓无 slow-session / SLOW_SESSION_MSG_WARN 残留引用。 结构化八问
行为变更清单(旧值→新值,均有意):
测试有效性:真测试——warn 文案断言带牙(回归到旧文案即红);e2e 对上游实收字节做精确匹配而非容差比较;每请求行数断言(恰好 3 行)防双发。本轮补钉三例:阈值边界(1000 不告警 / 1001 告警)与未知条数(passthrough 车道不告警、info 行记 已顺手修:① large-history 阈值边界与未知条数测试钉(commit 411e5e1);② CHANGELOG 本地 forge 记账表述改为与代码事实一致(commit fe4ffdb)。两者均 test/docs,已推本分支。 判定:可合并(APPROVE 已提交;PR 仍为 draft,转非 draft 后由 owner 合并)。 |
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
APPROVE (re-review at new head fe4ffdb) — the increment over my full review at 2af70db is exactly the two review-nit commits pushed to this branch last round, nothing else: git diff 2af70db07..fe4ffdb0b = 2 files, +23/−1, zero runtime code.
- 411e5e1 (test): pins both sides of the preserved msgs>1000 predicate (1000 → no warn, 1001 → warn) plus the unknown-count passthrough lane (no warn, "? msgs") in tests/issue4528-event-loop-yield.test.ts — closes the silent
>→>=drift hole the old 1500/500 pair left open. - fe4ffdb (docs): CHANGELOG local-forge accounting sentence corrected to match the code (codexForge cost line no longer carries an outbound field; auto-mode forge/side/fail-fast byte-identical).
Both were written and locally verified by this reviewer (issue4528 suite 7/7, tsc --noEmit clean). Mirror-cache check states at fe4ffdb: 0 failed across all completed checks (9 success / 15 skipped, 6 test shards still finishing); the substantive end-to-end review of the PR content stands as posted at 2af70db (review id 5736175065 + the eight-question analysis in the thread).
(ai: vllm-qwen/qwen3.8-27b) review-worker-r1 第二轮复核完成(新 head fe4ffdb),结论:可合并,APPROVE 已对新 head 重新提交(GitHub review id 5736454077)。 本轮对象是上一轮推入分支的两个「已顺手修」commit(2af70db07 → fe4ffdb),增量范围独立验证: 结构化八问(本轮增量)
判定:可合并(两轮 APPROVE 均有效,最新一条覆盖当前 head;PR 仍为 draft,转非 draft 后由 owner 合并)。 |
27e2110 to
4954a12
Compare
ranxianglei#5481) The merge of origin/master into the branch (4954a12) resolved the CHANGELOG conflict with the pre-review wording of the ranxianglei#5481 entry, silently dropping the correction from fe4ffdb: the codex local-forge path logs its cost line WITHOUT an outbound field now (nothing is handed to fetch there), so '本地 forge ... 既有记账边界不变' was inaccurate for that path. Re-applies the corrected sentence verbatim.
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
APPROVE (round 3, merge head 4954a12) — this round's delta is the author's merge of origin/master (be611a8) into the branch; I audited the merge itself, not just the diff stat.
Merge integrity (verified per-file, hunk level):
- Pure merge commit, no content commits; effective PR diff vs current master is still exactly the 8 files reviewed in rounds 1–2 (+ my two nit commits), no kernel/ in the PR's own contribution.
- Tree intact: every file present; PR-only blobs byte-identical to the pre-merge head; master-only blobs byte-identical to master.
- src/server/relay.ts, src/server.ts, reference/architecture.md, both test files, request-cost.ts: PR content lines identical across the merge.
- src/server/handle.ts: correct three-way union — master's new 14th forward() arg (
throttleModel, #5696) and the PR's cost callback coexist in the right order at the single converging call site; the ../server.js import keeps master'swarnModelNameMissIfNewwhile staying withoutlogRequestCost(now imported from ./request-cost.js). All 9 cost sites present with unchanged argument shapes.
One regression found and fixed on the spot: the merge's CHANGELOG conflict resolution silently reverted my fe4ffdb correction — the entry again claimed "本地 forge、side 与 fail-fast 的既有记账边界不变", which is wrong for the codex local-forge path (it logs its line WITHOUT an outbound field now). Re-applied the corrected sentence verbatim: commit 64b1bac (docs only, pushed to this branch).
Local verification at 4954a12: issue4528 + issue903 suites 8/8 (the e2e drives the full merged pipeline — fastpath GA included — and asserts outbound= against exact upstream-received bytes), tsc --noEmit clean. Mirror-cache checks at 4954a12: 0 failed (test matrix re-running after the docs commit).
(ai: vllm-qwen/qwen3.8-27b) review-worker-r1 第三轮复核完成(merge head 4954a12 = 作者把 origin/master be611a8 合入分支),结论:可合并,APPROVE 已提交(GitHub review id 5799491834)。本轮对象是 merge commit 本身,逐文件做了 hunk 级 union 审计:
结构化八问(本轮增量)
已顺手修:merge 丢失的 CHANGELOG 本地 forge 记账措辞重新落位 + commit 64b1bac(docs only,已推本分支)。 判定:可合并(第三轮 APPROVE 覆盖当前 head;PR 仍为 draft,转非 draft 后由 owner 合并)。 |
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
APPROVE (round 4, head 64b1bac) — the increment over 4954a12 is exactly one CHANGELOG line: my round-3 re-application of the local-forge accounting wording that the master-merge conflict resolution had reverted (verified byte-identical to the fe4ffdb correction). Docs only, no code, no tests touched.
Full-suite CI is now settled and green at this head: 30/30 checks completed, 0 failed (14 success / 16 skipped) per the mirror cache. The substantive end-to-end review stands as posted in rounds 1–3 (reviews 5736175065 / 5736454077 / 5799491834); nothing in this increment changes any of those findings.
(ai: vllm-qwen/qwen3.8-27b) review-worker-r1 第四轮复核完成(head 64b1bac),结论:可合并,APPROVE 已提交(GitHub review id 5799593846)。本轮增量就是上一轮我推入的 docs commit 本身: 结构化八问(本轮增量)
判定:可合并(四轮 APPROVE 均有效,最新一条覆盖当前 head 64b1bac 且 CI 全绿;PR 仍为 draft,转非 draft 后由 owner 合并)。 |
…lake (no code change) CI job 129092915572 (test ubuntu-24 shard 1): 'proxy exited before becoming healthy (dsh-main-4, code=1)' in tests/issue5631-restart-survival.test.ts — the 4th proxy spawn crashed at boot; pi lane and all other 3553 tests passed. Not reproducible on this head: 3 consecutive full local runs green (d2ad8bf). PR diff is diagnostics-only (request-cost log move), untouched by the failing path. Empty commit to re-trigger CI.
(ai: vllm-qwen/qwen3.8-27b) CI fix run complete — 1. What was red? One check: 2. Why did it fail? Startup crash of a spawned proxy under shared-runner load (most likely the probe-port→listen race in the test's 3. What did I do? Verified live state (mirror cache + single API reads), pulled the job log, confirmed the single failing test, checked the PR diff vs master, then built the exact PR head locally and ran the targeted suite 4. Evidence it's resolved? New-head re-run: all 14 workflow runs completed 5. Regression risk from this run? None — the only push is an empty commit; working tree and diff vs master are byte-identical to 6. Anything outstanding? Nothing blocking. Optional follow-up (not done here): harden the test's port allocation if this flake recurs (e.g., retry the spawn once on early exit) — I deliberately did not touch the test file since the cause isn't provable from the runner-side log alone. 7. Verdict. Red-CI blocker cleared: re-run green on |
|
冲突 |
- src/server.ts / src/server/request-cost.ts: keep this PR's module extraction; port master's ranxianglei#5907 once-per-session slow-warn dedup (SLOW_SESSION_WARNED map + bound, est-tok field, _resetSlowSessionWarnedForTest) into request-cost.ts. The warn line composes both intents as pinned by the merged test suite in tests/issue4528-event-loop-yield.test.ts: factual non-attributing core (ranxianglei#5481) + size picture with the bili sessions rm cleanup command (ranxianglei#5907); restart/enabling-compression advice stays out. - src/server/relay.ts: master's ranxianglei#5998 strict-thinking-posture strip runs BEFORE this PR's requestBody extraction, so onWireBody captures the bytes actually handed to fetch. - src/server.ts imports: drop queryLogLines (no longer used on master) and noteRequest (moved with logRequestCost); keep configureLogRetention. - CHANGELOG.md / reference/architecture.md: union of both sides' entries. - Targeted local runs green: issue4528-event-loop-yield, issue903-request-cost-log, issue5998-unsigned-thinking-egress (25/25); typecheck clean.
(ai: vllm-qwen/qwen3.8-27b) Conflict resolved and pushed — PR head is now 1. What was blocked. The PR branch conflicted with 2. Root cause. Two sides evolved the same slow-session-warning surface in different shapes: this PR extracted 3. Scope of impact. PR branch only; nothing merged to master by me. User-visible effect is confined to one log line's final wording (disclosed in Q6). 4. How it was fixed. Chose MERGE over rebase (branch already uses merge style; no force-push; contributor commits preserved). All resolutions are unions:
5. Regression checks. The merged test file 6. Behavior change disclosure (intended). The slow-session warn line after this merge: old (master pre-merge) = fired every turn, attributed stalls to event-loop starvation, advised restart/compression; new = fires once per session per process (#5907), carries 7. Remaining. Awaiting the fresh CI run on |
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
APPROVE (round 5, head 5f09d75) — the increment over the previously reviewed content is the author's second master merge (d271b14 ← master tip 4446301) plus my one-line docs commit below. I audited the merge as a three-way union against current master; the effective PR diff stays within the same 8-file scope, no kernel/ in the PR contribution.
Key point of this round: during conflict resolution the author folded master's own #5744/#5907 evolution of the slow-session advisory (wall-clock trigger ms > SLOW_SESSION_MS_WARN, once-per-session dedup map with 512 cap, est-tok, bili sessions rm hint) INTO the new module, while keeping this PR's de-attributed wording. Verified against master tip:
- src/server.ts −56/+0: exactly the moved block (noteRequest/currentFetchTransport imports, formatBytes, constants, dedup map, reset helper, logRequestCost); nothing else removed.
- src/server/request-cost.ts (+60): predicate / dedup / estTok / info line / noteRequest observation are content-equivalent to master's latest logic; only the warn wording changed (disclosed below).
- handle.ts: import now from ./request-cost.js (master's warnModelNameMissIfNew retained); the 3 pre-forward call sites collapse into the single forward() callback placed after master's new throttleModel arg. Call-site parity vs master: master's 10 sites → head's 7 direct + 1 callback covering the 3 consolidated — every master cost-line path still emits exactly one line.
- relay.ts: onWireBody param + codexForge fire + wire-point measurement + mainSend refactor — content lines identical to the version approved in earlier rounds; retry/resend paths use separate fetch calls, so onWireBody fires ≤1× per client request.
- tests/issue4528-event-loop-yield.test.ts: correct union — master's yieldToEventLoop cases intact; guard cases pin the wall-clock trigger both ways (big-but-fast → silent, tiny-but-slow → warn, #5744) and carry teeth on the wording (/not evidence of event-loop starvation/, doesNotMatch /starving the event loop/, doesNotMatch /restart|enabling compression/), plus once-per-session + est-tok (~6525000 for 26.1MB) + sessions-rm pins. The old count-boundary cases were correctly superseded (that predicate no longer exists).
- tests/issue903-request-cost-log.test.ts: exact formatBytes match vs upstream-received bytes with a compat role rewrite so wire ≠ pre-forward — pins the measurement-point move.
- CHANGELOG entry factually consistent with the code; architecture.md module line accurate.
Behavior change vs current master (disclosed): the slow-session warn text drops the causal claim "synchronous per-turn work is starving the event loop (#4528/#5744)" and the "or enabling compression" advice; it now states "past the 1000ms wall-clock budget (#5744); measured facts only, cause not attributed — not evidence of event-loop starvation (#4528)" and keeps only bili sessions rm. Rationale: elapsed local time alone cannot establish event-loop starvation, and restart/compression advice without evidence pushes a lossy action — this PR's original purpose. No threshold, field, severity, or observation-point change vs master.
Note for the author (non-blocking): the PR body's Limits section still says "preserve msgs>1000 predicate / no threshold tuning" — true when written, but master's #5744 then moved the trigger to wall clock and this merge carries it; the effective diff vs today's master changes no threshold. Worth a body refresh before undrafting.
已顺手修:src/web/sessions-data.ts:41 stale pointer — the comment cited SLOW_SESSION_MSG_WARN in src/server.ts; both the name (SLOW_SESSION_MS_WARN, an ms budget since master's #5744) and the location (src/server/request-cost.ts, where this PR moves it) were wrong. Comment-only, commit 5f09d75.
Local at head: issue4528+issue903 9/9 pass, tsc --noEmit clean. CI on the author's merge head d271b14: 28/30 completed, 0 failed (2 tail shards still running at read time); the matrix on 5f09d75 is running with 0 failed so far.
(ai: vllm-qwen/qwen3.8-27b) Round 5 review complete at head The interesting part of this round: master independently evolved the same advisory (#5744 wall-clock trigger replacing the msg-count predicate; #5907 once-per-session dedup + est-tok + One non-blocking note for the author: the PR body's Limits section ("preserve msgs>1000 predicate / no threshold tuning") is stale relative to today's master — #5744 moved the trigger to wall clock before this merge; worth a body refresh before undrafting. 结构化八问(本轮增量)
已顺手修:src/web/sessions-data.ts:41 陈旧注释指针(SLOW_SESSION_MSG_WARN@src/server.ts → SLOW_SESSION_MS_WARN@src/server/request-cost.ts)+ commit 5f09d75(comment-only)。 判定:可合并(第五轮 APPROVE 覆盖当前 head 5f09d75;PR 仍为 draft,转非 draft 后由 owner 合并)。 |
[ework] CI fix verified green ✓ |
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
APPROVE — sixth independent review, on head 5f09d75e8a (the docs-only comment fix pushed after my fifth-round approval landed on d271b14476, which made that approval stale).
Re-verified independently at this head (not carried over from earlier rounds):
- Call-site parity: master had 10 direct
logRequestCostsites; this head keeps 7 direct sites plus exactly one callback site (handle.ts:3148) wired into the single convergingforward()call. The three removed direct sites (codex forge, codex compaction passthrough, main-pipeline pre-return) all funnel into that one forward, so every request path that logged before still logs exactly once. No double logging: no otherforward()caller passes a callback. onWireBodyfires exactly once: referenced at exactly three places inrelay.ts(declaration :346, codex-forge branch :353, main send :1000). Every retry/resend path (ws-byte-shed, role ladder, pck strip, v1 drop, count shed, overflow refold) rebuilds{...init, body: finalizeEgress(...)}without re-firing — the reported outbound is the first fetch body, the same property master's pre-forward measurement had.- Measurement point is correct: the #5998 thinking-posture strip mutates the wire body (
relay.ts:979–993) beforerequestBody = v1Wrap(wireBody)(:994), so the cost line measures the exact bytes handed to fetch — post compat-role rewrite, post V1 wrap, post strip. The e2e test pins this with an exactformatBytesmatch against what the fake upstream actually received (a deliberately long role name makes pre-forward ≠ wire bytes). mainSendrefactor (relay.ts:1062):Prepared.sessionis a required field (server.ts:1923), soprepared !== null && prepared.session !== undefined && !prepared.sidePassthrough && method-checkis logically identical to master's inline condition.- Disclosed observation-boundary change (unchanged from earlier rounds): requests that exit
forward()before the fetch — client disconnect (:699/:1043), egress-window fuse / too-large (:882/:943/:956/:969) — lose their cost line andnoteRequestversus master, which logged at prepare completion. All of those paths answer locally immediately (no stall possible); diagnostic-only loss, acceptable. - Incremental
d271b14476..5f09d75e8a: exactly one file, one comment line (sessions-data.tspointer to the renamed constant) — confirmed by diff, nothing else moved. - CI green on this head: all test shards (ubuntu/windows × node 22/24) + static gates pass, zero failures. Targeted suites (
issue4528,issue903) and typecheck also pass locally.
Behavior changes vs master (all intentional, disclosed in CHANGELOG):
- Warn wording de-attributed: drops "starving the event loop" and "or enabling compression"; now states measured facts only ("not evidence of event-loop starvation (#4528)"). Pinned bidirectionally in tests.
- Outbound field now measures the final fetch body instead of the pre-forward prepared string (more accurate for compat/V1 lanes); the codex local-forge path logs without an outbound field (it never reaches fetch).
- Unit move
src/server.ts→src/server/request-cost.ts, no server re-export.
No threshold, kernel, schema, wire, or config changes. No kernel/ touched.
One non-blocking author-facing note (already raised last round, repeated for the undraft checklist): the PR body's "Limits" section still describes the old msgs>1000 predicate — after the master merge the trigger is the wall-clock budget from #5744. Worth a one-line touch-up before undrafting.
(ai: vllm-qwen/qwen3.8-27b) Review complete — APPROVE posted (GitHub review id 5831310797, head This round exists because my fifth-round approval landed on Independent re-verification at this head (fresh, not carried over from prior rounds):
No small findings to fix this round — nothing left on the branch. One author-facing note repeated from round 5 for the undraft checklist (non-blocking): the PR body's "Limits" section still describes the old msgs>1000 predicate; since the master merge the trigger is the wall-clock budget from #5744. Worth a one-line touch-up before undrafting. 结构化八问:
判定:可合(APPROVED,等 owner 合并)。 协调汇报:review-worker-r1 @ #5481 第六轮完成 — head 5f09d75 独立复核通过,CI 全绿(14 success/0 failed),已发 GitHub APPROVE(review 5831310797),无待修小项,无决策升级。 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.1138-master.a9ba419 # this exact build
npm install -g billion-context@master # always the newest merged build
|
Problem
The large-history warning fires on message count, not on measured starvation. It asserted event-loop causation and advised disruptive history/restart actions without that evidence.
Change
Move the existing logRequestCost owner to src/server/request-cost.ts and migrate callers without a server re-export. Report factual message counts, byte counts and measured local preparation time; remove unsupported stall attribution and restart/compression advice. The msgs>1000 predicate, warn severity, existing UTF8 byte accounting, WebSocket annotation and noteRequest observation are preserved, NOT newly repaired.
Verification
Candidate32b8bb71:4 existing focused runtime checks passed, plus TypeScript, unused-export and test-import-graph gates. Separate direct logger smoke observed one warning at1001 messages, none at1000, and3 bytes for a multibyte outbound character. Those smoke observations are not claims of new permanent boundary tests.
Limits
This does not explain or fix historical long stalls. No threshold tuning, kernel, schema, wire, configuration or recovery-policy change. Related closed#4528 supplies context, not an issue this PR claims to close.