Skip to content

Commit eaa3515

Browse files
authored
Merge branch 'main' into main
2 parents c289cd6 + b1a646e commit eaa3515

163 files changed

Lines changed: 29458 additions & 793 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/workflows/_build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
# release with no Intel macOS binary (a user-reported gap). macos-15-intel
4646
# is GitHub's supported Intel image through Aug 2027 (the last x86_64 macOS
4747
# runner); revisit the Intel leg before that retirement.
48-
timeout-minutes: 25
48+
timeout-minutes: 240
4949
steps:
5050
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
5151

@@ -120,7 +120,7 @@ jobs:
120120

121121
build-windows:
122122
runs-on: windows-latest
123-
timeout-minutes: 25
123+
timeout-minutes: 240
124124
steps:
125125
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
126126

@@ -195,7 +195,7 @@ jobs:
195195
- arch: arm64
196196
runner: ubuntu-24.04-arm
197197
runs-on: ${{ matrix.runner }}
198-
timeout-minutes: 25
198+
timeout-minutes: 240
199199
steps:
200200
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
201201

.github/workflows/_security.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424

2525
license-gate:
2626
runs-on: ubuntu-latest
27-
timeout-minutes: 30
27+
timeout-minutes: 240
2828
steps:
2929
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
3030
- name: Install ScanCode Toolkit
@@ -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:

.github/workflows/_smoke.yml

Lines changed: 73 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,81 @@
22
name: Smoke
33

44
on:
5-
workflow_call: {}
5+
workflow_call:
6+
inputs:
7+
broad_platforms:
8+
description: 'Smoke the shipped binaries on the broad platform matrix (extra OS versions) instead of the core set'
9+
type: boolean
10+
default: false
611

712
permissions:
813
contents: read
914

1015
jobs:
16+
# Emit the platform matrices as JSON. The CORE set is the default (fast,
17+
# unchanged); the BROAD set adds extra free runners (additional OS versions)
18+
# that download the SAME shipped artifact for their goos/goarch and verify it
19+
# runs on a wider range of OS versions. No new artifacts are built — broad
20+
# legs reuse the exact binaries produced by _build.yml.
21+
setup-matrix:
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 5
24+
outputs:
25+
unix: ${{ steps.set.outputs.unix }}
26+
windows: ${{ steps.set.outputs.windows }}
27+
portable: ${{ steps.set.outputs.portable }}
28+
steps:
29+
- name: Compute matrices
30+
id: set
31+
env:
32+
BROAD: ${{ inputs.broad_platforms }}
33+
run: |
34+
CORE_UNIX='[
35+
{"os":"ubuntu-latest","goos":"linux","goarch":"amd64"},
36+
{"os":"ubuntu-24.04-arm","goos":"linux","goarch":"arm64"},
37+
{"os":"macos-14","goos":"darwin","goarch":"arm64"},
38+
{"os":"macos-15-intel","goos":"darwin","goarch":"amd64"}
39+
]'
40+
# Broad legs reuse existing goos/goarch artifacts on newer/older OS
41+
# versions (e.g. ubuntu-22.04 = older glibc) to widen the run-anywhere
42+
# signal without building new targets.
43+
BROAD_UNIX='[
44+
{"os":"ubuntu-22.04","goos":"linux","goarch":"amd64","optional":true},
45+
{"os":"ubuntu-22.04-arm","goos":"linux","goarch":"arm64","optional":true},
46+
{"os":"macos-15","goos":"darwin","goarch":"arm64","optional":true}
47+
]'
48+
CORE_WIN='[{"os":"windows-latest"}]'
49+
# windows-11-arm runs the shipped x86_64 binary under emulation —
50+
# verifies the Windows artifact still launches on ARM hardware.
51+
BROAD_WIN='[{"os":"windows-2025","optional":true},{"os":"windows-11-arm","optional":true}]'
52+
CORE_PORTABLE='[
53+
{"arch":"amd64","runner":"ubuntu-latest"},
54+
{"arch":"arm64","runner":"ubuntu-24.04-arm"}
55+
]'
56+
BROAD_PORTABLE='[
57+
{"arch":"amd64","runner":"ubuntu-22.04","optional":true},
58+
{"arch":"arm64","runner":"ubuntu-22.04-arm","optional":true}
59+
]'
60+
if [ "$BROAD" = "true" ]; then
61+
UNIX=$(jq -cn --argjson a "$CORE_UNIX" --argjson b "$BROAD_UNIX" '$a + $b')
62+
WIN=$(jq -cn --argjson a "$CORE_WIN" --argjson b "$BROAD_WIN" '$a + $b')
63+
PORTABLE=$(jq -cn --argjson a "$CORE_PORTABLE" --argjson b "$BROAD_PORTABLE" '$a + $b')
64+
else
65+
UNIX=$(jq -cn --argjson a "$CORE_UNIX" '$a')
66+
WIN=$(jq -cn --argjson a "$CORE_WIN" '$a')
67+
PORTABLE=$(jq -cn --argjson a "$CORE_PORTABLE" '$a')
68+
fi
69+
echo "unix={\"variant\":[\"standard\",\"ui\"],\"include\":$UNIX}" >> "$GITHUB_OUTPUT"
70+
echo "windows={\"variant\":[\"standard\",\"ui\"],\"include\":$WIN}" >> "$GITHUB_OUTPUT"
71+
echo "portable={\"variant\":[\"standard\",\"ui\"],\"include\":$PORTABLE}" >> "$GITHUB_OUTPUT"
72+
1173
smoke-unix:
74+
needs: setup-matrix
1275
strategy:
1376
fail-fast: false
14-
matrix:
15-
include:
16-
- os: ubuntu-latest
17-
goos: linux
18-
goarch: amd64
19-
- os: ubuntu-24.04-arm
20-
goos: linux
21-
goarch: arm64
22-
- os: macos-14
23-
goos: darwin
24-
goarch: arm64
25-
- os: macos-15-intel
26-
goos: darwin
27-
goarch: amd64
28-
variant: [standard, ui]
77+
matrix: ${{ fromJSON(needs.setup-matrix.outputs.unix) }}
2978
runs-on: ${{ matrix.os }}
79+
continue-on-error: ${{ matrix.optional == true }}
3080
timeout-minutes: 15
3181
steps:
3282
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
@@ -98,11 +148,12 @@ jobs:
98148
clamscan --no-summary ./codebase-memory-mcp
99149
100150
smoke-windows:
151+
needs: setup-matrix
101152
strategy:
102153
fail-fast: false
103-
matrix:
104-
variant: [standard, ui]
105-
runs-on: windows-latest
154+
matrix: ${{ fromJSON(needs.setup-matrix.outputs.windows) }}
155+
runs-on: ${{ matrix.os }}
156+
continue-on-error: ${{ matrix.optional == true }}
106157
timeout-minutes: 15
107158
steps:
108159
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
@@ -164,16 +215,12 @@ jobs:
164215
Write-Host "=== Windows Defender: clean ==="
165216
166217
smoke-linux-portable:
218+
needs: setup-matrix
167219
strategy:
168220
fail-fast: false
169-
matrix:
170-
include:
171-
- arch: amd64
172-
runner: ubuntu-latest
173-
- arch: arm64
174-
runner: ubuntu-24.04-arm
175-
variant: [standard, ui]
221+
matrix: ${{ fromJSON(needs.setup-matrix.outputs.portable) }}
176222
runs-on: ${{ matrix.runner }}
223+
continue-on-error: ${{ matrix.optional == true }}
177224
timeout-minutes: 15
178225
steps:
179226
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3

.github/workflows/_soak.yml

Lines changed: 51 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@ jobs:
4747
cc: cc
4848
cxx: c++
4949
runs-on: ${{ matrix.os }}
50-
timeout-minutes: 30
50+
# BUG FIX: this was hard-coded to 30, but the caller (nightly-soak.yml)
51+
# passes duration_minutes: 240. GitHub killed the job at 30 min, so the
52+
# "4h nightly soak" was SILENTLY TRUNCATED to 30 min and never once ran
53+
# multi-hour. Budget must always exceed the passed duration; 300 covers
54+
# the 240-min nightly with headroom (build + analysis + idle phases).
55+
timeout-minutes: 300
5156
steps:
5257
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
5358
- name: Install deps (Linux)
@@ -57,17 +62,34 @@ jobs:
5762
run: scripts/build.sh ${{ inputs.version && format('--version {0}', inputs.version) || '' }} CC=${{ matrix.cc }} CXX=${{ matrix.cxx }}
5863
- name: Soak (${{ inputs.duration_minutes }} min)
5964
run: scripts/soak-test.sh build/c/codebase-memory-mcp ${{ inputs.duration_minutes }}
65+
# #581 guard: read-only soak (never reindex/mutate) so any memory growth is
66+
# a query-path leak, not WAL/indexing. Reuses the build above.
67+
- name: Query-leak soak (#581, read-only)
68+
env:
69+
CBM_SOAK_MODE: query-leak
70+
RESULTS_DIR: soak-results-query-leak
71+
run: scripts/soak-test.sh build/c/codebase-memory-mcp ${{ inputs.duration_minutes }} --skip-crash-test
6072
- name: Upload metrics
6173
if: always()
6274
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
6375
with:
6476
name: soak-quick-${{ matrix.goos }}-${{ matrix.goarch }}
6577
path: soak-results/
6678
retention-days: 14
79+
- name: Upload query-leak metrics
80+
if: always()
81+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
82+
with:
83+
name: soak-query-leak-${{ matrix.goos }}-${{ matrix.goarch }}
84+
path: soak-results-query-leak/
85+
retention-days: 14
6786

6887
soak-quick-windows:
6988
runs-on: windows-latest
70-
timeout-minutes: 30
89+
# BUG FIX (same 30→240 mismatch as soak-quick above): the caller passes
90+
# duration_minutes: 240, so a 30-min cap truncated the nightly soak here
91+
# too. 300 covers the 240-min nightly with headroom.
92+
timeout-minutes: 300
7193
steps:
7294
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
7395
- uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2
@@ -90,13 +112,30 @@ jobs:
90112
BIN=build/c/codebase-memory-mcp
91113
[ -f "${BIN}.exe" ] && BIN="${BIN}.exe"
92114
scripts/soak-test.sh "$BIN" ${{ inputs.duration_minutes }}
115+
# #581 guard on Windows — the platform the bug is reported on.
116+
- name: Query-leak soak (#581, read-only)
117+
shell: msys2 {0}
118+
env:
119+
CBM_SOAK_MODE: query-leak
120+
RESULTS_DIR: soak-results-query-leak
121+
run: |
122+
BIN=build/c/codebase-memory-mcp
123+
[ -f "${BIN}.exe" ] && BIN="${BIN}.exe"
124+
scripts/soak-test.sh "$BIN" ${{ inputs.duration_minutes }} --skip-crash-test
93125
- name: Upload metrics
94126
if: always()
95127
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
96128
with:
97129
name: soak-quick-windows-amd64
98130
path: soak-results/
99131
retention-days: 14
132+
- name: Upload query-leak metrics
133+
if: always()
134+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
135+
with:
136+
name: soak-query-leak-windows-amd64
137+
path: soak-results-query-leak/
138+
retention-days: 14
100139

101140
soak-asan:
102141
if: ${{ inputs.run_asan }}
@@ -125,7 +164,12 @@ jobs:
125164
cc: cc
126165
cxx: c++
127166
runs-on: ${{ matrix.os }}
128-
timeout-minutes: 45
167+
# ASan soak runs a FIXED 15-min soak (hard-coded below, NOT driven by
168+
# inputs.duration_minutes), but the ASan-instrumented build is slow and
169+
# leak reporting adds teardown time. 60 keeps the budget comfortably above
170+
# the 15-min run so it is never truncated. (Same class of bug as the
171+
# soak-quick 30→240 mismatch above — keep the timeout above the run length.)
172+
timeout-minutes: 240
129173
steps:
130174
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
131175
- name: Install deps (Linux)
@@ -150,7 +194,10 @@ jobs:
150194
soak-asan-windows:
151195
if: ${{ inputs.run_asan }}
152196
runs-on: windows-latest
153-
timeout-minutes: 45
197+
# FIXED 15-min soak (hard-coded below). MSYS2/Wine + ASan build is the
198+
# slowest path; 60 keeps the budget well above the run length so it is
199+
# never truncated.
200+
timeout-minutes: 240
154201
steps:
155202
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
156203
- uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2

0 commit comments

Comments
 (0)