From dc139b06745aa57808d50197f626c8903fe68aee Mon Sep 17 00:00:00 2001 From: PatrickSys Date: Tue, 14 Apr 2026 16:31:24 +0200 Subject: [PATCH 1/2] test(map): track symbol-aware fixture index --- .gitignore | 1 + .../map-fixture/.codebase-context/index.json | 76 +++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 tests/fixtures/map-fixture/.codebase-context/index.json diff --git a/.gitignore b/.gitignore index 0b214a1..ea7408e 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ dist/ .codebase-context/* **/.codebase-context/* !/.codebase-context/memory.json +!tests/fixtures/map-fixture/.codebase-context/index.json .codebase/ *.log .DS_Store diff --git a/tests/fixtures/map-fixture/.codebase-context/index.json b/tests/fixtures/map-fixture/.codebase-context/index.json new file mode 100644 index 0000000..f44e700 --- /dev/null +++ b/tests/fixtures/map-fixture/.codebase-context/index.json @@ -0,0 +1,76 @@ +{ + "header": { "buildId": "test-build-13", "formatVersion": 4 }, + "chunks": [ + { + "id": "c1", + "content": "export interface SearchOptions {\n query: string;\n limit?: number;\n}", + "filePath": "/fixture/src/core/search.ts", + "relativePath": "src/core/search.ts", + "startLine": 1, + "endLine": 4, + "language": "typescript", + "dependencies": [], + "imports": [], + "exports": ["SearchOptions"], + "tags": [], + "metadata": { + "symbolAware": true, + "symbolName": "SearchOptions", + "symbolKind": "interface" + } + }, + { + "id": "c2", + "content": "export class CodebaseSearcher {\n private rootPath: string;\n constructor(rootPath: string) {\n this.rootPath = rootPath;\n }\n}", + "filePath": "/fixture/src/core/search.ts", + "relativePath": "src/core/search.ts", + "startLine": 10, + "endLine": 20, + "language": "typescript", + "dependencies": [], + "imports": [], + "exports": ["CodebaseSearcher"], + "tags": [], + "metadata": { + "symbolAware": true, + "symbolName": "CodebaseSearcher", + "symbolKind": "class" + } + }, + { + "id": "c3", + "content": "export type SearchResult = { chunk: CodeChunk; score: number; };", + "filePath": "/fixture/src/types.ts", + "relativePath": "src/types.ts", + "startLine": 5, + "endLine": 5, + "language": "typescript", + "dependencies": [], + "imports": [], + "exports": ["SearchResult"], + "tags": [], + "metadata": { + "symbolAware": true, + "symbolName": "SearchResult", + "symbolKind": "type" + } + }, + { + "id": "c4", + "content": "function helperUtil() {\n return 42;\n}", + "filePath": "/fixture/src/utils/helpers.ts", + "relativePath": "src/utils/helpers.ts", + "startLine": 1, + "endLine": 3, + "language": "typescript", + "dependencies": [], + "imports": [], + "exports": [], + "tags": [], + "metadata": { + "symbolAware": false, + "symbolKind": "function" + } + } + ] +} From 6aab54caba14edf2c6f6d3c3bc402907bb534c8d Mon Sep 17 00:00:00 2001 From: PatrickSys Date: Tue, 14 Apr 2026 21:03:59 +0200 Subject: [PATCH 2/2] test(map): align fixture metadata --- tests/fixtures/map-fixture/.codebase-context/index.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/fixtures/map-fixture/.codebase-context/index.json b/tests/fixtures/map-fixture/.codebase-context/index.json index f44e700..1d81dc2 100644 --- a/tests/fixtures/map-fixture/.codebase-context/index.json +++ b/tests/fixtures/map-fixture/.codebase-context/index.json @@ -1,5 +1,5 @@ { - "header": { "buildId": "test-build-13", "formatVersion": 4 }, + "header": { "buildId": "map-fixture-v1", "formatVersion": 4 }, "chunks": [ { "id": "c1", @@ -25,7 +25,7 @@ "filePath": "/fixture/src/core/search.ts", "relativePath": "src/core/search.ts", "startLine": 10, - "endLine": 20, + "endLine": 15, "language": "typescript", "dependencies": [], "imports": [],