Skip to content

Commit 87713c1

Browse files
authored
Merge branch 'main' into feat/claude-plugin
2 parents ae5cd43 + 61b3b1b commit 87713c1

103 files changed

Lines changed: 12300 additions & 1831 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/workflows/_build.yml‎

Lines changed: 25 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Reusable: build binaries (standard + UI) on all platforms
1+
# Reusable: build release binaries on all supported platforms
22
name: Build
33

44
on:
@@ -12,7 +12,6 @@ on:
1212
description: 'Generate build provenance attestations for release artifacts'
1313
type: boolean
1414
default: false
15-
1615
permissions:
1716
contents: read
1817
id-token: write
@@ -63,34 +62,7 @@ jobs:
6362
with:
6463
node-version: "22"
6564

66-
- name: Build standard binary
67-
env:
68-
VERSION: ${{ inputs.version }}
69-
CC: ${{ matrix.cc }}
70-
CXX: ${{ matrix.cxx }}
71-
run: |
72-
if [ -n "$VERSION" ]; then
73-
scripts/build.sh --version "$VERSION" "CC=$CC" "CXX=$CXX"
74-
else
75-
scripts/build.sh "CC=$CC" "CXX=$CXX"
76-
fi
77-
78-
- name: Ad-hoc sign macOS binary
79-
if: startsWith(matrix.os, 'macos')
80-
run: codesign --sign - --force build/c/codebase-memory-mcp
81-
82-
# Archive layout/name live in the ONE canonical script the local
83-
# artifact-flow smoke lane also runs (venue-parity contract).
84-
- name: Archive standard binary (canonical package-release.sh)
85-
run: scripts/package-release.sh ${{ matrix.goos }} ${{ matrix.goarch }}
86-
87-
- name: Attest standard binary provenance
88-
if: ${{ inputs.attest }}
89-
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
90-
with:
91-
subject-path: codebase-memory-mcp-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz
92-
93-
- name: Build UI binary
65+
- name: Build release binary with UI
9466
env:
9567
VERSION: ${{ inputs.version }}
9668
CC: ${{ matrix.cc }}
@@ -102,22 +74,24 @@ jobs:
10274
scripts/build.sh --with-ui "CC=$CC" "CXX=$CXX"
10375
fi
10476
105-
- name: Ad-hoc sign macOS UI binary
77+
- name: Ad-hoc sign macOS release binary
10678
if: startsWith(matrix.os, 'macos')
10779
run: codesign --sign - --force build/c/codebase-memory-mcp
10880

10981
- name: Frontend integrity scan
11082
if: matrix.goos == 'linux' && matrix.goarch == 'amd64'
11183
run: scripts/security-ui.sh
11284

113-
- name: Archive UI binary (canonical package-release.sh)
114-
run: scripts/package-release.sh ${{ matrix.goos }} ${{ matrix.goarch }} --variant ui
85+
# Archive layout/name live in the ONE canonical script the local
86+
# artifact-flow smoke lane also runs (venue-parity contract).
87+
- name: Archive release binary (canonical package-release.sh)
88+
run: scripts/package-release.sh ${{ matrix.goos }} ${{ matrix.goarch }}
11589

116-
- name: Attest UI binary provenance
90+
- name: Attest release binary provenance
11791
if: ${{ inputs.attest }}
11892
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
11993
with:
120-
subject-path: codebase-memory-mcp-ui-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz
94+
subject-path: codebase-memory-mcp-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz
12195

12296
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
12397
with:
@@ -144,50 +118,29 @@ jobs:
144118
with:
145119
node-version: "22"
146120

147-
- name: Build standard binary
121+
- name: Build release binary with UI
148122
shell: msys2 {0}
149123
env:
150124
VERSION: ${{ inputs.version }}
151125
run: |
152126
if [ -n "$VERSION" ]; then
153-
scripts/build.sh --version "$VERSION" CC=clang CXX=clang++
127+
scripts/build.sh --with-ui --version "$VERSION" CC=clang CXX=clang++
154128
else
155-
scripts/build.sh CC=clang CXX=clang++
129+
scripts/build.sh --with-ui CC=clang CXX=clang++
156130
fi
157131
158132
# Archive layout/name live in the ONE canonical script the local
159133
# artifact-flow smoke lane also runs (venue-parity contract).
160-
- name: Archive standard binary (canonical package-release.sh)
134+
- name: Archive release binary (canonical package-release.sh)
161135
shell: msys2 {0}
162136
run: scripts/package-release.sh windows amd64 CC=clang CXX=clang++
163137

164-
- name: Attest standard binary provenance
138+
- name: Attest release binary provenance
165139
if: ${{ inputs.attest }}
166140
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
167141
with:
168142
subject-path: codebase-memory-mcp-windows-amd64.zip
169143

170-
- name: Build UI binary
171-
shell: msys2 {0}
172-
env:
173-
VERSION: ${{ inputs.version }}
174-
run: |
175-
if [ -n "$VERSION" ]; then
176-
scripts/build.sh --with-ui --version "$VERSION" CC=clang CXX=clang++
177-
else
178-
scripts/build.sh --with-ui CC=clang CXX=clang++
179-
fi
180-
181-
- name: Archive UI binary (canonical package-release.sh)
182-
shell: msys2 {0}
183-
run: scripts/package-release.sh windows amd64 --variant ui CC=clang CXX=clang++
184-
185-
- name: Attest UI binary provenance
186-
if: ${{ inputs.attest }}
187-
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
188-
with:
189-
subject-path: codebase-memory-mcp-ui-windows-amd64.zip
190-
191144
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
192145
with:
193146
name: binaries-windows-amd64
@@ -217,28 +170,7 @@ jobs:
217170
with:
218171
node-version: "22"
219172

220-
- name: Build standard binary
221-
shell: msys2 {0}
222-
env:
223-
VERSION: ${{ inputs.version }}
224-
run: |
225-
if [ -n "$VERSION" ]; then
226-
scripts/build.sh --version "$VERSION" CC=clang CXX=clang++
227-
else
228-
scripts/build.sh CC=clang CXX=clang++
229-
fi
230-
231-
- name: Archive standard binary (canonical package-release.sh)
232-
shell: msys2 {0}
233-
run: scripts/package-release.sh windows arm64 CC=clang CXX=clang++
234-
235-
- name: Attest standard binary provenance
236-
if: ${{ inputs.attest }}
237-
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
238-
with:
239-
subject-path: codebase-memory-mcp-windows-arm64.zip
240-
241-
- name: Build UI binary
173+
- name: Build release binary with UI
242174
shell: msys2 {0}
243175
env:
244176
VERSION: ${{ inputs.version }}
@@ -249,15 +181,15 @@ jobs:
249181
scripts/build.sh --with-ui CC=clang CXX=clang++
250182
fi
251183
252-
- name: Archive UI binary (canonical package-release.sh)
184+
- name: Archive release binary (canonical package-release.sh)
253185
shell: msys2 {0}
254-
run: scripts/package-release.sh windows arm64 --variant ui CC=clang CXX=clang++
186+
run: scripts/package-release.sh windows arm64 CC=clang CXX=clang++
255187

256-
- name: Attest UI binary provenance
188+
- name: Attest release binary provenance
257189
if: ${{ inputs.attest }}
258190
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
259191
with:
260-
subject-path: codebase-memory-mcp-ui-windows-arm64.zip
192+
subject-path: codebase-memory-mcp-windows-arm64.zip
261193

262194
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
263195
with:
@@ -287,49 +219,30 @@ jobs:
287219
with:
288220
node-version: "22"
289221

290-
- name: Build standard binary (static)
222+
- name: Build release binary with UI (static)
291223
env:
292224
VERSION: ${{ inputs.version }}
293225
run: |
294226
if [ -n "$VERSION" ]; then
295-
scripts/build.sh --version "$VERSION" CC=gcc CXX=g++ STATIC=1
227+
scripts/build.sh --with-ui --version "$VERSION" CC=gcc CXX=g++ STATIC=1
296228
else
297-
scripts/build.sh CC=gcc CXX=g++ STATIC=1
229+
scripts/build.sh --with-ui CC=gcc CXX=g++ STATIC=1
298230
fi
299231
300-
- name: Verify static linking
232+
- name: Verify release static linking
301233
run: |
302234
file build/c/codebase-memory-mcp
303235
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"
304236
305-
- name: Archive standard binary (canonical package-release.sh)
237+
- name: Archive release binary (canonical package-release.sh)
306238
run: scripts/package-release.sh linux ${{ matrix.arch }}-portable
307239

308-
- name: Attest standard binary provenance
240+
- name: Attest release binary provenance
309241
if: ${{ inputs.attest }}
310242
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
311243
with:
312244
subject-path: codebase-memory-mcp-linux-${{ matrix.arch }}-portable.tar.gz
313245

314-
- name: Build UI binary (static)
315-
env:
316-
VERSION: ${{ inputs.version }}
317-
run: |
318-
if [ -n "$VERSION" ]; then
319-
scripts/build.sh --with-ui --version "$VERSION" CC=gcc CXX=g++ STATIC=1
320-
else
321-
scripts/build.sh --with-ui CC=gcc CXX=g++ STATIC=1
322-
fi
323-
324-
- name: Archive UI binary (canonical package-release.sh)
325-
run: scripts/package-release.sh linux ${{ matrix.arch }}-portable --variant ui
326-
327-
- name: Attest UI binary provenance
328-
if: ${{ inputs.attest }}
329-
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
330-
with:
331-
subject-path: codebase-memory-mcp-ui-linux-${{ matrix.arch }}-portable.tar.gz
332-
333246
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
334247
with:
335248
name: binaries-linux-${{ matrix.arch }}-portable

‎.github/workflows/_smoke.yml‎

Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Reusable: smoke test every binary (standard + UI, all platforms)
1+
# Reusable: smoke test shipped release binaries on all platforms
22
name: Smoke
33

44
on:
@@ -8,7 +8,6 @@ on:
88
description: 'Smoke the shipped binaries on the broad platform matrix (extra OS versions) instead of the core set'
99
type: boolean
1010
default: false
11-
1211
permissions:
1312
contents: read
1413

@@ -72,16 +71,11 @@ jobs:
7271
WIN=$(jq -cn --argjson a "$CORE_WIN" '$a')
7372
PORTABLE=$(jq -cn --argjson a "$CORE_PORTABLE" '$a')
7473
fi
75-
# Expand each OS entry over both variants into a FLAT include list so
76-
# every {os,variant} runs as its own job. A {variant:[...],include:$LIST}
77-
# matrix collapses under GitHub's include-merge (later os entries
78-
# overwrite the variant combos last-wins), which silently dropped every
79-
# OS except the last — e.g. only windows-11-arm ran, never windows-latest.
80-
# Building the cartesian explicitly avoids that.
81-
VARIANTS='["standard","ui"]'
82-
UNIX_M=$(jq -cn --argjson a "$UNIX" --argjson v "$VARIANTS" '{include:[$a[] as $o | $v[] as $t | ($o + {variant:$t})]}')
83-
WIN_M=$(jq -cn --argjson a "$WIN" --argjson v "$VARIANTS" '{include:[$a[] as $o | $v[] as $t | ($o + {variant:$t})]}')
84-
PORTABLE_M=$(jq -cn --argjson a "$PORTABLE" --argjson v "$VARIANTS" '{include:[$a[] as $o | $v[] as $t | ($o + {variant:$t})]}')
74+
# One composition ships; the wrappers assert the embedded UI themselves
75+
# (SMOKE_REQUIRE_UI in scripts/ci/smoke-artifact.sh and below).
76+
UNIX_M=$(jq -cn --argjson a "$UNIX" '{include:$a}')
77+
WIN_M=$(jq -cn --argjson a "$WIN" '{include:$a}')
78+
PORTABLE_M=$(jq -cn --argjson a "$PORTABLE" '{include:$a}')
8579
echo "unix=$UNIX_M" >> "$GITHUB_OUTPUT"
8680
echo "windows=$WIN_M" >> "$GITHUB_OUTPUT"
8781
echo "portable=$PORTABLE_M" >> "$GITHUB_OUTPUT"
@@ -107,9 +101,8 @@ jobs:
107101

108102
- name: Extract release artifact
109103
run: |
110-
SUFFIX=${{ matrix.variant == 'ui' && '-ui' || '' }}
111104
mkdir -p "$RUNNER_TEMP/cbm-artifact"
112-
tar -xzf codebase-memory-mcp${SUFFIX}-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz \
105+
tar -xzf codebase-memory-mcp-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz \
113106
-C "$RUNNER_TEMP/cbm-artifact"
114107
chmod +x "$RUNNER_TEMP/cbm-artifact/codebase-memory-mcp"
115108
@@ -121,10 +114,10 @@ jobs:
121114
# the wrapper (no env isolation, no user-PATH guard, fixed port).
122115
- name: Smoke test (shared wrapper)
123116
run: |
124-
scripts/smoke-local.sh \
125-
"$RUNNER_TEMP/cbm-artifact/codebase-memory-mcp" ${{ matrix.variant }}
117+
scripts/smoke-local.sh "$RUNNER_TEMP/cbm-artifact/codebase-memory-mcp"
126118
env:
127119
CBM_SMOKE_ARTIFACT_DIR: ${{ runner.temp }}/cbm-artifact
120+
SMOKE_REQUIRE_UI: "1"
128121

129122
- name: Security audits
130123
run: |
@@ -133,8 +126,8 @@ jobs:
133126
scripts/security-install.sh "$BIN"
134127
scripts/security-network.sh "$BIN"
135128
136-
- name: MCP robustness test (linux-amd64 standard only)
137-
if: matrix.variant == 'standard' && matrix.goos == 'linux' && matrix.goarch == 'amd64'
129+
- name: MCP robustness test (selected linux-amd64 runtime)
130+
if: matrix.goos == 'linux' && matrix.goarch == 'amd64'
138131
run: |
139132
BIN="$RUNNER_TEMP/cbm-artifact/codebase-memory-mcp"
140133
scripts/security-fuzz.sh "$BIN"
@@ -200,14 +193,13 @@ jobs:
200193
- name: Extract release artifact
201194
shell: msys2 {0}
202195
run: |
203-
SUFFIX=${{ matrix.variant == 'ui' && '-ui' || '' }}
204196
ARCH=${{ matrix.arch }}
205197
ARTIFACT_DIR="$(cygpath -u "$RUNNER_TEMP")/cbm-artifact"
206198
mkdir -p "$ARTIFACT_DIR"
207-
unzip -o "codebase-memory-mcp${SUFFIX}-windows-${ARCH}.zip" -d "$ARTIFACT_DIR"
199+
unzip -o "codebase-memory-mcp-windows-${ARCH}.zip" -d "$ARTIFACT_DIR"
208200
test -s "$ARTIFACT_DIR/codebase-memory-mcp.exe"
209-
# ONE binary per platform: a payload sibling would mean the
210-
# AV-flagged launcher stub came back.
201+
# ONE executable per runtime set: a payload sibling would mean the
202+
# removed launcher split came back.
211203
test ! -e "$ARTIFACT_DIR/codebase-memory-mcp.payload.exe"
212204
# Pre-flight the image from a profile-rooted directory: the shared
213205
# runner workspace is deliberately not a valid install root.
@@ -231,7 +223,7 @@ jobs:
231223
shell: msys2 {0}
232224
env:
233225
SMOKE_ARCH: ${{ matrix.arch }}
234-
SMOKE_VARIANT: ${{ matrix.variant }}
226+
SMOKE_REQUIRE_UI: "1"
235227
run: |
236228
export CBM_SMOKE_ARTIFACT_DIR="$(cygpath -u "$RUNNER_TEMP")/cbm-artifact"
237229
bash test-infrastructure/vm/vm-smoke.sh
@@ -293,9 +285,8 @@ jobs:
293285

294286
- name: Extract release artifact
295287
run: |
296-
SUFFIX=${{ matrix.variant == 'ui' && '-ui' || '' }}
297288
mkdir -p "$RUNNER_TEMP/cbm-artifact"
298-
tar -xzf codebase-memory-mcp${SUFFIX}-linux-${{ matrix.arch }}-portable.tar.gz \
289+
tar -xzf codebase-memory-mcp-linux-${{ matrix.arch }}-portable.tar.gz \
299290
-C "$RUNNER_TEMP/cbm-artifact"
300291
chmod +x "$RUNNER_TEMP/cbm-artifact/codebase-memory-mcp"
301292
@@ -306,10 +297,10 @@ jobs:
306297
# exactly the phases it most needs to run.
307298
- name: Smoke test (shared wrapper)
308299
run: |
309-
scripts/smoke-local.sh \
310-
"$RUNNER_TEMP/cbm-artifact/codebase-memory-mcp" ${{ matrix.variant }}
300+
scripts/smoke-local.sh "$RUNNER_TEMP/cbm-artifact/codebase-memory-mcp"
311301
env:
312302
CBM_SMOKE_ARTIFACT_DIR: ${{ runner.temp }}/cbm-artifact
303+
SMOKE_REQUIRE_UI: "1"
313304

314305
# The -portable binary is what all linux install/update paths now deliver;
315306
# it MUST start on old glibc (Debian 11 / RHEL 8 / Ubuntu 20.04). Runs it

0 commit comments

Comments
 (0)