chore: remove orphaned old engine (dead code) (issue #42) - #275
Open
ranxianglei wants to merge 1 commit into
Open
chore: remove orphaned old engine (dead code) (issue #42)#275ranxianglei wants to merge 1 commit into
ranxianglei wants to merge 1 commit into
Conversation
Per @Dog on issue #42: delete the old in-tree compression engine that became dead code after the one-shot acp-kernel rewrite (PR #274). Computed the dead set via transitive relative-import closure from index.ts: only genuinely unreachable files were deleted; everything the kernel adapter and shared infra still import is kept. Removed: - 51 source files: lib/hooks.ts, lib/compress-permission.ts, whole lib/commands/, lib/gc/, lib/ui/, lib/compress/quality-gate/, lib/messages/filter/, lib/messages/inject/, + selected files in lib/compress, lib/messages, lib/prompts. - 47 test files (those covering the deleted modules). Kept (still reachable): all lib/kernel/, shared infra (config, logger, token-utils, auth, update, host-permissions, config-validation), and old modules still imported by them (messages/{query,shape}, prompts/*, state/*, message-ids, protected-patterns, parts of compress/). Verification: typecheck PASS, build PASS (dist/index.js 175.53 KB — byte-identical to pre-deletion, confirming the code was already tree-shaken; zero runtime impact), npm test 336 pass 0 fail (961 -> 336, -625 dead-engine tests).
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.
Stacked on #274 (base:
2026-08-05_acp-kernel). Retarget tomasteronce #274 merges — or fold both into one merge, whichever @Dog prefers.Per @Dog on dog/opencode-acp#42: 旧代码可以直接删除 在新分支 — delete the dead old engine, on a new branch.
What
Removes every source file + test that became orphaned after the one-shot acp-kernel rewrite (#274). The dead set was computed by a transitive relative-import closure trace from
index.ts— only genuinely unreachable files are deleted; everything the kernel adapter and shared infra still import is kept.Removed
lib/hooks.ts,lib/compress-permission.ts, wholelib/commands/,lib/gc/,lib/ui/,lib/compress/quality-gate/,lib/messages/filter/,lib/messages/inject/, plus selected files inlib/compress/,lib/messages/,lib/prompts/.Kept (still reachable — NOT dead)
All
lib/kernel/, shared infra (config,logger,token-utils,auth,update,host-permissions,config-validation), and old modules still imported by them:messages/{query,shape}.ts,prompts/*(except dead extensions),state/*,message-ids.ts,protected-patterns.ts, parts ofcompress/.Verification
npm run typecheck— PASS (no dangling imports)npm run build— PASS;dist/index.js= 175.53 KB, byte-identical to pre-deletion → confirms the removed code was already tree-shaken; zero runtime impact, pure source-tree hygiene.npm test— PASS (336 tests, 0 fail; 961 → 336, −625 dead-engine tests).scripts/ci/check-pr.sh— PASS.Devlog:
devlog/2026-08-05_remove-old-engine/{REQ,WORKLOG}.md.