Skip to content

Commit e6f4aa7

Browse files
author
Martin Vogel
committed
Merge origin/main into worktree-php-lsp-integration
Resolved 5 conflicts where the php-lsp branch and main both added LSP infrastructure but with different APIs: - Makefile.cbm: kept both TEST_PHP_LSP_SRCS and main's py_lsp/scope/ type_rep/stack_overflow test source variables in ALL_TEST_SRCS. - internal/cbm/cbm.c: kept both #include lsp/php_lsp.h and lsp/py_lsp.h; the per-language dispatch already supports stacking PHP after PYTHON. - internal/cbm/lsp_all.c: kept both lsp/php_lsp.c + php_stdlib_data.c AND lsp/py_lsp.c + python_stdlib_data.c in the compilation unit. - src/pipeline/pass_calls.c: took main's version entirely. find_lsp_resolution + resolve_single_call(ctx, call, lsp_calls, ...) is language-agnostic — it matches any CBMResolvedCall whose caller_qn hits the textual call's enclosing function and whose callee_qn short-name hits the textual callee. PHP LSP populates the same result->resolved_calls array via cbm_run_php_lsp, so the unified resolver handles PHP for free. Dropped the php-branch's qn_short_name + lsp_override_resolution helpers as superseded. Locked confidence floor at main's CBM_LSP_CONFIDENCE_FLOOR = 0.6f (was 0.5f on the php branch). - tests/test_main.c: kept all suite externs and RUN_SUITE invocations for php_lsp + py_lsp/py_lsp_bench/py_lsp_stress/py_lsp_scale + scope + type_rep. Auto-merged: src/pipeline/pass_parallel.c. Brings in 52 commits from main since the branch was forked at c768b61 (#207 watcher follow-up): #208 through #281, dependabot bumps, Pine Script, AUR docs, INHERITS edges, get_architecture wiring, codeql revert, the entire python-lsp subsystem. Suite: 3249 passed, 0 failed (was 2971 on main; +278 new tests from php-lsp matches the branch's claimed test count).
2 parents 50b218e + 4d9f62f commit e6f4aa7

81 files changed

Lines changed: 83143 additions & 842 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/_build.yml

Lines changed: 70 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -47,25 +47,46 @@ jobs:
4747
if: startsWith(matrix.os, 'ubuntu')
4848
run: sudo apt-get update && sudo apt-get install -y zlib1g-dev
4949

50-
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
50+
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
5151
with:
5252
node-version: "22"
5353

5454
- name: Build standard binary
55-
run: scripts/build.sh ${{ inputs.version && format('--version {0}', inputs.version) || '' }} CC=${{ matrix.cc }} CXX=${{ matrix.cxx }}
55+
env:
56+
VERSION: ${{ inputs.version }}
57+
CC: ${{ matrix.cc }}
58+
CXX: ${{ matrix.cxx }}
59+
run: |
60+
if [ -n "$VERSION" ]; then
61+
scripts/build.sh --version "$VERSION" "CC=$CC" "CXX=$CXX"
62+
else
63+
scripts/build.sh "CC=$CC" "CXX=$CXX"
64+
fi
5665
5766
- name: Ad-hoc sign macOS binary
5867
if: startsWith(matrix.os, 'macos')
5968
run: codesign --sign - --force build/c/codebase-memory-mcp
6069

6170
- name: Archive standard binary
71+
env:
72+
GOOS: ${{ matrix.goos }}
73+
GOARCH: ${{ matrix.goarch }}
6274
run: |
6375
cp LICENSE install.sh build/c/
64-
tar -czf codebase-memory-mcp-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz \
76+
tar -czf "codebase-memory-mcp-${GOOS}-${GOARCH}.tar.gz" \
6577
-C build/c codebase-memory-mcp LICENSE install.sh
6678
6779
- name: Build UI binary
68-
run: scripts/build.sh --with-ui ${{ inputs.version && format('--version {0}', inputs.version) || '' }} CC=${{ matrix.cc }} CXX=${{ matrix.cxx }}
80+
env:
81+
VERSION: ${{ inputs.version }}
82+
CC: ${{ matrix.cc }}
83+
CXX: ${{ matrix.cxx }}
84+
run: |
85+
if [ -n "$VERSION" ]; then
86+
scripts/build.sh --with-ui --version "$VERSION" "CC=$CC" "CXX=$CXX"
87+
else
88+
scripts/build.sh --with-ui "CC=$CC" "CXX=$CXX"
89+
fi
6990
7091
- name: Ad-hoc sign macOS UI binary
7192
if: startsWith(matrix.os, 'macos')
@@ -76,9 +97,12 @@ jobs:
7697
run: scripts/security-ui.sh
7798

7899
- name: Archive UI binary
100+
env:
101+
GOOS: ${{ matrix.goos }}
102+
GOARCH: ${{ matrix.goarch }}
79103
run: |
80104
cp LICENSE install.sh build/c/
81-
tar -czf codebase-memory-mcp-ui-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz \
105+
tar -czf "codebase-memory-mcp-ui-${GOOS}-${GOARCH}.tar.gz" \
82106
-C build/c codebase-memory-mcp LICENSE install.sh
83107
84108
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
@@ -92,7 +116,7 @@ jobs:
92116
steps:
93117
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
94118

95-
- uses: msys2/setup-msys2@cafece8e6baf9247cf9b1bf95097b0b983cc558d # v2
119+
- uses: msys2/setup-msys2@e9898307ac31d1a803454791be09ab9973336e1c # v2
96120
with:
97121
msystem: CLANG64
98122
path-type: inherit
@@ -102,13 +126,20 @@ jobs:
102126
make
103127
zip
104128
105-
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
129+
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
106130
with:
107131
node-version: "22"
108132

109133
- name: Build standard binary
110134
shell: msys2 {0}
111-
run: scripts/build.sh ${{ inputs.version && format('--version {0}', inputs.version) || '' }} CC=clang CXX=clang++
135+
env:
136+
VERSION: ${{ inputs.version }}
137+
run: |
138+
if [ -n "$VERSION" ]; then
139+
scripts/build.sh --version "$VERSION" CC=clang CXX=clang++
140+
else
141+
scripts/build.sh CC=clang CXX=clang++
142+
fi
112143
113144
- name: Archive standard binary
114145
shell: msys2 {0}
@@ -120,7 +151,14 @@ jobs:
120151
121152
- name: Build UI binary
122153
shell: msys2 {0}
123-
run: scripts/build.sh --with-ui ${{ inputs.version && format('--version {0}', inputs.version) || '' }} CC=clang CXX=clang++
154+
env:
155+
VERSION: ${{ inputs.version }}
156+
run: |
157+
if [ -n "$VERSION" ]; then
158+
scripts/build.sh --with-ui --version "$VERSION" CC=clang CXX=clang++
159+
else
160+
scripts/build.sh --with-ui CC=clang CXX=clang++
161+
fi
124162
125163
- name: Archive UI binary
126164
shell: msys2 {0}
@@ -154,31 +192,49 @@ jobs:
154192
- name: Install deps
155193
run: sudo apt-get update && sudo apt-get install -y zlib1g-dev
156194

157-
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
195+
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
158196
with:
159197
node-version: "22"
160198

161199
- name: Build standard binary (static)
162-
run: scripts/build.sh ${{ inputs.version && format('--version {0}', inputs.version) || '' }} CC=gcc CXX=g++ STATIC=1
200+
env:
201+
VERSION: ${{ inputs.version }}
202+
run: |
203+
if [ -n "$VERSION" ]; then
204+
scripts/build.sh --version "$VERSION" CC=gcc CXX=g++ STATIC=1
205+
else
206+
scripts/build.sh CC=gcc CXX=g++ STATIC=1
207+
fi
163208
164209
- name: Verify static linking
165210
run: |
166211
file build/c/codebase-memory-mcp
167212
ldd build/c/codebase-memory-mcp 2>&1 | grep -q "not a dynamic executable" || ldd build/c/codebase-memory-mcp 2>&1 | grep -q "statically linked"
168213
169214
- name: Archive standard binary
215+
env:
216+
ARCH: ${{ matrix.arch }}
170217
run: |
171218
cp LICENSE install.sh build/c/
172-
tar -czf codebase-memory-mcp-linux-${{ matrix.arch }}-portable.tar.gz \
219+
tar -czf "codebase-memory-mcp-linux-${ARCH}-portable.tar.gz" \
173220
-C build/c codebase-memory-mcp LICENSE install.sh
174221
175222
- name: Build UI binary (static)
176-
run: scripts/build.sh --with-ui ${{ inputs.version && format('--version {0}', inputs.version) || '' }} CC=gcc CXX=g++ STATIC=1
223+
env:
224+
VERSION: ${{ inputs.version }}
225+
run: |
226+
if [ -n "$VERSION" ]; then
227+
scripts/build.sh --with-ui --version "$VERSION" CC=gcc CXX=g++ STATIC=1
228+
else
229+
scripts/build.sh --with-ui CC=gcc CXX=g++ STATIC=1
230+
fi
177231
178232
- name: Archive UI binary
233+
env:
234+
ARCH: ${{ matrix.arch }}
179235
run: |
180236
cp LICENSE install.sh build/c/
181-
tar -czf codebase-memory-mcp-ui-linux-${{ matrix.arch }}-portable.tar.gz \
237+
tar -czf "codebase-memory-mcp-ui-linux-${ARCH}-portable.tar.gz" \
182238
-C build/c codebase-memory-mcp LICENSE install.sh
183239
184240
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1

.github/workflows/_lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
sudo apt-get update
2626
sudo apt-get install -y clang-format-20
2727
28-
- uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
28+
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
2929
id: cppcheck-cache
3030
with:
3131
path: /opt/cppcheck

.github/workflows/_smoke.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ jobs:
107107
steps:
108108
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
109109

110-
- uses: msys2/setup-msys2@cafece8e6baf9247cf9b1bf95097b0b983cc558d # v2
110+
- uses: msys2/setup-msys2@e9898307ac31d1a803454791be09ab9973336e1c # v2
111111
with:
112112
msystem: CLANG64
113113
path-type: inherit

.github/workflows/_soak.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
timeout-minutes: 30
7171
steps:
7272
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
73-
- uses: msys2/setup-msys2@cafece8e6baf9247cf9b1bf95097b0b983cc558d # v2
73+
- uses: msys2/setup-msys2@e9898307ac31d1a803454791be09ab9973336e1c # v2
7474
with:
7575
msystem: CLANG64
7676
path-type: inherit
@@ -153,7 +153,7 @@ jobs:
153153
timeout-minutes: 45
154154
steps:
155155
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
156-
- uses: msys2/setup-msys2@cafece8e6baf9247cf9b1bf95097b0b983cc558d # v2
156+
- uses: msys2/setup-msys2@e9898307ac31d1a803454791be09ab9973336e1c # v2
157157
with:
158158
msystem: CLANG64
159159
path-type: inherit

.github/workflows/_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
steps:
5151
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5252

53-
- uses: msys2/setup-msys2@cafece8e6baf9247cf9b1bf95097b0b983cc558d # v2
53+
- uses: msys2/setup-msys2@e9898307ac31d1a803454791be09ab9973336e1c # v2
5454
with:
5555
msystem: CLANG64
5656
path-type: inherit

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
run: sudo apt-get update && sudo apt-get install -y zlib1g-dev
1919

2020
- name: Initialize CodeQL
21-
uses: github/codeql-action/init@c10b8064de6f491fea524254123dbe5e09572f13 # v4
21+
uses: github/codeql-action/init@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
2222
with:
2323
languages: c-cpp
2424
build-mode: manual
@@ -27,6 +27,6 @@ jobs:
2727
run: scripts/build.sh
2828

2929
- name: Perform CodeQL Analysis
30-
uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v4
30+
uses: github/codeql-action/analyze@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
3131
with:
3232
category: "/language:c-cpp"

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ jobs:
152152
git tag -f "$VERSION"
153153
git push origin "$VERSION" --force
154154
155-
- uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2
155+
- uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v2
156156
with:
157157
tag_name: ${{ inputs.version }}
158158
draft: true
@@ -275,7 +275,7 @@ jobs:
275275

276276
# ── npm ──────────────────────────────────────────────────
277277
- name: Setup Node
278-
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v6.4.0
278+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
279279
with:
280280
node-version: '22'
281281
registry-url: 'https://registry.npmjs.org'

.github/workflows/scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ jobs:
2727
publish_results: true
2828

2929
- name: Upload SARIF results
30-
uses: github/codeql-action/upload-sarif@c10b8064de6f491fea524254123dbe5e09572f13 # v4
30+
uses: github/codeql-action/upload-sarif@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
3131
with:
3232
sarif_file: results.sarif

Makefile.cbm

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ GRAPH_BUFFER_SRCS = src/graph_buffer/graph_buffer.c
171171
# Pipeline module (new)
172172
PIPELINE_SRCS = \
173173
src/pipeline/fqn.c \
174+
src/pipeline/path_alias.c \
174175
src/pipeline/registry.c \
175176
src/pipeline/pipeline.c \
176177
src/pipeline/pipeline_incremental.c \
@@ -295,7 +296,7 @@ TEST_DISCOVER_SRCS = \
295296

296297
TEST_GRAPH_BUFFER_SRCS = tests/test_graph_buffer.c
297298

298-
TEST_PIPELINE_SRCS = tests/test_registry.c tests/test_pipeline.c tests/test_fqn.c tests/test_configlink.c tests/test_infrascan.c tests/test_worker_pool.c tests/test_parallel.c
299+
TEST_PIPELINE_SRCS = tests/test_registry.c tests/test_pipeline.c tests/test_fqn.c tests/test_path_alias.c tests/test_configlink.c tests/test_infrascan.c tests/test_worker_pool.c tests/test_parallel.c
299300

300301
TEST_WATCHER_SRCS = tests/test_watcher.c
301302

@@ -311,6 +312,18 @@ TEST_C_LSP_SRCS = tests/test_c_lsp.c
311312

312313
TEST_PHP_LSP_SRCS = tests/test_php_lsp.c
313314

315+
TEST_SCOPE_SRCS = tests/test_scope.c
316+
317+
TEST_TYPE_REP_SRCS = tests/test_type_rep.c
318+
319+
TEST_PY_LSP_SRCS = tests/test_py_lsp.c
320+
321+
TEST_PY_LSP_BENCH_SRCS = tests/test_py_lsp_bench.c
322+
323+
TEST_PY_LSP_STRESS_SRCS = tests/test_py_lsp_stress.c
324+
325+
TEST_PY_LSP_SCALE_SRCS = tests/test_py_lsp_scale.c
326+
314327
TEST_INTEGRATION_SRCS = tests/test_integration.c tests/test_incremental.c
315328

316329
TEST_TRACES_SRCS = tests/test_traces.c
@@ -328,7 +341,9 @@ TEST_YAML_SRCS = tests/test_yaml.c
328341

329342
TEST_SIMHASH_SRCS = tests/test_simhash.c
330343

331-
ALL_TEST_SRCS = $(TEST_FOUNDATION_SRCS) $(TEST_EXTRACTION_SRCS) $(TEST_STORE_SRCS) $(TEST_CYPHER_SRCS) $(TEST_MCP_SRCS) $(TEST_DISCOVER_SRCS) $(TEST_GRAPH_BUFFER_SRCS) $(TEST_PIPELINE_SRCS) $(TEST_WATCHER_SRCS) $(TEST_LZ4_SRCS) $(TEST_ZSTD_SRCS) $(TEST_ARTIFACT_SRCS) $(TEST_SQLITE_WRITER_SRCS) $(TEST_GO_LSP_SRCS) $(TEST_C_LSP_SRCS) $(TEST_PHP_LSP_SRCS) $(TEST_TRACES_SRCS) $(TEST_CLI_SRCS) $(TEST_MEM_SRCS) $(TEST_UI_SRCS) $(TEST_SECURITY_SRCS) $(TEST_YAML_SRCS) $(TEST_SIMHASH_SRCS) $(TEST_INTEGRATION_SRCS)
344+
TEST_STACK_OVERFLOW_SRCS = tests/test_stack_overflow.c
345+
346+
ALL_TEST_SRCS = $(TEST_FOUNDATION_SRCS) $(TEST_EXTRACTION_SRCS) $(TEST_STORE_SRCS) $(TEST_CYPHER_SRCS) $(TEST_MCP_SRCS) $(TEST_DISCOVER_SRCS) $(TEST_GRAPH_BUFFER_SRCS) $(TEST_PIPELINE_SRCS) $(TEST_WATCHER_SRCS) $(TEST_LZ4_SRCS) $(TEST_ZSTD_SRCS) $(TEST_ARTIFACT_SRCS) $(TEST_SQLITE_WRITER_SRCS) $(TEST_GO_LSP_SRCS) $(TEST_C_LSP_SRCS) $(TEST_PHP_LSP_SRCS) $(TEST_SCOPE_SRCS) $(TEST_TYPE_REP_SRCS) $(TEST_PY_LSP_SRCS) $(TEST_PY_LSP_BENCH_SRCS) $(TEST_PY_LSP_STRESS_SRCS) $(TEST_PY_LSP_SCALE_SRCS) $(TEST_TRACES_SRCS) $(TEST_CLI_SRCS) $(TEST_MEM_SRCS) $(TEST_UI_SRCS) $(TEST_SECURITY_SRCS) $(TEST_YAML_SRCS) $(TEST_SIMHASH_SRCS) $(TEST_STACK_OVERFLOW_SRCS) $(TEST_INTEGRATION_SRCS)
332347

333348

334349
# ── Build directories ────────────────────────────────────────────

0 commit comments

Comments
 (0)