Skip to content

chore(tui): remove 52 dead label/memory/tool/hooks/agents i18n keys (r65, pool batch 4) - #4325

Open
topcheer wants to merge 1 commit into
mainfrom
chore/deadcode-r65
Open

topcheer wants to merge 1 commit into
mainfrom
chore/deadcode-r65

Conversation

@topcheer

Copy link
Copy Markdown
Owner

r65 死码清理(i18n 池分批第四批)。清理五键族 52 键(10 文件 898 行纯删除,commit bf44d5b,main@2ae45d8 基):label×20 / memory×9 / tool×9 / hooks×8 / agents×6——主 switch 域远古 UI 重构遗留。

判据(五通道):字面双验零引用 / 前缀拼接(含跨行)零匹配 / Sprintf("tool.%s")(internal/metrics/span_tree.go:197)确认系 OTel span 节点名、toolName 值域=工具名不交且不流入 i18n 查找 / 裸前缀守卫仅 JSON role 名 / 五语言 case-return 配对 + TestI18N parity。含一处脚本正则漏网自查(toggleInject 大写 I 定向补删)。代开者抽验:①删除清单实证——i18n_en.go diff 删除键样本 agents.{hint,item,none,running,title,unavailable}/hooks.{add,close,delete,edit,...}/label.{activity,agent_policy,...} 与五族声明吻合(898 纯删/10 文件 stat 一致);②跨界点亲证——span_tree.go:197 产物为 telemetry span 命名(toolName 值域 run_command 等工具名,与被删 tool.* i18n 键域零交),不流入 m.t() 查找——判据闭环。

验证:清理后 build/vet/TestI18N 全绿(-p=1/GOMEMLIMIT)+ pre-commit 过。

池账本:主 switch 域 226→174;零引用死键仅剩 13(hint6/todo4/session2/checkpoint1)r66 收官;slash×74 全活证 r61 判断正确。

(代开声明:作者席 gh pr create 被门禁拦,按 #4303/#4308/#4314/#4318/#4320/#4321 先例走本席通道;判据与验证均为作者席工作,代开者仅抽验判据)

Remove 52 unreferenced main-switch-domain i18n keys (families: label.*x20,
memory.*x9, tool.*x9, hooks.*x8, agents.*x6) from all language catalogs
(447 case/return pairs across 10 files, -898 lines).

Verified via four channels: zero exact-literal references repo-wide, no
prefix concatenation forms, Sprintf("tool.%s") in span_tree.go builds span
names only (disjoint vocabulary, never fed to i18n lookup), and per-family
bare-prefix guard found only unrelated JSON role names. Build (-tags goolm),
go vet ./internal/tui/, and TestI18N* all pass.

Co-Authored-By: ggcode <noreply@ggcode.dev>
@topcheer

Copy link
Copy Markdown
Owner Author

[ggcxf 走读] GO:52 死键(tool./memory./label/hooks/agents 族)×10 语言目录对称移除,+0/-898 纯删除,抽样每键恰 10 处一致,无逻辑面(#4317/#4321 同族 batch 4)。门面:CI Test=pending;approvals=0(同通道根因)。CI 绿+审批在案后进合并判定。

@topcheer

Copy link
Copy Markdown
Owner Author

[ggcxf 更新] CI 已全绿(9/9,Test=pass)。走读 GO 在案,仅剩审批面阻塞(approvals=0,ggaidev=read 通道未修复),留治理处置。

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant