Skip to content

Commit 5986610

Browse files
committed
Merge remote-tracking branch 'origin/main' into fix/search-graph-semantic-only-results
Signed-off-by: JJordan0K <69581081+JJordan0C@users.noreply.github.com>
2 parents 108740d + 7814e1b commit 5986610

172 files changed

Lines changed: 5862 additions & 26340 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/pr-acknowledgement.md‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!--
2+
Posted automatically on every newly opened pull request by
3+
.github/workflows/pr-acknowledgement.yml
4+
5+
EDIT THIS FILE to change what contributors are told. Blank it out to stop
6+
posting acknowledgements entirely — no workflow change needed.
7+
8+
Keep it short, and keep it honest about what happens next. A promise of a
9+
timeline you will not meet is worse than no acknowledgement at all.
10+
Remove the review-status section below the moment it stops being true.
11+
-->
12+
13+
Thanks for opening this — it has been seen, and it is queued.
14+
15+
This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence.
16+
17+
**Current review status: working through a backlog.** `0.9.1-rc.1` is out, so the release freeze that held reviews is over — but it left a large queue of open pull requests behind it, and we are reading through them oldest-first. The background is in [discussion #1144](https://github.com/DeusData/codebase-memory-mcp/discussions/1144).
18+
19+
What that means for this PR, concretely:
20+
21+
- **It will not be closed for inactivity.** No stale bot touches pull requests here.
22+
- It may still sit a while before a human reads it. That is on us, not on you.
23+
- Older PRs are read first, so a recent one is not being skipped — it is behind a queue.
24+
25+
Things that will genuinely speed it up whenever review does happen:
26+
27+
- **Keep it rebased** on `main` — the tree is moving quickly right now, and a conflicting branch cannot be reviewed as the diff you intended.
28+
- **Get CI green**, or say which failures you believe are pre-existing.
29+
- **Keep the change to one claim.** Bundled features and refactors get split before they get merged, which costs you a round trip.
30+
- Every commit needs a sign-off (`git commit -s`) — CI enforces DCO.
31+
32+
If this fixes a bug, a reproduction we can run is worth more than a description of the symptom.
33+
34+
Thanks for contributing, and sorry in advance for the wait.

‎.github/workflows/_build.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
if: startsWith(matrix.os, 'ubuntu')
6060
run: sudo apt-get update && sudo apt-get install -y zlib1g-dev
6161

62-
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
62+
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
6363
with:
6464
node-version: "22"
6565

@@ -140,7 +140,7 @@ jobs:
140140
make
141141
zip
142142
143-
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
143+
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
144144
with:
145145
node-version: "22"
146146

@@ -213,7 +213,7 @@ jobs:
213213
make
214214
zip
215215
216-
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
216+
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
217217
with:
218218
node-version: "22"
219219

@@ -283,7 +283,7 @@ jobs:
283283
- name: Install deps
284284
run: sudo apt-get update && sudo apt-get install -y zlib1g-dev
285285

286-
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
286+
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
287287
with:
288288
node-version: "22"
289289

‎.github/workflows/_smoke.yml‎

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -206,18 +206,18 @@ jobs:
206206
mkdir -p "$ARTIFACT_DIR"
207207
unzip -o "codebase-memory-mcp${SUFFIX}-windows-${ARCH}.zip" -d "$ARTIFACT_DIR"
208208
test -s "$ARTIFACT_DIR/codebase-memory-mcp.exe"
209-
test -s "$ARTIFACT_DIR/codebase-memory-mcp.payload.exe"
210-
# Pre-flight both images from a profile-rooted directory: the shared
211-
# runner workspace is deliberately not a valid launcher bundle root.
209+
# ONE binary per platform: a payload sibling would mean the
210+
# AV-flagged launcher stub came back.
211+
test ! -e "$ARTIFACT_DIR/codebase-memory-mcp.payload.exe"
212+
# Pre-flight the image from a profile-rooted directory: the shared
213+
# runner workspace is deliberately not a valid install root.
212214
PROFILE_ROOT="$(cygpath -u "$USERPROFILE")"
213215
LAUNCH_DIR="$(mktemp -d "$PROFILE_ROOT/cbm-release-version.XXXXXX")"
214216
# Best-effort cleanup with one retry: Windows holds the just-exited
215217
# image's file busy for ~100ms (section teardown / first-touch AV),
216218
# and a temp dir on an ephemeral runner must never fail the job.
217219
trap 'rm -rf "$LAUNCH_DIR" 2>/dev/null || { sleep 2; rm -rf "$LAUNCH_DIR" 2>/dev/null || true; }' EXIT
218-
cp "$ARTIFACT_DIR/codebase-memory-mcp.exe" \
219-
"$ARTIFACT_DIR/codebase-memory-mcp.payload.exe" "$LAUNCH_DIR/"
220-
"$LAUNCH_DIR/codebase-memory-mcp.payload.exe" --version
220+
cp "$ARTIFACT_DIR/codebase-memory-mcp.exe" "$LAUNCH_DIR/"
221221
"$LAUNCH_DIR/codebase-memory-mcp.exe" --version
222222
223223
# ONE harness for every venue: the same script win.sh smoke-install and
@@ -241,13 +241,11 @@ jobs:
241241
run: |
242242
ARTIFACT_DIR="$(cygpath -u "$RUNNER_TEMP")/cbm-artifact"
243243
scripts/security-strings.sh "$ARTIFACT_DIR/codebase-memory-mcp.exe"
244-
scripts/security-strings.sh "$ARTIFACT_DIR/codebase-memory-mcp.payload.exe"
245244
PROFILE_ROOT="$(cygpath -u "$USERPROFILE")"
246245
SECURITY_DIR="$(mktemp -d "$PROFILE_ROOT/cbm-release-security.XXXXXX")"
247246
# Best-effort cleanup with one retry (see the version preflight).
248247
trap 'rm -rf "$SECURITY_DIR" 2>/dev/null || { sleep 2; rm -rf "$SECURITY_DIR" 2>/dev/null || true; }' EXIT
249-
cp "$ARTIFACT_DIR/codebase-memory-mcp.exe" \
250-
"$ARTIFACT_DIR/codebase-memory-mcp.payload.exe" "$SECURITY_DIR/"
248+
cp "$ARTIFACT_DIR/codebase-memory-mcp.exe" "$SECURITY_DIR/"
251249
TMPDIR="$SECURITY_DIR" \
252250
scripts/security-install.sh "$SECURITY_DIR/codebase-memory-mcp.exe"
253251
@@ -256,7 +254,7 @@ jobs:
256254
run: |
257255
& "C:\Program Files\Windows Defender\MpCmdRun.exe" -SignatureUpdate 2>$null
258256
$artifactDir = Join-Path $env:RUNNER_TEMP "cbm-artifact"
259-
foreach ($binary in @("codebase-memory-mcp.exe", "codebase-memory-mcp.payload.exe")) {
257+
foreach ($binary in @("codebase-memory-mcp.exe")) {
260258
$result = & "C:\Program Files\Windows Defender\MpCmdRun.exe" -Scan -ScanType 3 -File (Join-Path $artifactDir $binary) -DisableRemediation
261259
$code = $LASTEXITCODE
262260
Write-Host $result

‎.github/workflows/_test.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ jobs:
403403
make
404404
git
405405
406-
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
406+
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
407407
with:
408408
node-version: "22"
409409

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: PR acknowledgement
2+
3+
# Posts one acknowledgement comment when a pull request is opened, so a
4+
# contributor learns the current review status immediately instead of inferring
5+
# it from silence.
6+
#
7+
# The message text lives in `.github/pr-acknowledgement.md`. Edit that file to
8+
# change what is said; blank it (or delete it) to turn acknowledgements off
9+
# without touching this workflow. No code change is needed to switch it.
10+
#
11+
# SECURITY — this uses `pull_request_target`, which runs against the BASE repo
12+
# with a token that can write. That is required: a `pull_request` trigger gives
13+
# fork PRs a read-only token, so commenting on exactly the contributions we most
14+
# want to acknowledge would fail.
15+
#
16+
# The safety rule that makes it sound: this job NEVER checks out, builds, or
17+
# executes pull-request code. `actions/checkout` here resolves to the base
18+
# commit (the default under `pull_request_target`), and it is used only to read
19+
# the message file out of our own tree. Do not add a `ref:` pointing at the PR
20+
# head, and do not add a build step. Nothing from the PR is interpolated into a
21+
# shell command either — the body comes from a file, and the PR number is passed
22+
# through the environment rather than expanded inline.
23+
24+
on:
25+
pull_request_target:
26+
types: [opened]
27+
28+
permissions:
29+
contents: read
30+
31+
jobs:
32+
acknowledge:
33+
runs-on: ubuntu-latest
34+
# Bots do not read comments, and acknowledging our own PRs is noise.
35+
if: >-
36+
github.event.pull_request.user.type != 'Bot' &&
37+
github.event.pull_request.author_association != 'OWNER'
38+
permissions:
39+
pull-requests: write
40+
steps:
41+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
42+
with:
43+
# Base commit only — never the PR head. See the security note above.
44+
persist-credentials: false
45+
46+
- name: Post acknowledgement
47+
env:
48+
GH_TOKEN: ${{ github.token }}
49+
PR_NUMBER: ${{ github.event.pull_request.number }}
50+
REPO: ${{ github.repository }}
51+
run: |
52+
set -euo pipefail
53+
MESSAGE_FILE=.github/pr-acknowledgement.md
54+
55+
if [ ! -f "$MESSAGE_FILE" ]; then
56+
echo "No $MESSAGE_FILE in the base tree — acknowledgements are off."
57+
exit 0
58+
fi
59+
60+
# An empty or whitespace-only file is the documented off switch.
61+
if [ -z "$(tr -d '[:space:]' < "$MESSAGE_FILE")" ]; then
62+
echo "$MESSAGE_FILE is blank — acknowledgements are off."
63+
exit 0
64+
fi
65+
66+
gh pr comment "$PR_NUMBER" --repo "$REPO" --body-file "$MESSAGE_FILE"
67+
echo "Acknowledged PR #${PR_NUMBER}."

‎.github/workflows/release.yml‎

Lines changed: 39 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ on:
3131
required: false
3232
type: boolean
3333
default: false
34+
skip_tests:
35+
description: "Skip the test phase entirely (re-release of an already test-green tree; build/smoke/soak/verify still run)"
36+
required: false
37+
type: boolean
38+
default: false
3439

3540
permissions:
3641
contents: read
@@ -46,7 +51,12 @@ jobs:
4651
uses: ./.github/workflows/_lint.yml
4752

4853
# ── 2. Tests (all platforms, full suite for release) ────────────
54+
# skip_tests exists for RE-releases of a tree whose tests are already green:
55+
# when only packaging/gating changed and the previous run proved the suites,
56+
# re-running ~2h of tests adds no information. It skips ONLY this phase —
57+
# build, smoke, soak and verify always run against the fresh artifacts.
4958
test:
59+
if: ${{ !inputs.skip_tests }}
5060
needs: [lint]
5161
uses: ./.github/workflows/_test.yml
5262
with:
@@ -55,7 +65,10 @@ jobs:
5565
shard_suites: true
5666

5767
# ── 3. Build all platforms ──────────────────────────────────────
68+
# !cancelled() && !failure(): run when `test` is deliberately skipped, but
69+
# never when lint or test actually failed.
5870
build:
71+
if: ${{ !cancelled() && !failure() }}
5972
needs: [test]
6073
permissions:
6174
contents: read
@@ -67,15 +80,23 @@ jobs:
6780
attest: true
6881

6982
# ── 4. Smoke test every binary ──────────────────────────────────
83+
# !cancelled() && !failure(): GitHub propagates "skipped" TRANSITIVELY down the
84+
# needs graph, so with skip_tests=true a skipped `test` skipped smoke and soak
85+
# too — even though `build` overrode the same condition and succeeded. Nothing
86+
# failed and nothing said so; the pipeline simply carried on toward publishing
87+
# artifacts that had never been smoke-tested or soaked. Every job downstream of
88+
# an optional phase needs this override, or the phase being optional silently
89+
# makes the phases after it optional as well.
7090
smoke:
91+
if: ${{ !cancelled() && !failure() }}
7192
needs: [build]
7293
uses: ./.github/workflows/_smoke.yml
7394
with:
7495
broad_platforms: true
7596

7697
# ── 5. Soak tests ──────────────────────────────────────────────
7798
soak:
78-
if: ${{ inputs.soak_level != 'none' }}
99+
if: ${{ !cancelled() && !failure() && inputs.soak_level != 'none' }}
79100
needs: [build]
80101
uses: ./.github/workflows/_soak.yml
81102
with:
@@ -84,9 +105,17 @@ jobs:
84105
version: ${{ inputs.version }}
85106

86107
# ── 6. Create DRAFT release ────────────────────────────────────
108+
# Requires smoke to have actually SUCCEEDED, not merely "not failed". The bare
109+
# !cancelled() && !failure() form is fail-OPEN: a skipped smoke is neither
110+
# cancelled nor failed, so a draft was one condition away from being cut from
111+
# binaries nobody had run. soak may legitimately be 'skipped' (soak_level=none),
112+
# so that one is enumerated explicitly rather than lumped in.
87113
release-draft:
88114
needs: [smoke, soak]
89-
if: ${{ !cancelled() && !failure() }}
115+
if: >-
116+
${{ !cancelled() && !failure()
117+
&& needs.smoke.result == 'success'
118+
&& (needs.soak.result == 'success' || needs.soak.result == 'skipped') }}
90119
runs-on: ubuntu-latest
91120
permissions:
92121
contents: write
@@ -220,44 +249,23 @@ jobs:
220249
vt_api_key: ${{ secrets.VIRUS_TOTAL_SCANNER_API_KEY }}
221250
files: binaries/*
222251

252+
# ZERO tolerance: any detection on any artifact blocks the release.
253+
# False positives are resolved upstream (Microsoft false-positive
254+
# submission for the exact hashes, then re-run this job — no rebuild),
255+
# never by loosening this gate.
223256
- name: Wait for VirusTotal results
224257
env:
225258
VT_API_KEY: ${{ secrets.VIRUS_TOTAL_SCANNER_API_KEY }}
226259
VT_ANALYSIS: ${{ steps.virustotal.outputs.analysis }}
227260
run: scripts/ci/check-virustotal.sh
228261

262+
# Renders per-binary sha256 + VT links into the notes; only reachable
263+
# after the zero-tolerance gate passed, so "0 detections" is verified.
229264
- name: Append VirusTotal scan links to release notes
230265
env:
231266
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
232267
VERSION: ${{ inputs.version }}
233-
run: |
234-
# Hash the extracted binaries (not the archives — VT indexes binary hashes)
235-
TABLE="\n\n## Security Verification\n\n"
236-
TABLE+="All release binaries scanned with 70+ antivirus engines — **0 detections**.\n\n"
237-
TABLE+="| Binary | SHA-256 | VirusTotal |\n"
238-
TABLE+="|--------|---------|------------|\n"
239-
240-
for bin in binaries/codebase-memory-mcp-*; do
241-
[ -f "$bin" ] || continue
242-
name=$(basename "$bin")
243-
# Skip UI variants and non-binary files
244-
echo "$name" | grep -qE \
245-
'^codebase-memory-mcp-(linux|darwin|windows)-(amd64|arm64)(\.exe)?$' || continue
246-
sha256=$(sha256sum "$bin" 2>/dev/null | awk '{print $1}' \
247-
|| shasum -a 256 "$bin" | awk '{print $1}')
248-
label=$(echo "$name" \
249-
| sed 's/^codebase-memory-mcp-//' \
250-
| sed 's/\.exe$//')
251-
short="${sha256:0:20}..."
252-
vt_url="https://www.virustotal.com/gui/file/${sha256}/detection"
253-
TABLE+="| \`${label}\` | \`${short}\` | [0/72 ✅](${vt_url}) |\n"
254-
done
255-
256-
CURRENT=$(gh release view "$VERSION" \
257-
--json body --jq '.body // ""' --repo "$GITHUB_REPOSITORY")
258-
printf '%s%b' "$CURRENT" "$TABLE" > /tmp/release_notes.md
259-
gh release edit "$VERSION" \
260-
--notes-file /tmp/release_notes.md --repo "$GITHUB_REPOSITORY"
268+
run: bash scripts/ci/append-vt-notes.sh
261269

262270
# ── 8. Publish package wrappers (npm + PyPI) ──────────────────
263271
# Wrappers in pkg/npm and pkg/pypi download the released binary at
@@ -296,7 +304,7 @@ jobs:
296304
297305
# ── npm ──────────────────────────────────────────────────
298306
- name: Setup Node
299-
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
307+
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
300308
with:
301309
node-version: '22'
302310
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@54f647b7e1bb85c95cddabcd46b0c578ec92bc1a # v4
30+
uses: github/codeql-action/upload-sarif@7188fc363630916deb702c7fdcf4e481b751f97a # v4
3131
with:
3232
sarif_file: results.sarif

0 commit comments

Comments
 (0)