chore(module-size): 棘轮在主干上自己超基线 —— 补上 #1381 漏改的那一行,别让每条分支都背一条不属于自己的 ⚠ (#1430) - #1434
Merged
Merged
Conversation
… ⚠ (#1430) `origin/alpha@f245627` 上跑第 [14/14] 步,判官报: ⚠ 超基线:packages/ui-mac/src/main/ext-install-planner.ts 实测 3539 行 > 基线 3525(+14) 不是某条分支带来的。逐 commit 量 `ext-install-planner.ts`:`329847979`(2026-08-30) 是 3525,下一个碰它的 commit `ad3864206`(`#1381` / PR `#1409`)就是 3539 —— **+14 全部 来自这一个已合并的 commit**,而那一票把 tree 那一行从 57,542 抬到 59,055、理由里逐字写了 「ext-install-planner.ts 的启停投影(+13)」,却漏改 file 这一行。所以这次的动作不是新开一次 抬基线,而是把 `#1381` 只做了一半的登记补完。 选 B(抬基线并写明理由),不选 A(拆文件),理由写在 tsv 那一行的理由列里,要点: - 这 14 行是远程 MCP 的启停投影,**全长在本文件的私有函数 `computeEnableProjectionEdit` 上**(调用点全在本文件内)。搬出去要把启停投影的内部形状导出成公共 API。 - 只把 `remoteMcpTruthNames()` 那 6 行挪进新文件也只能到 3533、**仍超基线**,而 tree 那一行一点不降 —— 那正是本表抬头点名要挡的「把行搬进新文件」式绕过。 - 整文件按阶段拆是另一件事:`#1289` 票面明写 out of scope,本表 file 行的理由列也写着 「拆分本身另立票」。那张票至今没开(本票不开,超范围)。 按 `#1430` 边界只改这一行:没动另两行、没动判官、没加 `--update`、没删这一行。 Fixes #1430 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
这条 ⚠ 是谁的
origin/alpha@f2456275f(干净树、零本地改动)上跑判官:逐 commit 量
ext-install-planner.ts的行数(git show <c>:<path> | wc -l),找出那 +14 的出处:3298479792026-08-30 REQ-139 默认工作区 (#1192)ad38642062026-09-22#1381/ PR#1409远程 MCP 真源+14 全部来自这一个已合并的 commit,中间没有第二个 commit 碰过这个文件。而
#1381把
tree那一行从 57,542 抬到了 59,055,理由列里还逐字写着「ext-install-planner.ts 的启停投影(+13)」—— 也就是说这次增长在评审面前出现过、被登记过一次,
只是
file这一行漏改了。所以这个 PR 不是新开一次抬基线,是把
#1381只做了一半的登记补完。选 B(抬基线 + 写明理由),不选 A(拆文件)
先读了那 14 行是什么(
git show ad3864206 -- packages/ui-mac/src/main/ext-install-planner.ts):remoteMcpTruthNames()—— 真源里的远程 MCP 名单;没有环境根(纯单测)即空集computeEnableProjectionEdit的remoteMcpNames形参及其注reconcileDesiredStateAtBoot里每次启动读一遍名单readMcpServerRecords的 import不选 A 的两个实测理由:
computeEnableProjectionEdit上,它的调用点全在本文件内。把它们搬出去,要先把启停投影的内部形状导出成公共 API —— 为了让一个体积数字变小而扩大公共面。
remoteMcpTruthNames()那 6 行,挪进新文件后本文件 3533 行,仍 > 3525;而
tree那一行(59075)一点不降。那正是本表抬头逐字点名要挡的形态:「把 800 行从 planner 搬进一个新文件就能让两条 file 行全绿,
而这一层的总量一点没少」。
整文件按阶段拆是另一件事,本 PR 不做也不开票:
#1289票面明写 out of scope,本表
file行的理由列自己也写着「拆分本身另立票」—— 而那张票至今没开。把一张 S 级 chore 变成 3,539 行安装计划器的重构,正是
#1430边界禁止的。按
#1430AC2 的三条界:没有--update式写回、没有删这一行、没有改判官,也没顺手动另两行。diff 是 1 file changed, 1 insertion(+), 1 deletion(-)。
AC1:那条 ⚠ 消失
本分支、工作树只有这一行 tsv 改动,别的什么都没改:
AC3:先证明判官测得出已知的坏(成对)
故意写坏 —— 往
ext-install-planner.ts末尾加一行注释(3539 → 3540):一行就够它响,而且
file行与tree行同时响 —— 顺带证明了新基线不是橡皮章,tree那道防「搬进新文件」的闸也还活着。还原(
git checkout -- <file>,回到 3539):响了能还原 ⇒ 不是恒响门。这一对是 AC3 要的两份输出。
本地门(worktree
1430-ratchet,产物已补齐)bash scripts/alpha-check.sh手跑 + pre-push 钩子各跑一遍,两遍 exit 0,14/14 步全绿。关键行:
与 base fail-set 的差:零。
origin/alpha的 base 是5321 pass / 0 fail,本分支逐字相同。唯一一条「本次未验成」是
[11/14]:本机没有MINIMAX_API_KEY/DASHSCOPE_API_KEY/MOONSHOT_API_KEY,三个 BYOK provider 的目录 id 这次没能问上游。与本改动无关、脚本按设计不拦。跑门前按
alpha-work/governance/local-verification-traps.md补齐了两个未追踪产物(
electron/{dist,path.txt}软链主 checkout;alpha_fence.node用bun run --cwd packages/ui-mac build:fence-addon在本树现编),否则量到的 fail 是缺口的性质、不是这棵树的性质。跑完
core.hooksPath仍是.githooks(读回确认,没被 husky 改掉)。分支落地用
git ls-remote --heads读回确认,不信 push 的退出码。Fixes #1430
🤖 Generated with Claude Code