#1025: agents pass the repo FOLDER name ("codebase-memory-mcp"), but * indexed project names derive from the full path * (E:\project\graph\x -> "E-project-graph-x"), so exact lookup fails with * "project not found" while list_projects clearly shows the project. A * passed name that matches exactly ONE indexed project as a segment-aligned * tail ("- " suffix) must resolve to it; zero or s
| 9540 | * scans filenames), so this test indexes real fixtures under an overridden |
| 9541 | * CBM_CACHE_DIR. */ |
| 9542 | static void i1025_write_repo(const char *dir, const char *fn_name) { |
| 9543 | char path[CBM_SZ_512]; |
| 9544 | snprintf(path, sizeof(path), "%s/mod.py", dir); |
| 9545 | FILE *f = fopen(path, "w"); |
| 9546 | if (!f) |
| 9547 | return; |
| 9548 | fprintf(f, "def %s(x):\n return x + 1\n", fn_name); |
| 9549 | fclose(f); |
| 9550 | } |
| 9551 | |
| 9552 | TEST(tool_project_arg_resolves_unique_tail_issue1025) { |
| 9553 | char repo_a[CBM_SZ_256]; |