refactor(core): extract semantic chunk planning - #1128
Merged
Conversation
Signed-off-by: phernandez <paul@basicmachines.co>
phernandez
force-pushed
the
codex/1108-next-core-split
branch
from
July 21, 2026 03:39
30ad561 to
8c238ee
Compare
Closed
10 tasks
14 tasks
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
SearchRepositoryBaseextraction after refactor(core): split search query and row hydration #1122 split query and row-hydration concerns.What Changed
repository/semantic_chunking.pyas the typed, side-effect-free home for semantic chunk planning.SearchRepositoryBasewhile removing the planning implementation from the repository class.VectorChunkRecordtype.Implementation Details
SemanticSourceRowdefines the narrow search-row input contract.VectorChunkRecordnames the deterministic writer input, andVectorChunkBuildResultreturns records with duplicate-key diagnostics.SearchRepositoryBasestill owns backend coordination, embedding calls, state inspection, logging, and persistence hooks.Testing
Automated
just fast-check: passed (Ruff formatting/lint andtytype checking).BASIC_MEMORY_ENV=test uv run pytest tests/repository/test_semantic_chunking.py tests/repository/test_semantic_search_base.py tests/repository/test_sqlite_vector_search_repository.py tests/repository/test_postgres_search_repository.py test-int/semantic/test_search_diagnostics.py --no-cov -q: 51 passed, 23 skipped after rebasing onto currentmain.just fast-test: 4,594 passed, 41 skipped.BASIC_MEMORY_ENV=test uv run pytest tests/repository/test_semantic_chunking.py tests/repository/test_semantic_search_base.py --cov=basic_memory.repository.semantic_chunking --cov-report=term-missing:skip-covered --cov-fail-under=0 -q: 33 passed;semantic_chunking.pyreached 141/141 statements (100%).git diff --check: passed.Manual
just doctor: passed the local configuration, database, file/index/search, and FastEmbed vector-sync health checks.Risks / Follow-ups