mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-07 08:43:35 +08:00
A directory-based-module language (Go/Java) derives a file's module QN from its directory: a root file's module == the project name and a file in pkg/ has module proj.pkg -- exactly the QNs of the "Project" root and the "pkg/" Folder structural nodes. The per-file Module def then clobbered those nodes' labels through the gbuf upsert (last-write-wins on label), turning Project/Folder into Module. Guard the upsert so a "Module" never downgrades a "Project" or "Folder" -- the directory node is the package container. One guard covers both the sequential upsert and the parallel local-gbuf merge. Separately, a dotfile such as .env had its leading dot stripped as an "extension", leaving an empty stem whose module QN also collided with the project root. Treat a leading dot as a dotfile marker (not an extension) and drop it from the QN segment, so .env -> proj.env (a distinct module). Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>