refactor(core): remove unused LruCache utility - #9926
Conversation
Drop the unreferenced LruCache helper and its isolated tests so the legacy filename allowlist no longer tracks dead core utility code. Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
|
Thanks for the PR! Template looks good for the essentials — Problem: this is a verified, observed fact rather than a theoretical concern. I grepped the whole repo (case-insensitive) and Direction: aligned. Removing dead code keeps the core utility surface smaller and the filename allowlist accurate; it's pure hygiene with no user-visible behavior and no public-API impact. No CHANGELOG signal is expected for a dead-code removal. Size: core paths are touched. Production logic is 42 deleted lines ( Approach: the scope is exactly right and already minimal — delete the utility, delete its isolated test, drop the matching allowlist entry. There's nothing here to cut and no simpler path; no drive-by changes or unrelated churn in the diff. Risk: no elevated risk signals — none of the changed files match the revert-correlated high-risk paths. Moving on to code review. 🔍 中文说明感谢贡献! 模板的核心部分齐全—— 问题:这是已核实的事实,而非理论性担忧。全仓库(不区分大小写)搜索确认 方向:对齐。删除死代码能让 core 工具面更小、文件名白名单更准确;纯卫生改动,无用户可见行为,也不影响公共 API。死代码删除本就不需要 CHANGELOG 信号。 规模:触及核心路径。生产逻辑为删除 42 行( 方案:范围恰好且已是最小——删除工具、删除其独立单测、移除对应白名单条目。没有可砍的部分,也没有更简路径;diff 里没有顺手改动或无关变更。 风险:无升级风险信号——改动的文件均未命中与 revert 相关的高风险路径。 进入代码审查 🔍 — Qwen Code · qwen3.8-max Reviewed at |
Code reviewBefore reading the diff, my own plan for "remove the unused TestingEvidence below is the PR's own CI on the reviewed commit, fetched via the API (per triage policy, I do not build or run fork code). The primary Linux unit suite is green, which is the meaningful signal for a deletion-only change: typecheck and tests both survive the removal. The macOS/Windows and integration jobs show as Final CI results for
One row per check name (latest run); skipped checks omitted; failures sort first. / 每个检查名一行(取最新一次运行),省略 skipped,失败项排在最前。 Not verified: real-scenario/TUI testing — N/A by design here. This removes unreferenced code with no user-visible behavior, so there is nothing to drive in a terminal, and no sandboxed 中文说明代码审查:在读 diff 之前,我对"删除未使用的 测试:以上证据来自该 PR 在被审提交上的自有 CI(通过 API 获取;按审查策略,不构建或运行 fork 代码)。主要的 Linux 单测套件为绿,这是对纯删除改动最有意义的信号:删除后类型检查与测试均通过。macOS/Windows 与集成测试在本次运行中为 未验证:真实场景/终端测试——此处按设计即为 N/A。删除的是无引用代码,无用户可见行为,没有可在终端中操作的对象,也无需 — Qwen Code · qwen3.8-max Reviewed at |
|
Confidence: 3/5 — clean review at every stage; the 3/5 is the fork-refactor guardrail capping the score, not real doubt about the change. Stepping back: this is exactly the kind of PR you want to see from a contributor — a small, honest, verifiable cleanup. The motivation checks out (I confirmed independently that The one thing I'd flag for whoever merges: CI is not fully settled yet — the main Why I'm not approving: this PR comes from a fork and its title is a 中文说明退一步看:这正是我们希望看到的贡献——小而诚实、可验证的清理。动机成立(我独立确认了 唯一提醒合并者注意的:CI 尚未完全结束——审查时主 不批准的原因:该 PR 来自 fork 且标题为 — Qwen Code · qwen3.8-max Reviewed at |
|
⏸️ Deferring to @yiliang114 — this is a fork PR with a |
|
Maintainer verification: confirmed |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
No issues found. LGTM! ✅
中文说明
未发现问题。LGTM!✅
— qwen3.8-max via Qwen Code /review (v0.22.0)
|
Released in v0.22.2. |
What this PR does
Removes the unused core
LruCacheutility and its isolated unit test, then drops the corresponding legacy filename allowlist entry.Why it's needed
LruCacheis no longer referenced outside its own test, so keeping it around adds dead code and an unnecessary legacy filename exception. Removing it keeps the core utility surface smaller and the filename allowlist more accurate.Reviewer Test Plan
npm ci(completed successfully and ran the repository prepare/build flow)npm run typecheck --workspace packages/corenpx eslint eslint.legacy-filenames.mjs --max-warnings 0npx prettier --check eslint.legacy-filenames.mjs中文说明
删除未被生产代码引用的
LruCache工具及其单测,同时移除旧文件名白名单里的LruCache条目,减少 core 包里的死代码。