You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug][dsh] internal/config listener reads this (always null): coverage telemetry degenerates to unnamed-entry and every name-keyed transform is dead code #7112
Activity
test(dsh): drive the config hook with the fiber argument
test: finish the (fiber, next) binding alignment the previous commit …
ranxianglei commentedon Nov 18, 2026
(ai: vllm-qwen/qwen3.8-27b)
查重: 不重复。与 #5248 / PR #5994 / #7111 相关但机制独立——#5248/#5994 是「禁用 bili-native 后 host 平面 auto:false 不还原」的症状与修复;本 issue 是那个修复(以及所有按 entry 名走的判断)之所以是死代码的根因:
this绑定错误。#7111 是同文件的另一个问题。标签: p1, dsh, scope/wiring(已打;诊断误导 + 既有修复失效,且误导路径 #2474 更危险,维持 p1)
审核结论(八问)
internal/config中间件用this取 entry 名,但 cordis 真实派发下this恒为 null——覆盖遥测全部记成unnamed-entry,sawFactoryPreset永不置位,所有按名字走的分支(含 [PR] Restore dsh native auto-compaction when bili-native is disabled or absent (#5248) #5994 为 [PR] Four-lane shared startup lifecycle wrap-up: dsh adopts lane mutual exclusion guard, thick lifecycle retained in place (# | 四车道共享启动生命周期收尾:dsh 采用车道互斥守卫,厚生命周期保留原地(#5241 阶段 1 / PR-1d) #5248 加的还原判断)都是死代码。fiber.context.waterfall('internal/config', fiber, () => config)(fiber.ts:678)首参是事件名字符串,events.ts:163 因此thisArg = null,监听器实参为(fiber, next)(events.ts:246-258;cordis 自带监听器 events.ts:156 也是取第一形参)。原代码按this: MiddlewareSelf假设编写,与真实绑定不符。我在本机 cordis 4.1.0 源码逐行核对,与 issue 的机制表一致。sawFactoryPreset恒 false 会把人引向 fix(dsh): profile 层 patch 其实可以关掉 web profile 的原生自动压缩(#1772 结论修正)+ 一个会静默清空整个 preset 的写法坑 #2474 全量快照自救路径(写不全会静默清空 preset,更危险);② [PR] Restore dsh native auto-compaction when bili-native is disabled or absent (#5248) #5994 的 [PR] Four-lane shared startup lifecycle wrap-up: dsh adopts lane mutual exclusion guard, thick lifecycle retained in place (# | 四车道共享启动生命周期收尾:dsh 采用车道互斥守卫,厚生命周期保留原地(#5241 阶段 1 / PR-1d) #5248 修复永不生效——禁用 bili-native 后非 web profile 的 host 平面 auto:false 依旧不还原。核心功能可用但诊断误导 + 既有修复失效 → p1。(fiber, next)取第一实参;抽entryNameOf(fiber)作为取名的唯一入口(空串 → undefined),[PR] Restore dsh native auto-compaction when bili-native is disabled or absent (#5248) #5994 类按名判断复用同一入口,避免同一坑再踩;测试补一条真 cordisContext派发用例(断言this === null且遥测记录真实 preset 名,正反两向)。noteGateCoverage与 gate service 发布路径保留。但 PR 原 head 有一处测试层回归:tests/issue4147-dsh-overlay-structural.test.ts 的 mock 仍按旧绑定用this传名字,PR 原样合入会红(3/5 失败)——该回归已由作者并发推送的8461f55bcf修掉(且this显式传 null,比我的初版更忠实),我核验后在其上补齐了它漏掉的 issue3662 两处调用。交付
this(#7112) #7115,作者本人所开),按一线程一 PR 原则未另开新 PR:[PR] fix(dsh): read the config hook's fiber argument instead ofthis(#7112) #7115f7059d7ba8:作者并发修复8461f55bcf漏了 tests/issue3662-dsh-gate-fallback.test.ts 两处mw.call(PRESET_SELF, null, ...)(只靠断言不依赖名字才保持绿,坏绑定在将来按名分支被测试时仍会复发)——补齐为真实(fiber, next)绑定,并把已不符实意的标识符改对(PRESET_SELF/self/raw → fiber 语义)。entryNameOf(fiber)换成entryNameOf(undefined)恰好只有 2 条遥测用例失败(与 PR 声明一致),证明用例有牙。entryNameOf(fiber)(PR 描述已注明)。合并判定:代码与测试已收敛,等主 CI 绿灯即可合(人工合入)。
ranxianglei commentedon Nov 18, 2026
(ai: vllm-qwen/qwen3.8-27b)
CI 结果补充(上一条承诺的跟进):PR #7115 head
f7059d7ba8全绿——主 CI(test 矩阵 ubuntu/windows × node 22/24 分片 + 全部 guard 车道)success,所有 e2e 车道 success(e2e-native-pi / e2e-native-opencode / e2e-native-dsh / e2e-local-registry / e2e-dsh-plugin-lane / e2e-codex-persona / E2E real codex / pi-codex-ws / codex overlay)。PR 状态 open、mergeable,仅 behind master(合并时 rebase 即可,非阻塞)。可以合了(人工合入)。