chore(cleanup): drop verified dead exports and unused types - #4938
Conversation
38becc1 to
5a0e2b5
Compare
Astro-Han
left a comment
There was a problem hiding this comment.
Thanks for the cleanup. Two fresh deep reviewers checked the deletion consumers and protocol semantics at 5a0e2b5cad84e85cf23555dd344bcc07e9383a9d; no additional correctness defect survived cross-checking. One optional simplification is noted inline. Separately, the compatible-change declarations still use epoch 121: when updating this branch onto current main, synchronize them with its current epoch (123 at review time) and rerun the gate. Existing green checks use the earlier base. This review was AI-assisted and cross-checked by the coordinating AI reviewer.
中文
谢谢清理。两位独立深审检查了删除项的消费者和协议语义,未确认新增正确性缺陷;行内提出一条可选精简意见。另外,兼容声明仍为 epoch 121,更新到当前 main 时需同步当时的 epoch(本次检查时为 123)并重跑门禁;已有绿灯基于较早的基线。本次由 AI 协助审查并由主审 AI 交叉验证。
5a0e2b5 to
cd60f4b
Compare
Astro-Han
left a comment
There was a problem hiding this comment.
Thanks for the cleanup. The reviewed removals remain consumer-free, and the unnecessary codec wrapper changes have been removed. I synchronized the branch with current main and re-pinned the compatible-change declaration from 123 to 125: the synthetic merge failed this guard before the adjustment and passes afterward. No product logic was changed by this integration fix.
Approving head 77a8ed5d8a6d20604cc4af850db958b046ea1cfe; merging remains conditional on the new required checks. The earlier independent reviews covered deletion consumers and protocol semantics. This follow-up was AI-assisted source/integration review, not a fresh full-suite run.
中文
感谢清理。已审查的删除项仍无消费者,不必要的 codec wrapper 改动已移除。我同步了当前 main,并将兼容声明从 123 调整到 125;调整前合并结果的协议门禁失败,调整后通过,本次整合未改变产品逻辑。
批准上述 head,合并仍等待新的必要检查。此前独立评审覆盖了删除消费者与协议语义;本轮为 AI 辅助源码及整合核对,没有重新跑全仓测试。
Astro-Han
left a comment
There was a problem hiding this comment.
Integration refresh: the head is still the previously reviewed 77a8ed5d8, but main has moved to 8b3655a17 (epoch 133). Git merges this cleanly; the protocol guard does not. I checked the synthetic merge tree with the repository's guard, which rejects project-catalog-path-limit-unexport.json because it still declares epoch 125.
Please synchronize with current main and re-pin that declaration to the resulting epoch after rechecking its reason. The unexport-only change still needs no protocol behavior change or extra codec wrapper. The earlier green CI/approval should not be treated as validation of today's merge result.
AI-assisted source/integration verification; no tracked files changed.
Remove the dead code that the knip sweep across every workspace and the repository root surfaced, with each symbol verified consumer-free by a repo-wide grep spanning .ts, .tsx, .mjs, .ps1, .py and workflow files: - unused exported functions, types and helpers in runtime (context-budget-helpers, model-history's text-only projection subtree, agent-run-inspect, stream-graph-supervisor-tools, runtime-event-backfill, model-adapter, workspace-executor, compaction-boundary, memory-extraction-proposal, filesystem-authority, plugin-runtime's alias), runtime-host (agent-graph-coordinator, host-kernel, client-capability-coordinator's type re-export, peer-mesh), storage (workspace-version-authority-internal, a fixture's unused helper), cli (workspace-root's type re-exports, an unused wrapper, an unused union) and core (the computer-use action-type alias); - the storage readHead registration plumbing that only fed the deleted readWorkspaceHeadInternal (the live store method and its tests stay); - two dead root-script exports and two ambient .d.mts declarations that no module resolution reaches; - two project-catalog path-limit constants unexported, declared as a compatible extension at the current epoch (123, rebased onto main). Kept deliberately: the decode/encode and PAGE/RANGE codec alias pairs whose both names have live consumers stay as plain aliases so the page and range bounds and the wire contract remain true by construction. Their knip duplicates finding is handled by a scoped ignoreIssues exception for the three alias files in the follow-up gate PR instead of restructuring the declarations. The website keeps its exact cookie@2.0.1 pin: astro's prerenderer resolves it through the website root. The scan configuration that surfaced these (knip.json workspaces) and the CI wiring live in the follow-up gate PR; this PR is deletions only. No behaviour change. Generated-by: Claude Code
77a8ed5 to
77654b3
Compare
Astro-Han
left a comment
There was a problem hiding this comment.
Thanks for rebasing. Reviewed 77654b3: no P0–P3 findings. The previously reviewed removal patch is preserved; the compatibility declaration now correctly uses epoch 133. An independent reviewer rechecked remaining consumers, and the protocol guard passes on the synthetic merge with current main. Current-head checks pass. This is internal dead-code cleanup with no UI/UX change. AI-assisted review; no additional local workspace suite was run in this incremental pass.
中文
感谢 rebase。增量复核无 P0–P3,原有清理内容保持一致,兼容声明已修正为 epoch 133。独立 reviewer 核对了剩余消费者,主审在当前 main 的合成合并上运行协议检查通过,当前 head 检查通过。属于内部死代码清理,无 UI/UX 变化。本轮为 AI 辅助增量审查,未额外重跑 workspace 套件。
Summary
Removes the dead code that a knip sweep across every workspace and the repository root surfaced, with each symbol verified consumer-free by a repo-wide grep spanning
.ts,.tsx,.mjs,.ps1,.pyand workflow files: 28 files, +15/−371 (rebased onto current main).runtime(context-budget-helpers,model-history's text-only projection subtree,agent-run-inspect,stream-graph-supervisor-tools,runtime-event-backfill,model-adapter,workspace-executor,compaction-boundary,memory-extraction-proposal,filesystem-authority,plugin-runtime's alias),runtime-host(agent-graph-coordinator,host-kernel,client-capability-coordinator's type re-export,peer-mesh),storage(workspace-version-authority-internal's orphan plus a fixture's unused helper),cli(workspace-root's type re-exports, an unused wrapper, an unused union) andcore(the computer-use action-type alias);storagereadHeadregistration plumbing that only fed the deletedreadWorkspaceHeadInternal(the live store method and its tests stay);.d.mtsdeclarations that no module resolution reaches;project-catalogpath-limit constants unexported, declared as a compatible extension at the current epoch (133).Kept deliberately: the
decode/encodeandPAGE/RANGEcodec alias pairs whose both names have live consumers stay as plain aliases, so the page/range bound coupling and the result-frame wire-shape symmetry remain true by construction. Their knipduplicatesfinding is accepted with a file-scopedignoreIssuesentry for the three alias files, shipped in the gate PR #4942 (probe-verified there: an injected unused export inartifact.tsis still reported and the fullnpx kniprun is clean). The wire contract stays recorded in the operations spec tables. The website keeps its exactcookie@2.0.1pin: astro's prerenderer resolves it through the website root.The scan configuration that surfaced these and the CI wiring for the gate live in the follow-up draft #4942 (stacked); this PR is deletions only.
No behaviour change.
Verification
Review follow-ups addressed (five review rounds)
readWorkspaceHeadInternaland thereadHeadregistration plumbing that only fed it are deleted; the livereadWorkspaceHeadstore method and its direct tests are untouched.Unused
readFileandSTORAGE_ROOT_MARKER_FILEimports removed from the control-directory-hygiene fixture; orphaned section banners and JSDoc removed frommodel-history.ts(including the leftoverstripSteeringMessagesblock).The
LIFECYCLE_LABELSexport is restored: the nightly issue-pr-lifecycle workflow loads this module through an actions/github-scriptwith:script, which knip's plugin does not see. The workflow is unaffected and the module is registered as a gate entry in chore(ci): run the knip dead-code gate for the repository root and every workspace #4942.The two ambient
.d.mtsdeclarations are restored (TS module resolution consumes sibling declarations without an import statement); the root project glob excludes**/*.d.mtsin chore(ci): run the knip dead-code gate for the repository root and every workspace #4942.Round 4: the three protocol alias files (
artifact.ts,session-transcript.ts,usage-pricing.ts) are restored to plain aliases per review (no wrapper functions, no duplicate-bound test, noprotocol-codec-encode-wrappers.jsoncompatibility declaration); the scoped knipduplicatesexception for them ships in chore(ci): run the knip dead-code gate for the repository root and every workspace #4942 instead. Rebased onto current main; the remaining compatible-change declaration is synced to the current epoch (125). Five files main touched since the original base were re-checked to still carry the intended deletions.Round 5: rebased onto current main (
93a8dd785) with no conflicts; the epoch-sync commit from the previous round folded away, so the branch is a single commit again.project-catalog-path-limit-unexport.jsonis re-pinned from 123 to 133 and its reason re-checked against the protocol as it now stands: both constants are still referenced only insideproject-catalog.ts. Every deleted symbol was re-grepped against the new base.AI use
Tool(s) and scope: Claude Code — the scan/verification loop, the removals, the rebase and epoch sync, the review-follow-up rework, and this description. Every deletion was verified consumer-free by grep before removal; pre-commit gates (biome, ASF headers, protocol epoch) pass on the tree.
Checklist
Generated-by: Claude CodeDoes this PR entail a change in behavior?