-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Merged
Conversation
Signed-off-by: Berserk Agent <berserk@agent.local>
...ls (DeusData#604) Signed-off-by: Berserk Agent <berserk@agent.local>
...h store (DeusData#604) Signed-off-by: Berserk Agent <berserk@agent.local>
Signed-off-by: Berserk Agent <berserk@agent.local>
DeusData
commented
Jun 25, 2026
Owner
Excellent work, @linze0721 — a thorough fix for #604. get_architecture was ignoring the path argument entirely; threading a scoped file_path predicate through every aspect builder (plus the node/edge/schema counts) is genuinely the right shape for this. I appreciate that it's all parameterized SQL and that the unset-path case falls back to the exact prior queries, so default behavior is fully preserved. The root-vs-scoped totals are a useful addition, and both the store-level and end-to-end MCP tests are reproduce-first. All CI green including Windows + CodeQL. Merging — thank you!
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.
Summary
Fix for #604:
get_architecturepath scopingProblem
get_architectureignored the optionalpathargument and always returned whole-project architecture (sametotal_nodes/ package lists for root vs subdirectory scopes).Solution (3 commits on branch)
src/store/store.c,src/store/store.h): Extendedcbm_store_get_architecturewith optionalpath(directory prefix onnodes.file_path). Threaded scoping througharch_*builders (languages, file tree, clusters, hotspots, entry points, routes, packages/modules, schema counts). Whenpathis set, responses expose distinct root vs scoped node/edge totals.src/mcp/mcp.c): Addedpathto theget_architecturetool schema; handler parses and forwardspath, emitsroot_total_*/scoped_total_*(and related fields) when scoped.55058c0): Normalize trailing slashes onpath; align MCPpath_scopedflag with store behavior.Tests
tests/test_store_arch.c:arch_path_scoping(+ trailing-slash equivalence)tests/test_mcp.c:tool_get_architecture_path_scopingVerification
make -j$(nproc) -f Makefile.cbm test: 5695 passed, 1 failed —tests/test_incremental.cRSS threshold (pre-existing, unrelated to #604). Targeted architecture path tests passed.Push
Branch
berserk/fd632085-2b69-4b14-930b-47025d80d973pushed toorigin(HEAD55058c0).PR
https://github.com/linze0721/codebase-memory-mcp/pull/new/berserk/fd632085-2b69-4b14-930b-47025d80d973
Commit
55058c0
Branch
berserk/fd632085-2b69-4b14-930b-47025d80d973
Closes #604