Repository navigation
refactor(cli,helpers,tooling): defer hook imports, split helpers, expand ruff, update Docker and docs - #93
Open
michael-denyer wants to merge 1 commit into
Conversation
…expand ruff, update Docker and docs
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.
Why
Cut CLI hook startup overhead, decompose the 1,572-line
helpers.py, encode UTC and code-quality checks in Ruff, and align Docker, release scripts, and docs with the current codebase.What changed
rich,importlib.metadata,responses,text_parsing, andEmbeddingEngineimports on SQL-only paths, and replace thetailsubprocess inlog-responsewithcollections.deque.helpers.pyintocategorization.py,clustering.py,formatting.py, andscoring.pywhile keepinghelpers.pyas a re-export facade.B,UP,SIM, andDTZrules inpyproject.toml, register theintegrationpytest marker, convertmodels.pyenums toStrEnum, and sync.pre-commit-config.yamlruff tov0.17.5.Dockerfileto invokememory-mcpdirectly from/app/.venv/binwithHF_HOME, makescripts/bump-version.shcross-platform and coverskills/memory-mcp/SKILL.md, and refreshARCHITECTURE.md,CLAUDE.md,skills/memory-mcp/SKILL.md,docs/API.md, andCHANGELOG.md.Scope
Package init, CLI, helper modules, storage lazy imports, models, Ruff/pytest/pre-commit config, Dockerfile, bump script, and documentation.
Tradeoffs
Storage's 13-mixin class layout unchanged instead of rewriting 3,575 lines oftests/test_storage.py, because moving dashboard SQL ontoStoragein PR 2 already closed the leaky boundary.sqlite_vecimportsnumpy.typingwhen opened, which bounds how far SQL-only CLI startup can drop while keepingsqlite-vecloaded eagerly instorage/core.py.Blast Radius
Backwards-compatible re-exports remain in
helpers.py. Enumstr()values now return the string value viaStrEnum.Verification
pytest -q: 476 passed, 1 skipped, 0 warnings.ruff check src/ tests/(withB,UP,SIM,DTZ) andruff format --check src/ tests/: passed across 58 files.bash -n scripts/bump-version.sh: passed.memory-mcp-cli hot-cachemedian cold start (5 runs): 329.1ms baseline vs 275.5ms quiet post-split (316.8ms under background load after final rebase).