Skip to content

chore: remove confirmed dead code (deadcode r73) - #4333

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

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

Conversation

@topcheer

Copy link
Copy Markdown
Owner

Round 73 dead code scan — daemon+mcp Go symbol rotation (postponed from r70/r72; no new merges among the 7 in-flight i18n PRs, rotation branch taken).

Removed (3 symbols, 1 file, -20 lines) — unused -32042 URL elicitation cluster in internal/mcp/elicitation.go:

  • ErrCodeURLElicitationRequired const — zero refs repo-wide (errorcodes_test uses the -32042 literal, not the const)
  • URLElicitationRequiredInfo type — sole field usage sat inside the dead URLElicitationRequiredData; zero external refs
  • URLElicitationRequiredData type — zero refs repo-wide

Verification (r72 three-stage pipeline): exported-symbol external check → intra-package non-test check → raw rg -F full-repo final check; all three symbols confined to their own declarations/docs. go build -tags goolm ./..., go vet, gofmt, and the full internal/mcp test suite (54s, ok) all pass. Cascade check confirmed no orphaned dependencies and no string/reflection face.

Scan coverage this round: internal/daemon (9 files — exported+unexported surfaces, incl. LogFilePath/ReadPIDFile intra-call chains and 6 count=2 disambiguations: 100% alive) and internal/mcp (28 exported funcs, 13 consts, 30+ types, 152 unexported symbols via one-shot frequency scan: only this cluster dead).

Suspect pool (NOT removed — test-only production code): ExpandURITemplate, NewStringID, ErrorCodeMethodNotFound (referenced only by tests; removal would break test compile). pm_hint 4 keys unchanged.

Remove unused -32042 URL elicitation cluster from internal/mcp/elicitation.go
(round 73 daemon+mcp rotation scan):

- ErrCodeURLElicitationRequired const: zero references repo-wide
  (errorcodes_test uses the -32042 literal, not the const)
- URLElicitationRequiredInfo type: sole field usage was inside
  URLElicitationRequiredData; zero external references
- URLElicitationRequiredData type: zero references repo-wide

Verified via rg -F full-repo scan (r72 three-stage pipeline):
exported-func external check, intra-package non-test check, raw
full-repo final check. go build -tags goolm ./..., go vet, gofmt,
and full internal/mcp test suite all pass.

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

Copy link
Copy Markdown
Owner Author

[ggcxf 走读] GO:internal/mcp/elicitation.go 移除 MCP 2025-11-25 -32042 URL elicitation 错误负载族三导出声明(ErrCodeURLElicitationRequired/URLElicitationRequiredInfo/URLElicitationRequiredData),+0/-20 纯删除。全仓 grep 仅定义处自引用,internal/ 包无仓外使用面,死键判定成立(r73 wave)。无逻辑面改动。门面:CI Test=pending;approvals=0(ggaidev=read 通道未修复)。CI 绿+审批在案后进合并判定。

@topcheer

Copy link
Copy Markdown
Owner Author

[ggcxf 更新] CI 已全绿(Test=pass,CodeQL=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