Repository navigation
refactor(memory): split QMD manager by domain - #113659
Conversation
|
ClawSweeper congested-publisher exception: the latest published review is still a The pre-rebase exact head completed the full CI/check matrix green. The final head is the same two commits rebased cleanly onto current |
|
Final-head update to the documented ClawSweeper congested-publisher exception: branch protection required one more clean rebase for unrelated The pre-rebase exact head completed the full CI/check matrix green. The final head is the same two commits rebased cleanly onto current |
|
Merged via squash.
|
* refactor(memory): split QMD manager by domain * refactor(memory): keep QMD base types private
What Problem This Solves
The QMD memory manager had grown to 2,314 lines, combining construction, lifecycle, file watching, update and embed coordination, search execution, result normalization, and file/status IO in one production module. That exceeded the max-lines budget and made those responsibilities hard to review independently.
Why This Change Was Made
This behavior-neutral refactor keeps
QmdMemoryManageras the stable public facade while moving its existing implementation into cohesive protected domain bases: core state/construction, helpers, sync and lease coordination, lifecycle/watch handling, search support, search execution, and IO/status. The inherited instance and prototype shape deliberately remains intact because the consolidated QMD tests exercise internal timing, lease, DB, and export invariants without requiring any test changes.Every resulting production file is below 500 lines, so the
qmd-manager.tsmax-lines baseline entry is removed. No config, protocol, storage schema, fallback, runtime import mode, or user-visible behavior changes.User Impact
No user-visible impact. This reduces the QMD manager's review and maintenance surface while preserving current search, sync, watcher, session export, embedding, and status behavior.
Evidence
+2293/-2296(net-3); production TypeScript+2293/-2295(net-2); tests+0/-0; max-lines baseline+0/-1.qmd-manager.tsis 24 lines.node scripts/run-vitest.mjs extensions/memory-core/src/memory/qmd-manager.test.ts extensions/memory-core/src/memory/qmd-manager.slugified-paths.test.ts extensions/memory-core/src/memory/qmd-manager.timer-leak.test.ts extensions/memory-core/src/memory/search-manager.test.ts— 4 files passed, 209 tests passed.node scripts/check-changed.mjs -- config/max-lines-baseline.txt extensions/memory-core/src/memory/qmd-manager.ts extensions/memory-core/src/memory/qmd-manager-base.ts extensions/memory-core/src/memory/qmd-manager-helpers.ts extensions/memory-core/src/memory/qmd-manager-io.ts extensions/memory-core/src/memory/qmd-manager-lifecycle.ts extensions/memory-core/src/memory/qmd-manager-search-support.ts extensions/memory-core/src/memory/qmd-manager-search.ts extensions/memory-core/src/memory/qmd-manager-sync.ts— passed on Blacksmith Testbox, including formatting, extension and extension-test typechecks, extension/script lint, max-lines ratchet, package/plugin boundaries, and import-cycle checks.corepack pnpm build— passed on Blacksmith Testbox; no[INEFFECTIVE_DYNAMIC_IMPORT]warning..agents/skills/autoreview/scripts/autoreview --mode uncommitted --stream-engine-output— clean, no accepted/actionable findings, overall confidence 0.97.