Skip to content

Commit 03b4e6a

Browse files
authored
Merge branch 'main' into feature/opencode-parity
2 parents 7116a76 + 2469ecc commit 03b4e6a

334 files changed

Lines changed: 836795 additions & 3507 deletions

File tree

Some content is hidden

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

‎.github/CODEOWNERS‎

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Binding ownership policy for codebase-memory-mcp.
2+
#
3+
# This repository is user-owned, so ownership is expressed with individual
4+
# GitHub handles rather than organization teams.
5+
#
6+
# CODEOWNERS is the binding merge gate, not the reviewer directory.
7+
# Advisory area reviewers are recorded in MAINTAINERS.md. A handle appears in
8+
# this file only when that person is authorized to satisfy binding code-owner
9+
# approval for the matching path.
10+
11+
# Default owner gate: every pull request crosses the project owner's desk.
12+
* @DeusData
13+
14+
# Security-sensitive and authority-sensitive surfaces.
15+
/.github/ @DeusData
16+
/scripts/ @DeusData
17+
/Makefile.cbm @DeusData
18+
/SECURITY.md @DeusData
19+
/docs/SECURITY-DISCLOSURE.md @DeusData
20+
/CONTRIBUTING.md @DeusData
21+
/CODE_OF_CONDUCT.md @DeusData
22+
/DCO @DeusData
23+
/LICENSE @DeusData
24+
/MAINTAINERS.md @DeusData
25+
26+
# Release and distribution surfaces.
27+
/pkg/ @DeusData
28+
/install.sh @DeusData
29+
/install.ps1 @DeusData
30+
/server.json @DeusData
31+
/glama.json @DeusData
32+
/flake.nix @DeusData
33+
/flake.lock @DeusData
34+
/THIRD_PARTY.md @DeusData
35+
/vendored/ @DeusData
36+
/internal/cbm/vendored/ @DeusData
37+
38+
# Core product surfaces.
39+
/src/foundation/ @DeusData
40+
/src/store/ @DeusData
41+
/src/cypher/ @DeusData
42+
/src/graph_buffer/ @DeusData
43+
/src/mcp/ @DeusData
44+
/src/cli/ @DeusData
45+
/src/discover/ @DeusData
46+
/src/watcher/ @DeusData
47+
/src/pipeline/ @DeusData
48+
/src/git/ @DeusData
49+
/src/semantic/ @DeusData
50+
/src/simhash/ @DeusData
51+
/src/traces/ @DeusData
52+
/src/ui/ @DeusData
53+
54+
# Extraction, language support, and graph UI.
55+
/internal/cbm/ @DeusData
56+
/tools/ @DeusData
57+
/graph-ui/ @DeusData
58+
59+
# Test and reproduction infrastructure.
60+
/tests/ @DeusData
61+
/test-infrastructure/ @DeusData

‎.github/ISSUE_TEMPLATE/bug_report.yml‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,21 @@ body:
103103
Please check for private paths/strings before pasting.
104104
render: text
105105

106+
- type: textarea
107+
id: diagnostics
108+
attributes:
109+
label: Diagnostics trajectory (memory / performance / leak issues)
110+
description: |
111+
We collect **no telemetry**, so for a memory or performance problem we
112+
need the diagnostics trajectory from your machine. Set
113+
`CBM_DIAGNOSTICS=1`, reproduce the issue, then attach (or paste) the file
114+
`cbm-diagnostics-<pid>.ndjson` from your temp dir (`$TMPDIR` / `/tmp`, or
115+
`%TEMP%` on Windows). It records only resource counters (rss, committed,
116+
fds, query counts) over time — no code or queries. See the README
117+
"Troubleshooting & Diagnostics" section. Pasting an agent's summary of
118+
the trajectory is also fine.
119+
render: text
120+
106121
- type: input
107122
id: scale
108123
attributes:

‎.github/issue-labeler.yml‎

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1-
# Config for github/issue-labeler (.github/workflows/issue-labeler.yml).
2-
# Non-versioned format: one regex per label, matched against title + body.
1+
# Config for the Issue area labeler (.github/workflows/issue-labeler.yml).
2+
# FORMAT (parsed line-wise by the workflow): one rule per line, exactly
3+
# "label": 'regex'
4+
# Patterns are compiled as JavaScript RegExp with the `i` flag applied by
5+
# the workflow — do NOT use PCRE-only syntax like inline `(?i)` groups
6+
# (that broke every run, #764). Matched against issue title + body.
37
# Additive only — these never remove a maintainer's manual label.
48

5-
"windows": '(?i)\b(windows|win\s?1[01]|powershell|\.ps1|mapped drive|smb share|unc path)\b'
9+
"windows": '\b(windows|win\s?1[01]|powershell|\.ps1|mapped drive|smb share|unc path)\b'
610

7-
"stability/performance": '(?i)(out of memory|\boom\b|memory leak|segfault|sigsegv|sigbus|crash(es|ed|ing)?|core dumped|\bhang(s|ing)?\b|deadlock|freezes?|time(s)?\s?out|timeout|never finishes|cgroup)'
11+
"stability/performance": '(out of memory|\boom\b|memory leak|segfault|sigsegv|sigbus|crash(es|ed|ing)?|core dumped|\bhang(s|ing)?\b|deadlock|freezes?|time(s)?\s?out|timeout|never finishes|cgroup)'
812

9-
"parsing/quality": '(?i)(trace_path|query_graph|search_graph|calls? edge|missing (edges|nodes)|false positive|zero edges|0 edges|module node|not indexed|extraction|wrong (node|label))'
13+
"parsing/quality": '(trace_path|query_graph|search_graph|calls? edge|missing (edges|nodes)|false positive|zero edges|0 edges|module node|not indexed|extraction|wrong (node|label))'
1014

11-
"editor/integration": '(?i)(cursor|vscode|vs code|opencode|codex|claude code|gemini cli|antigravity|mcp client|\.mcp\.json|installer)'
15+
"editor/integration": '(cursor|vscode|vs code|opencode|codex|claude code|gemini cli|antigravity|mcp client|\.mcp\.json|installer)'
1216

13-
"ux/behavior": '(?i)(web ui|\bui\b|dashboard|3d graph|visuali[sz]ation|watcher|project name|frontend)'
17+
"ux/behavior": '(web ui|\bui\b|dashboard|3d graph|visuali[sz]ation|watcher|project name|frontend)'
1418

15-
"cypher": '(?i)\bcypher\b'
19+
"cypher": '\bcypher\b'
1620

17-
"language-request": '(?i)(language support|hybrid lsp|new language support|support for \w+ language)'
21+
"language-request": '(language support|hybrid lsp|new language support|support for \w+ language)'

‎.github/workflows/_build.yml‎

Lines changed: 129 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,15 @@ on:
88
description: 'Version string (e.g. v0.8.0)'
99
type: string
1010
default: ''
11+
attest:
12+
description: 'Generate build provenance attestations for release artifacts'
13+
type: boolean
14+
default: false
1115

1216
permissions:
1317
contents: read
18+
id-token: write
19+
attestations: write
1420

1521
jobs:
1622
build-unix:
@@ -45,9 +51,9 @@ jobs:
4551
# release with no Intel macOS binary (a user-reported gap). macos-15-intel
4652
# is GitHub's supported Intel image through Aug 2027 (the last x86_64 macOS
4753
# runner); revisit the Intel leg before that retirement.
48-
timeout-minutes: 25
54+
timeout-minutes: 240
4955
steps:
50-
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
56+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
5157

5258
- name: Install deps (Ubuntu)
5359
if: startsWith(matrix.os, 'ubuntu')
@@ -83,6 +89,12 @@ jobs:
8389
tar -czf "codebase-memory-mcp-${GOOS}-${GOARCH}.tar.gz" \
8490
-C build/c codebase-memory-mcp LICENSE install.sh THIRD_PARTY_NOTICES.md
8591
92+
- name: Attest standard binary provenance
93+
if: ${{ inputs.attest }}
94+
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
95+
with:
96+
subject-path: codebase-memory-mcp-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz
97+
8698
- name: Build UI binary
8799
env:
88100
VERSION: ${{ inputs.version }}
@@ -113,16 +125,22 @@ jobs:
113125
tar -czf "codebase-memory-mcp-ui-${GOOS}-${GOARCH}.tar.gz" \
114126
-C build/c codebase-memory-mcp LICENSE install.sh THIRD_PARTY_NOTICES.md
115127
128+
- name: Attest UI binary provenance
129+
if: ${{ inputs.attest }}
130+
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
131+
with:
132+
subject-path: codebase-memory-mcp-ui-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz
133+
116134
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
117135
with:
118136
name: binaries-${{ matrix.goos }}-${{ matrix.goarch }}
119137
path: "*.tar.gz"
120138

121139
build-windows:
122140
runs-on: windows-latest
123-
timeout-minutes: 25
141+
timeout-minutes: 240
124142
steps:
125-
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
143+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
126144

127145
- uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2
128146
with:
@@ -158,6 +176,12 @@ jobs:
158176
scripts/gen-third-party-notices.sh THIRD_PARTY_NOTICES.md
159177
zip codebase-memory-mcp-windows-amd64.zip codebase-memory-mcp.exe LICENSE install.ps1 THIRD_PARTY_NOTICES.md
160178
179+
- name: Attest standard binary provenance
180+
if: ${{ inputs.attest }}
181+
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
182+
with:
183+
subject-path: codebase-memory-mcp-windows-amd64.zip
184+
161185
- name: Build UI binary
162186
shell: msys2 {0}
163187
env:
@@ -178,11 +202,98 @@ jobs:
178202
scripts/gen-third-party-notices.sh THIRD_PARTY_NOTICES.md
179203
zip codebase-memory-mcp-ui-windows-amd64.zip codebase-memory-mcp.exe LICENSE install.ps1 THIRD_PARTY_NOTICES.md
180204
205+
- name: Attest UI binary provenance
206+
if: ${{ inputs.attest }}
207+
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
208+
with:
209+
subject-path: codebase-memory-mcp-ui-windows-amd64.zip
210+
181211
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
182212
with:
183213
name: binaries-windows-amd64
184214
path: "*.zip"
185215

216+
build-windows-arm64:
217+
# Native ARM64 Windows binary via the CLANGARM64 toolchain on the
218+
# windows-11-arm runner (the same toolchain the test suite already
219+
# exercises). Without it, ARM-Windows users fall back to the x86_64
220+
# binary under emulation, and npm/pip on native-ARM Node/Python 404.
221+
runs-on: windows-11-arm
222+
timeout-minutes: 240
223+
steps:
224+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
225+
226+
- uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2
227+
with:
228+
msystem: CLANGARM64
229+
path-type: inherit
230+
install: >-
231+
mingw-w64-clang-aarch64-clang
232+
mingw-w64-clang-aarch64-zlib
233+
make
234+
zip
235+
236+
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
237+
with:
238+
node-version: "22"
239+
240+
- name: Build standard binary
241+
shell: msys2 {0}
242+
env:
243+
VERSION: ${{ inputs.version }}
244+
run: |
245+
if [ -n "$VERSION" ]; then
246+
scripts/build.sh --version "$VERSION" CC=clang CXX=clang++
247+
else
248+
scripts/build.sh CC=clang CXX=clang++
249+
fi
250+
251+
- name: Archive standard binary
252+
shell: msys2 {0}
253+
run: |
254+
BIN=build/c/codebase-memory-mcp
255+
[ -f "${BIN}.exe" ] && BIN="${BIN}.exe"
256+
cp "$BIN" codebase-memory-mcp.exe
257+
scripts/gen-third-party-notices.sh THIRD_PARTY_NOTICES.md
258+
zip codebase-memory-mcp-windows-arm64.zip codebase-memory-mcp.exe LICENSE install.ps1 THIRD_PARTY_NOTICES.md
259+
260+
- name: Attest standard binary provenance
261+
if: ${{ inputs.attest }}
262+
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
263+
with:
264+
subject-path: codebase-memory-mcp-windows-arm64.zip
265+
266+
- name: Build UI binary
267+
shell: msys2 {0}
268+
env:
269+
VERSION: ${{ inputs.version }}
270+
run: |
271+
if [ -n "$VERSION" ]; then
272+
scripts/build.sh --with-ui --version "$VERSION" CC=clang CXX=clang++
273+
else
274+
scripts/build.sh --with-ui CC=clang CXX=clang++
275+
fi
276+
277+
- name: Archive UI binary
278+
shell: msys2 {0}
279+
run: |
280+
BIN=build/c/codebase-memory-mcp
281+
[ -f "${BIN}.exe" ] && BIN="${BIN}.exe"
282+
cp "$BIN" codebase-memory-mcp.exe
283+
scripts/gen-third-party-notices.sh THIRD_PARTY_NOTICES.md
284+
zip codebase-memory-mcp-ui-windows-arm64.zip codebase-memory-mcp.exe LICENSE install.ps1 THIRD_PARTY_NOTICES.md
285+
286+
- name: Attest UI binary provenance
287+
if: ${{ inputs.attest }}
288+
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
289+
with:
290+
subject-path: codebase-memory-mcp-ui-windows-arm64.zip
291+
292+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
293+
with:
294+
name: binaries-windows-arm64
295+
path: "*.zip"
296+
186297
build-linux-portable:
187298
# Fully static Linux binaries (gcc -static on Ubuntu).
188299
# Runs on any Linux distro without shared library dependencies.
@@ -195,9 +306,9 @@ jobs:
195306
- arch: arm64
196307
runner: ubuntu-24.04-arm
197308
runs-on: ${{ matrix.runner }}
198-
timeout-minutes: 25
309+
timeout-minutes: 240
199310
steps:
200-
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
311+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
201312

202313
- name: Install deps
203314
run: sudo apt-get update && sudo apt-get install -y zlib1g-dev
@@ -230,6 +341,12 @@ jobs:
230341
tar -czf "codebase-memory-mcp-linux-${ARCH}-portable.tar.gz" \
231342
-C build/c codebase-memory-mcp LICENSE install.sh THIRD_PARTY_NOTICES.md
232343
344+
- name: Attest standard binary provenance
345+
if: ${{ inputs.attest }}
346+
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
347+
with:
348+
subject-path: codebase-memory-mcp-linux-${{ matrix.arch }}-portable.tar.gz
349+
233350
- name: Build UI binary (static)
234351
env:
235352
VERSION: ${{ inputs.version }}
@@ -249,6 +366,12 @@ jobs:
249366
tar -czf "codebase-memory-mcp-ui-linux-${ARCH}-portable.tar.gz" \
250367
-C build/c codebase-memory-mcp LICENSE install.sh THIRD_PARTY_NOTICES.md
251368
369+
- name: Attest UI binary provenance
370+
if: ${{ inputs.attest }}
371+
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
372+
with:
373+
subject-path: codebase-memory-mcp-ui-linux-${{ matrix.arch }}-portable.tar.gz
374+
252375
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
253376
with:
254377
name: binaries-linux-${{ matrix.arch }}-portable

‎.github/workflows/_lint.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
timeout-minutes: 15
1515
steps:
16-
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
16+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
1717

1818
# Tests must pass or fail — no SKIPs except genuinely platform-specific
1919
# ones (SKIP_PLATFORM / #ifdef). Fails the lint phase on any plain SKIP().
@@ -30,7 +30,7 @@ jobs:
3030
sudo apt-get update
3131
sudo apt-get install -y clang-format-20
3232
33-
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
33+
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
3434
id: cppcheck-cache
3535
with:
3636
path: /opt/cppcheck

‎.github/workflows/_security.yml‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
timeout-minutes: 5
1616
steps:
17-
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
17+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
1818
- name: "Layer 1: Static allow-list audit"
1919
run: scripts/security-audit.sh
2020
- name: "Layer 6: UI security audit"
@@ -24,9 +24,9 @@ jobs:
2424

2525
license-gate:
2626
runs-on: ubuntu-latest
27-
timeout-minutes: 30
27+
timeout-minutes: 240
2828
steps:
29-
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
29+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
3030
- name: Install ScanCode Toolkit
3131
run: pipx install scancode-toolkit
3232
- name: "Gate self-test (a planted violation must be detected)"
@@ -40,7 +40,7 @@ jobs:
4040

4141
codeql-gate:
4242
runs-on: ubuntu-latest
43-
timeout-minutes: 50
43+
timeout-minutes: 240
4444
steps:
4545
- name: Wait for CodeQL on current commit (max 45 min)
4646
env:
@@ -51,8 +51,8 @@ jobs:
5151
CURRENT_SHA="${{ github.event.pull_request.head.sha || github.sha }}"
5252
echo "Waiting for CodeQL to complete on $CURRENT_SHA..."
5353
for attempt in $(seq 1 90); do
54-
LATEST=$(gh api repos/${{ github.repository }}/actions/workflows/codeql.yml/runs?per_page=5 \
55-
--jq '.workflow_runs[] | select(.head_sha == "'"$CURRENT_SHA"'") | "\(.conclusion) \(.status)"' 2>/dev/null | head -1 || echo "")
54+
LATEST=$(gh api "repos/${{ github.repository }}/actions/workflows/codeql.yml/runs?head_sha=$CURRENT_SHA&per_page=1" \
55+
--jq '.workflow_runs[] | "\(.conclusion) \(.status)"' 2>/dev/null | head -1 || echo "")
5656
if [ -z "$LATEST" ]; then
5757
echo " $attempt/90: no run yet..."; sleep 30; continue
5858
fi

0 commit comments

Comments
 (0)