chore: 单测冗余治理 + i18n 死键清理(176 键)#276
Merged
Sway-Chan merged 2 commits intoJul 9, 2026
Merged
Conversation
三路 survey(main/renderer/shared)结论:测试套件纪律良好,冗余极少(renderer 0、 shared 0、main ~2%)。仅移除 4 个高置信真重复,逐个对实码核实、无覆盖损失: - proxy-manager-t6-t9-t15:「已 prune…仍保留 prune」——把生产 onRetry 回填 for 循环 内联复制再断言自己的副本,测零生产代码(注释自承「复现 T9 改动后的代码」)。 - config-gate:「上限:超过 min(50,N)…」——setup 同「全部节点剔光」测,断言更弱、 且注释自承只走到「剔到空」路径未达上限分支;真上限测是紧邻的「上限命中 throw…」。 - dashboard-locale:「地区码锚定段边界判繁体」——3 断言与首个「繁体地区」测逐字重复。 - core-readiness:「isSuperseded 缺省→行为不变」——配置/deps/期望与「进程活但 API 始终 不绑→timeout」逐字相同。 其余 ~20 中置信项为平台 doc-matrix/正交不变量分层,删则失守卫,保留。 gate:tsc 绿、jest 2895→2891(降 4,无其他变动)。
sonnet 治理 + 主线复核。稳健法识别真死键:键字符串全 src 零带引号字面量使用, 且不在任何动态模板前缀下(rules.<action>/rules.types.*/ruleResources.category.*/ sidebar.*/settings.nav.* 等 13 个前缀 + SUBSCRIPTION_ERROR_I18N_KEY 等查找表已排除), 保守偏差(存疑即留)。 主要死因:Conduit 密度重设计移除各协议表单 per-field 描述行(servers.*Desc ~60)、 TS 连接卡文案重命名、面板/关于/高级/网络节旧键。5 locale 同步删,parity 保持,无空对象残留。 把关复核(独立 ground-truth):176 键逐个 0 带引号使用(collision-safe 正则)+ 0 落 真动态前缀(rules.proxy/direct/block 等真动态键仍在)+ parity 5×1474。gate tsc + jest 2891 绿。
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.
三路 survey(main/renderer/shared)+ 稳健法治理,主线独立复核。
单测冗余
survey 结论:测试套件纪律良好——renderer 0、shared 0、main-process ~2%。仅移除 4 个高置信真重复(逐个对实码核实,无覆盖损失):
proxy-manager-t6-t9-t15:内联复制生产 onRetry 回填循环再断言自己副本(测零生产代码)config-gate:「上限」测 setup 同「全部剔光」测、断言更弱、未达上限分支(真上限测紧邻仍在)dashboard-locale:「地区码锚定」3 断言与首个「繁体地区」测逐字重复core-readiness:「isSuperseded 缺省」与「进程活但 API 不绑→timeout」逐字相同其余 ~20 中置信项为平台 doc-matrix/正交不变量分层,删则失守卫,保留。
i18n 死键
稳健法(键字符串全 src 零带引号使用 + 不在 13 个动态模板前缀下 + 查找表已排除 + 保守偏差)识别 176 个真死键,5 locale 同步删(各 1650→1474,parity 保持)。主因:Conduit 密度重设计移除各协议表单 per-field 描述行、TS 连接卡文案重命名、旧节键。
把关复核(独立 ground-truth):176 键逐个 0 带引号字面量使用(collision-safe)+ 0 落真动态前缀(rules.proxy/direct/block 等真动态键仍在)+ parity 5×1474。
gate:tsc 绿、jest 2895→2891(降 4 冗余测,i18n 改动不影响测试数)。