Skip to content

Commit 95352ad

Browse files
committed
feat: complete CLI-first overlay CP28
1 parent 1778637 commit 95352ad

63 files changed

Lines changed: 4746 additions & 3394 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: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
run: |
9191
scripts/ci/prepare-release-candidates.sh \
9292
"${{ matrix.goos }}" "${{ matrix.goarch }}" \
93-
--binary build/c/codebase-memory-mcp \
93+
--binary build/c/codebase-memory-cli \
9494
--out-dir release-candidates
9595
scripts/gen-third-party-notices.sh \
9696
"release-candidates/${{ matrix.goos }}-${{ matrix.goarch }}/THIRD_PARTY_NOTICES.md"
@@ -148,7 +148,7 @@ jobs:
148148
shell: msys2 {0}
149149
run: |
150150
scripts/ci/prepare-release-candidates.sh windows amd64 \
151-
--binary build/c/codebase-memory-mcp.exe \
151+
--binary build/c/codebase-memory-cli.exe \
152152
--out-dir release-candidates
153153
scripts/gen-third-party-notices.sh \
154154
release-candidates/windows-amd64/THIRD_PARTY_NOTICES.md
@@ -210,7 +210,7 @@ jobs:
210210
shell: msys2 {0}
211211
run: |
212212
scripts/ci/prepare-release-candidates.sh windows arm64 \
213-
--binary build/c/codebase-memory-mcp.exe \
213+
--binary build/c/codebase-memory-cli.exe \
214214
--out-dir release-candidates
215215
scripts/gen-third-party-notices.sh \
216216
release-candidates/windows-arm64/THIRD_PARTY_NOTICES.md
@@ -266,14 +266,14 @@ jobs:
266266
267267
- name: Verify release static linking
268268
run: |
269-
file build/c/codebase-memory-mcp
270-
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"
269+
file build/c/codebase-memory-cli
270+
ldd build/c/codebase-memory-cli 2>&1 | grep -q "not a dynamic executable" || ldd build/c/codebase-memory-cli 2>&1 | grep -q "statically linked"
271271
272272
- name: Derive immutable stripped and unstripped release candidates
273273
run: |
274274
scripts/ci/prepare-release-candidates.sh \
275275
linux "${{ matrix.arch }}-portable" \
276-
--binary build/c/codebase-memory-mcp \
276+
--binary build/c/codebase-memory-cli \
277277
--out-dir release-candidates
278278
scripts/gen-third-party-notices.sh \
279279
"release-candidates/linux-${{ matrix.arch }}-portable/THIRD_PARTY_NOTICES.md"
@@ -395,8 +395,8 @@ jobs:
395395
windows-amd64 windows-arm64; do
396396
goos="${target%%-*}"
397397
goarch="${target#*-}"
398-
selected_name=codebase-memory-mcp
399-
test "$goos" != windows || selected_name=codebase-memory-mcp.exe
398+
selected_name=codebase-memory-cli
399+
test "$goos" != windows || selected_name=codebase-memory-cli.exe
400400
selected="release-selection/selected/$target/$selected_name"
401401
notices="release-candidate-scan/notices/$target/THIRD_PARTY_NOTICES.md"
402402
test -f "$selected"

‎.github/workflows/_smoke.yml‎

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ jobs:
102102
- name: Extract release artifact
103103
run: |
104104
mkdir -p "$RUNNER_TEMP/cbm-artifact"
105-
tar -xzf codebase-memory-mcp-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz \
105+
tar -xzf codebase-memory-cli-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz \
106106
-C "$RUNNER_TEMP/cbm-artifact"
107-
chmod +x "$RUNNER_TEMP/cbm-artifact/codebase-memory-mcp"
107+
chmod +x "$RUNNER_TEMP/cbm-artifact/codebase-memory-cli"
108108
109109
# ONE harness for every venue. This is the same wrapper local CI and PR CI
110110
# run, handed the DOWNLOADED artifact instead of a local build: it stages
@@ -114,22 +114,22 @@ jobs:
114114
# the wrapper (no env isolation, no user-PATH guard, fixed port).
115115
- name: Smoke test (shared wrapper)
116116
run: |
117-
scripts/smoke-local.sh "$RUNNER_TEMP/cbm-artifact/codebase-memory-mcp"
117+
scripts/smoke-local.sh "$RUNNER_TEMP/cbm-artifact/codebase-memory-cli"
118118
env:
119119
CBM_SMOKE_ARTIFACT_DIR: ${{ runner.temp }}/cbm-artifact
120120
SMOKE_REQUIRE_UI: "1"
121121

122122
- name: Security audits
123123
run: |
124-
BIN="$RUNNER_TEMP/cbm-artifact/codebase-memory-mcp"
124+
BIN="$RUNNER_TEMP/cbm-artifact/codebase-memory-cli"
125125
scripts/security-strings.sh "$BIN"
126126
scripts/security-install.sh "$BIN"
127127
scripts/security-network.sh "$BIN"
128128
129129
- name: MCP robustness test (selected linux-amd64 runtime)
130130
if: matrix.goos == 'linux' && matrix.goarch == 'amd64'
131131
run: |
132-
BIN="$RUNNER_TEMP/cbm-artifact/codebase-memory-mcp"
132+
BIN="$RUNNER_TEMP/cbm-artifact/codebase-memory-cli"
133133
scripts/security-fuzz.sh "$BIN"
134134
scripts/security-fuzz-random.sh "$BIN" 60
135135
@@ -145,7 +145,7 @@ jobs:
145145
grep -q "DatabaseMirror" /etc/clamav/freshclam.conf 2>/dev/null || \
146146
echo "DatabaseMirror database.clamav.net" | sudo tee -a /etc/clamav/freshclam.conf > /dev/null
147147
sudo freshclam --quiet
148-
clamscan --no-summary "$RUNNER_TEMP/cbm-artifact/codebase-memory-mcp"
148+
clamscan --no-summary "$RUNNER_TEMP/cbm-artifact/codebase-memory-cli"
149149
150150
- name: ClamAV scan (macOS)
151151
if: startsWith(matrix.os, 'macos')
@@ -158,7 +158,7 @@ jobs:
158158
echo "DatabaseMirror database.clamav.net" >> "$CLAMAV_ETC/freshclam.conf"
159159
fi
160160
freshclam --quiet --no-warnings 2>/dev/null || freshclam --quiet 2>/dev/null || echo "WARNING: freshclam update failed"
161-
clamscan --no-summary "$RUNNER_TEMP/cbm-artifact/codebase-memory-mcp"
161+
clamscan --no-summary "$RUNNER_TEMP/cbm-artifact/codebase-memory-cli"
162162
163163
smoke-windows:
164164
needs: setup-matrix
@@ -196,8 +196,8 @@ jobs:
196196
ARCH=${{ matrix.arch }}
197197
ARTIFACT_DIR="$(cygpath -u "$RUNNER_TEMP")/cbm-artifact"
198198
mkdir -p "$ARTIFACT_DIR"
199-
unzip -o "codebase-memory-mcp-windows-${ARCH}.zip" -d "$ARTIFACT_DIR"
200-
test -s "$ARTIFACT_DIR/codebase-memory-mcp.exe"
199+
unzip -o "codebase-memory-cli-windows-${ARCH}.zip" -d "$ARTIFACT_DIR"
200+
test -s "$ARTIFACT_DIR/codebase-memory-cli.exe"
201201
# ONE executable per runtime set: a payload sibling would mean the
202202
# removed launcher split came back.
203203
test ! -e "$ARTIFACT_DIR/codebase-memory-mcp.payload.exe"
@@ -209,8 +209,8 @@ jobs:
209209
# image's file busy for ~100ms (section teardown / first-touch AV),
210210
# and a temp dir on an ephemeral runner must never fail the job.
211211
trap 'rm -rf "$LAUNCH_DIR" 2>/dev/null || { sleep 2; rm -rf "$LAUNCH_DIR" 2>/dev/null || true; }' EXIT
212-
cp "$ARTIFACT_DIR/codebase-memory-mcp.exe" "$LAUNCH_DIR/"
213-
"$LAUNCH_DIR/codebase-memory-mcp.exe" --version
212+
cp "$ARTIFACT_DIR/codebase-memory-cli.exe" "$LAUNCH_DIR/"
213+
"$LAUNCH_DIR/codebase-memory-cli.exe" --version
214214
215215
# ONE harness for every venue: the same script win.sh smoke-install and
216216
# pr.yml run, handed the DOWNLOADED artifact instead of a local build. It
@@ -232,21 +232,21 @@ jobs:
232232
shell: msys2 {0}
233233
run: |
234234
ARTIFACT_DIR="$(cygpath -u "$RUNNER_TEMP")/cbm-artifact"
235-
scripts/security-strings.sh "$ARTIFACT_DIR/codebase-memory-mcp.exe"
235+
scripts/security-strings.sh "$ARTIFACT_DIR/codebase-memory-cli.exe"
236236
PROFILE_ROOT="$(cygpath -u "$USERPROFILE")"
237237
SECURITY_DIR="$(mktemp -d "$PROFILE_ROOT/cbm-release-security.XXXXXX")"
238238
# Best-effort cleanup with one retry (see the version preflight).
239239
trap 'rm -rf "$SECURITY_DIR" 2>/dev/null || { sleep 2; rm -rf "$SECURITY_DIR" 2>/dev/null || true; }' EXIT
240-
cp "$ARTIFACT_DIR/codebase-memory-mcp.exe" "$SECURITY_DIR/"
240+
cp "$ARTIFACT_DIR/codebase-memory-cli.exe" "$SECURITY_DIR/"
241241
TMPDIR="$SECURITY_DIR" \
242-
scripts/security-install.sh "$SECURITY_DIR/codebase-memory-mcp.exe"
242+
scripts/security-install.sh "$SECURITY_DIR/codebase-memory-cli.exe"
243243
244244
- name: Windows Defender scan
245245
shell: pwsh
246246
run: |
247247
& "C:\Program Files\Windows Defender\MpCmdRun.exe" -SignatureUpdate 2>$null
248248
$artifactDir = Join-Path $env:RUNNER_TEMP "cbm-artifact"
249-
foreach ($binary in @("codebase-memory-mcp.exe")) {
249+
foreach ($binary in @("codebase-memory-cli.exe")) {
250250
$result = & "C:\Program Files\Windows Defender\MpCmdRun.exe" -Scan -ScanType 3 -File (Join-Path $artifactDir $binary) -DisableRemediation
251251
$code = $LASTEXITCODE
252252
Write-Host $result
@@ -286,9 +286,9 @@ jobs:
286286
- name: Extract release artifact
287287
run: |
288288
mkdir -p "$RUNNER_TEMP/cbm-artifact"
289-
tar -xzf codebase-memory-mcp-linux-${{ matrix.arch }}-portable.tar.gz \
289+
tar -xzf codebase-memory-cli-linux-${{ matrix.arch }}-portable.tar.gz \
290290
-C "$RUNNER_TEMP/cbm-artifact"
291-
chmod +x "$RUNNER_TEMP/cbm-artifact/codebase-memory-mcp"
291+
chmod +x "$RUNNER_TEMP/cbm-artifact/codebase-memory-cli"
292292
293293
# Same wrapper as every other venue. This leg previously called
294294
# smoke-test.sh with no fixture server, which silently SKIPPED the
@@ -297,7 +297,7 @@ jobs:
297297
# exactly the phases it most needs to run.
298298
- name: Smoke test (shared wrapper)
299299
run: |
300-
scripts/smoke-local.sh "$RUNNER_TEMP/cbm-artifact/codebase-memory-mcp"
300+
scripts/smoke-local.sh "$RUNNER_TEMP/cbm-artifact/codebase-memory-cli"
301301
env:
302302
CBM_SMOKE_ARTIFACT_DIR: ${{ runner.temp }}/cbm-artifact
303303
SMOKE_REQUIRE_UI: "1"
@@ -307,11 +307,11 @@ jobs:
307307
# in debian:bullseye (glibc 2.31) — the standard dynamic binary would fail
308308
# here with `GLIBC_2.38 not found`.
309309
- name: Old-glibc compatibility
310-
run: scripts/ci/check-glibc-compat.sh "$RUNNER_TEMP/cbm-artifact/codebase-memory-mcp"
310+
run: scripts/ci/check-glibc-compat.sh "$RUNNER_TEMP/cbm-artifact/codebase-memory-cli"
311311

312312
- name: Security audits
313313
run: |
314-
BIN="$RUNNER_TEMP/cbm-artifact/codebase-memory-mcp"
314+
BIN="$RUNNER_TEMP/cbm-artifact/codebase-memory-cli"
315315
scripts/security-strings.sh "$BIN"
316316
scripts/security-install.sh "$BIN"
317317
scripts/security-network.sh "$BIN"

‎.github/workflows/_soak.yml‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
SELECTED_BINARY: ${{ runner.temp }}/cbm-selected-artifact/codebase-memory-mcp
9393
USE_RELEASE_ARTIFACTS: ${{ inputs.use_release_artifacts }}
9494
run: |
95-
binary=build/c/codebase-memory-mcp
95+
binary=build/c/codebase-memory-cli
9696
test "$USE_RELEASE_ARTIFACTS" != true || binary="$SELECTED_BINARY"
9797
scripts/soak-legs.sh --legs "${{ inputs.legs }}" "$binary" ${{ inputs.duration_minutes }}
9898
- name: Upload metrics
@@ -156,9 +156,9 @@ jobs:
156156
run: |
157157
ARTIFACT_DIR="$(cygpath -u "$RUNNER_TEMP")/cbm-selected-artifact"
158158
mkdir -p "$ARTIFACT_DIR"
159-
unzip -q "$(cygpath -u "$RUNNER_TEMP")/cbm-selected-container/codebase-memory-mcp-windows-amd64.zip" \
160-
codebase-memory-mcp.exe -d "$ARTIFACT_DIR"
161-
"$ARTIFACT_DIR/codebase-memory-mcp.exe" --version
159+
unzip -q "$(cygpath -u "$RUNNER_TEMP")/cbm-selected-container/codebase-memory-cli-windows-amd64.zip" \
160+
codebase-memory-cli.exe -d "$ARTIFACT_DIR"
161+
"$ARTIFACT_DIR/codebase-memory-cli.exe" --version
162162
# Both release-gating legs via the ONE canonical soak entry; only the
163163
# protected-TEMP provisioning is venue text. soak-legs.sh resolves .exe.
164164
- name: Soak legs (${{ inputs.legs }}, ${{ inputs.duration_minutes }} min each)
@@ -167,9 +167,9 @@ jobs:
167167
export TEMP="$(cygpath -m "$CBM_CI_TEMP_ROOT")"
168168
export TMP="$TEMP"
169169
export TMPDIR="$(cygpath -u "$CBM_CI_TEMP_ROOT")"
170-
binary=build/c/codebase-memory-mcp
170+
binary=build/c/codebase-memory-cli
171171
if [ "${{ inputs.use_release_artifacts }}" = true ]; then
172-
binary="$(cygpath -u "$RUNNER_TEMP")/cbm-selected-artifact/codebase-memory-mcp.exe"
172+
binary="$(cygpath -u "$RUNNER_TEMP")/cbm-selected-artifact/codebase-memory-cli.exe"
173173
fi
174174
scripts/soak-legs.sh --legs "${{ inputs.legs }}" "$binary" ${{ inputs.duration_minutes }}
175175
- name: Upload metrics
@@ -234,9 +234,9 @@ jobs:
234234
run: |
235235
ARTIFACT_DIR="$(cygpath -u "$RUNNER_TEMP")/cbm-selected-artifact"
236236
mkdir -p "$ARTIFACT_DIR"
237-
unzip -q "$(cygpath -u "$RUNNER_TEMP")/cbm-selected-container/codebase-memory-mcp-windows-arm64.zip" \
238-
codebase-memory-mcp.exe -d "$ARTIFACT_DIR"
239-
"$ARTIFACT_DIR/codebase-memory-mcp.exe" --version
237+
unzip -q "$(cygpath -u "$RUNNER_TEMP")/cbm-selected-container/codebase-memory-cli-windows-arm64.zip" \
238+
codebase-memory-cli.exe -d "$ARTIFACT_DIR"
239+
"$ARTIFACT_DIR/codebase-memory-cli.exe" --version
240240
# Both release-gating legs via the ONE canonical soak entry; only the
241241
# protected-TEMP provisioning is venue text. soak-legs.sh resolves .exe.
242242
- name: Soak legs (${{ inputs.legs }}, ${{ inputs.duration_minutes }} min each)
@@ -245,9 +245,9 @@ jobs:
245245
export TEMP="$(cygpath -m "$CBM_CI_TEMP_ROOT")"
246246
export TMP="$TEMP"
247247
export TMPDIR="$(cygpath -u "$CBM_CI_TEMP_ROOT")"
248-
binary=build/c/codebase-memory-mcp
248+
binary=build/c/codebase-memory-cli
249249
if [ "${{ inputs.use_release_artifacts }}" = true ]; then
250-
binary="$(cygpath -u "$RUNNER_TEMP")/cbm-selected-artifact/codebase-memory-mcp.exe"
250+
binary="$(cygpath -u "$RUNNER_TEMP")/cbm-selected-artifact/codebase-memory-cli.exe"
251251
fi
252252
scripts/soak-legs.sh --legs "${{ inputs.legs }}" "$binary" ${{ inputs.duration_minutes }}
253253
- name: Upload metrics
@@ -292,7 +292,7 @@ jobs:
292292
- name: Extract selected portable executable
293293
run: |
294294
mkdir -p "$RUNNER_TEMP/cbm-selected-artifact"
295-
tar -xzf "$RUNNER_TEMP/cbm-selected-container/codebase-memory-mcp-linux-${{ matrix.arch }}-portable.tar.gz" \
295+
tar -xzf "$RUNNER_TEMP/cbm-selected-container/codebase-memory-cli-linux-${{ matrix.arch }}-portable.tar.gz" \
296296
-C "$RUNNER_TEMP/cbm-selected-artifact" codebase-memory-mcp
297297
chmod +x "$RUNNER_TEMP/cbm-selected-artifact/codebase-memory-mcp"
298298
"$RUNNER_TEMP/cbm-selected-artifact/codebase-memory-mcp" --version
@@ -367,7 +367,7 @@ jobs:
367367
# Single-leg variant of the canonical soak entry: the ASan build is too
368368
# slow for the two-leg sequence; leg selection is a documented flag, not
369369
# a divergent inline procedure.
370-
run: scripts/soak-legs.sh --legs quick build/c/codebase-memory-mcp 15
370+
run: scripts/soak-legs.sh --legs quick build/c/codebase-memory-cli 15
371371
- name: Upload metrics
372372
if: always()
373373
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
@@ -407,7 +407,7 @@ jobs:
407407
env:
408408
ASAN_OPTIONS: "detect_leaks=0:halt_on_error=0:log_path=soak-results/asan"
409409
# Single-leg variant of the canonical soak entry (see the unix ASan job).
410-
run: scripts/soak-legs.sh --legs quick build/c/codebase-memory-mcp 15
410+
run: scripts/soak-legs.sh --legs quick build/c/codebase-memory-cli 15
411411
- name: Upload metrics
412412
if: always()
413413
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1

‎.github/workflows/_test.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,4 +587,4 @@ jobs:
587587
# against the real supervisor->worker spawn path: under the mandatory
588588
# coordination daemon, CBM_INDEX_SUPERVISOR=0 is a fail-closed refusal, so
589589
# the driver no longer sets it anywhere.
590-
run: ./scripts/test-windows.ps1 -GuardsOnly -Binary build/c/codebase-memory-mcp.exe
590+
run: ./scripts/test-windows.ps1 -GuardsOnly -Binary build/c/codebase-memory-cli.exe

‎.github/workflows/pr.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ jobs:
122122
if: matrix.os == 'ubuntu-latest'
123123
run: |
124124
scripts/build.sh CC=gcc CXX=g++
125-
scripts/smoke-local.sh "$(pwd)/build/c/codebase-memory-mcp"
125+
scripts/smoke-local.sh "$(pwd)/build/c/codebase-memory-cli"
126126
env:
127127
CCACHE_DIR: ${{ github.workspace }}/.ccache
128128
CCACHE_MAXSIZE: 1000M
@@ -131,8 +131,8 @@ jobs:
131131
if: matrix.os == 'macos-14'
132132
run: |
133133
scripts/build.sh CC=cc CXX=c++
134-
codesign --sign - --force build/c/codebase-memory-mcp
135-
scripts/smoke-local.sh "$(pwd)/build/c/codebase-memory-mcp"
134+
codesign --sign - --force build/c/codebase-memory-cli
135+
scripts/smoke-local.sh "$(pwd)/build/c/codebase-memory-cli"
136136
env:
137137
CCACHE_DIR: ${{ github.workspace }}/.ccache
138138
CCACHE_MAXSIZE: 1000M

0 commit comments

Comments
 (0)