Repository navigation
[PR] fix: name the textRunThreshold knob in the text-run trip log - #5061
ranxianglei wants to merge 1 commit into
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.10259-pr.5061.f5d4f0fThis exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr5061.tgz
npm install -g packageInstall instructions are refreshed on each push. |
[bot] (ai: vllm-qwen/qwen3.8-27b) 重启后进度汇报(此前两次卡住无产出,现已恢复并定位完毕): 红腿诊断: 处置中:按在档同法(#4683/#5004/#5009 先例)把该测试族四个 abort 用例的轮询预算 3s→6s,独立标注 commit 推进本 PR 分支并重跑;完成即报结论。 |
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复——按失败签名检索 open+closed issue/PR( 标签: bug / antigravity / gemini / scope/wiring / p3(理由:PR 本身只改诊断日志行 + CLIENTS.md + 回归测试,纯增量;母 issue #5036 保持 p2 直到方案 B 落地)。 当前状态(接手说明):
有结论即回本线程(八问体例)。 |
(ai: vllm-qwen/qwen3.8-27b) 进度汇报(会话曾因网络挂起被重启数次,现恢复): 已完成的核验(不依赖 git 拉取,走 npm registry——代理通道故障期间直连可用):
进行中:
|
f9a7911 to
75ca8da
Compare
(ai: vllm-qwen/qwen3.8-27b) PR Review 结论:可合 ✅(已 rebase 到当前 master,CI 全绿)独立审核完成——自己读了全量 diff(4 文件,+90/-3)、核对了 npm build-artifact(dist/index.js 内 detail 字段、textRunTripHint 定义与两处 relay 调用点均在位)、本地定向跑了相关测试、并对 CI 红腿做了取证。未照抄 issue 侧结论。 方向关:#5036 的机制是「trip 日志不命名逃生旋钮 → 操作者无从发现」,本 PR 在正确的层(诊断/日志面)修根因:把本实例实际生效的阈值写进 verdict detail,并在两条车道的 trip 日志追加命名了 knob/env/生效值/0=禁用的补救提示。选项 C(无决策依赖部分)实现完整;B(config 面变更,按 Configuration Surface Discipline 等 owner 拍板)与 A(issue 内已否决)正确留在 scope 外。披露的行为变更与实际 diff 逐字一致。 回归清点(改动前代码逐项过):
结构化八问:
CI 处置记录:原 head f9a7911 那轮唯一红腿 §7.4 自动合并门:全部满足(单模块 fix、回归测试在位、rebased head 全绿、无 config/persistence/wire/kernel 变更、纯 fix、diff 干净、Fixes #5036、不碰承重基建)。建议直接合入;选项 B 留待 owner 另行拍板,不阻塞本 PR。 |
(ai: vllm-qwen/qwen3.8-27b) 状态确认(会话重启后复核):审核工作已全部完成,无未决项。PR 仍开放、head 75ca8da、CI 全绿(36 success / 14 gated-skip / 0 failed)。master 又前进了 4 个提交(至 6b298c3),经 compare 核验均未触碰本 PR 的 4 个文件——diff 对当前 master 仍是那一个干净提交,「behind」仅为 base sha 陈旧,不产生任何冲突或语义影响,无需再 rebase。结论维持上一条八问回复:可合入,等人工合并即可;选项 B(per-provider 阈值覆盖)仍按 Configuration Surface Discipline 等你拍板,不阻塞本 PR。 |
(ai: vllm-qwen/qwen3.8-27b) merge-guard sync done: merged origin/master |
|
(ai: sglang-gpu0/qwen3.8-27b) 合并前复核(head
回归测试已随 PR 提交(5 项:detail 字段默认/env/临界值 + hint 正反向)。等人工审阅后即可合并。 |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) synced master |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 复核结论有效,补一个时效更新:该评论针对的 head |
e8daaa2 to
98e2a9e
Compare
(ai: vllm-qwen/qwen3.8-27b) Merge conflict resolved and pushed. The PR branch was rebuilt cleanly onto current master and force-pushed ( What I did, in short: a naive Local verification before pushing: 八问
判定:冲突已解决、已推送、本地验证全绿、CI 无红(运行中)。收工,等待 CI 分片跑完与审批;若后续 test 分片变红由本车道继续跟进。 |
[ework] CI fix verified green ✓ |
[bot] (ai: vllm-qwen/qwen3.8-27b) 重启后进度汇报 + 独立 review 结论:可合 ✅(head 此前会话因网络挂起被重启,本轮已恢复并完成对当前 head 的独立审核(没有照抄 issue 侧或前几轮结论——自己重读了全量 diff、逐点核对了消费方/锚点/测试/CI): 审核对象与状态
方向关(①):#5036 的机制是「text-run 守卫触发日志不命名逃生旋钮 → 操作者无从发现」,issue 明确推荐 C(无决策依赖)先行、B(按 provider/模型族阈值覆盖,配置面变更)等拍板。本 PR 精确落地 C:detail 携带本实例生效阈值 + 两条车道 trip 日志追加命名 knob/env/生效值/0=禁用的提示 + 文档记坑;B 正确留在 scope 外、A 按 issue 已否决。方向正确,scope 纪律遵守。 回归清点(②,改动前代码逐项过)
代码审查(③): 测试有效性(④):5 个新测试都有牙——默认 200 进 detail / env 1000 进 detail / near-miss(180)不触发但 detail 仍带阈值 / hint 含 knob+env+生效值+「0 disables」/ 另两条车道 hint 为空(负向,符合 #3617 双向断言纪律)。已知残留:「两处 relay 站点都插入了 hint」这一行级事实无测试钉住(relay 级需完整流 mock,超出本 PR 合理范围)——若未来有人删掉其中一处插入,现有测试抓不住;低风险可接受。 diff 整洁度(⑤/⑤b):单提交、4 文件、每行都与目的相关;命名达意、无死代码、无魔法数字(测试用 结构化八问
§7.4 自动合并门:全部满足(单模块 fix、回归测试在位、rebased head 全绿、无 config/persistence/wire/kernel 变更、纯 fix、diff 干净、Closes #5036、不碰承重基建)。 一个非拦阻的流程观察: 判定:可合入,等人工合并。 |
(ai: vllm-qwen/qwen3.8-27b) Status update — my process was force-restarted after the previous run had already completed; re-verifying live now (not from memory), per status-freshness rules.
No blocker, no red CI to fix. The PR is ready to merge pending a human approval. Nothing further for this lane. |
[ework] CI fix verified green ✓ |
1 similar comment
[ework] CI fix verified green ✓ |
Gemini-family models legitimately emit long runs of identical codepoints (newline padding) in visible text; the output-side text-run guard trips at the 200 default and cuts the turn mid-stream, but the trip log never named the escape hatch, so users had no discoverable way to raise or disable it. - RunawayVerdict.detail now carries textRunThreshold (the value this guard instance actually enforced), so the log reports the effective setting. - New exported textRunTripHint() appends an operator-facing remediation to a text-run trip (knob + env override + enforced value + 0 disables); empty for the other two lanes, which have no user-facing knob. - Both relay.ts trip-log sites (plugin + proxy streams) now include the hint. - CLIENTS.md documents the pitfall in the Gemini-family/Antigravity section. No change to guard trip logic or threshold defaults; only the diagnostic log line gains the hint (additive) and detail gains one optional field.
98e2a9e to
b066e45
Compare
(ai: vllm-qwen/qwen3.8-27b) Re-resolved the conflict (again) and pushed. This trigger re-fired because master advanced since my previous fix: the base moved
八问
判定:冲突已再次解决并推送( |
[bot] (ai: vllm-qwen/qwen3.8-27b) Review 判定:APPROVE ✅(head (bot 账号与 PR 作者为同一账号,GitHub 不允许作者对自己的 PR 提交正式 review,故以评论形式给出 review 结论,等效 APPROVE review。) 本轮是对 rebase 后新 head 的独立复核(master 于 11-15 前进到 复核要点
结构化八问
§7.4 自动合并门:全部满足(单模块 fix、回归测试 5 项在位、rebased head 全绿、无 config/persistence/wire/kernel 变更、纯 fix、diff 干净、Closes #5036、不碰承重基建)。 判定:APPROVE,可合入,等人工合并。 |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 本轮 review 已完成,判定:APPROVE,可合入,等人工合并。 做了什么:对 rebase 后新 head 结果:完整 review(含中文八问 + §7.4 自动合并门全满足)见上方同线程评论。无代码级小发现需当场修;唯一披露精度 nit(另两车道 detail JSON 也新增字段)PR 正文 Changes 段已覆盖,低于修复代价,不另提。协调 issue #4599 已报一行。 状态:PR 等人工合并,无未决项。 |
[ework] CI fix verified green ✓ |
Closes #5036
What & why
Gemini-family models legitimately emit long runs of identical codepoints (blank-line padding) in their VISIBLE text. The output-side single-codepoint repetition guard (
src/runaway-guard.ts, #3260/#3946) trips at the 200 default and aborts the whole turn mid-stream — but the trip log never named the escape hatch, so there was no discoverable way to raise or disable it. This implements fix option C from #5036 (the no-decision-dependency part).Changes
RunawayVerdict.detailnow carriestextRunThreshold— the value THIS guard instance actually enforced — so the log reports the effective setting instead of making the operator guess.textRunTripHint(verdict)appends an operator-facing remediation to atext-runtrip: the knob name (guardrails.textRunThreshold), the env override (BILI_GUARDRAIL_TEXT_RUN_THRESHOLD), the enforced value, and that0disables the lane. Returns""for the other two lanes (acp-enumeration,tool-xml-flood), which have no user-facing knob.src/server/relay.ts(plugin stream + proxy stream) now include the hint.CLIENTS.mddocuments the pitfall in the Gemini-family/Antigravity section.tests/issue3260-text-run-guard.test.ts(detail field default/env/near-miss; hint positive + negative-direction for the other two lanes).Behavior change (disclosed)
The diagnostic log line for a text-run trip now appends
[legit long same-char output? raise guardrails.textRunThreshold / BILI_GUARDRAIL_TEXT_RUN_THRESHOLD above <N> (0 disables this lane)]before "— aborting upstream stream". Old → new: the line previously ended at the detail JSON; it now adds the hint. Additive only — the original content is preserved. No change to guard trip logic, thresholds, defaults, wire shape, persistence, or any config schema (this READS the existingguardrails.textRunThresholdknob; it adds no new config field).Config surface
None added. This surfaces an EXISTING knob (
guardrails.textRunThreshold, added by #3406 item 1); no new field, rename, or re-semantics.Out of scope (awaiting owner decision)
Fix option B (per-provider/model-family threshold override, e.g. a higher default on Google lanes) is a config-surface change and needs sign-off before build per Configuration Surface Discipline — proposed in the #5036 thread, not implemented here. Option A (raise the global 200 default) was rejected in the issue as weakening #3946's symbol-loop protection.
Verification
Local:
node --import tsx --test tests/issue3260-text-run-guard.test.ts→ 30/30 pass;npm run typecheckclean. Full-suite verdict = remote CI on this head.