Skip to content

Commit f13a133

Browse files
committed
Merge origin/main into fix/snapshot-coherence
Signed-off-by: Martin Vogel <[email protected]>
2 parents 1c1d542 + 8530c8c commit f13a133

1,501 files changed

Lines changed: 664432 additions & 26590 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.

‎.codebase-memory.json‎

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,30 @@
1414
},
1515
{
1616
"id": "engine",
17-
"paths": [".codebase-memory.json", "src/mcp/test_impact*", "src/store/store_impact.*"],
17+
"paths": [
18+
".codebase-memory.json",
19+
"src/mcp/test_impact*",
20+
"src/store/store_impact.*",
21+
"scripts/test-impact/**",
22+
"scripts/ci/test-impact-*"
23+
],
1824
"action": "run_all"
1925
},
2026
{
2127
"id": "build",
22-
"paths": ["scripts/**", "test-infrastructure/**", "pkg/**"],
28+
"paths": [
29+
"scripts/build.sh",
30+
"scripts/env.sh",
31+
"scripts/test.sh",
32+
"scripts/run-tests-parallel.sh",
33+
"scripts/run-test-wave.py",
34+
"scripts/path-safety.sh",
35+
"scripts/clean.sh",
36+
"scripts/suite-failure-report.sh",
37+
"scripts/ci/verify-shard-union.sh",
38+
"scripts/embed-frontend.sh",
39+
"/.gitattributes"
40+
],
2341
"action": "run_all"
2442
},
2543
{
@@ -35,13 +53,31 @@
3553
},
3654
{
3755
"id": "contracts",
38-
"paths": ["tests/**/*.{sh,py,json,txt}"],
56+
"paths": ["tests/**/*.{sh,py,json,txt,ps1}"],
3957
"action": "ignore"
4058
},
4159
{
4260
"id": "notices",
4361
"paths": ["NOTICE*", "CHANGELOG*", "THIRD_PARTY*"],
4462
"action": "ignore"
63+
},
64+
{
65+
"id": "repo-data",
66+
"paths": [
67+
"scripts/**",
68+
"pkg/**",
69+
"test-infrastructure/**",
70+
"docs/**",
71+
"**/*.md",
72+
"graph-ui/**",
73+
"tools/**",
74+
"tests/fuzz/corpus/**",
75+
"/{.clang-format,.clang-tidy,.cppcheck,.gitignore,.gitleaksignore,DCO,Formula}",
76+
"/{flake.lock,flake.nix,glama.json,install.ps1,install.sh,server.json}"
77+
],
78+
"action": "referencing_tests",
79+
"key": "path",
80+
"unreferenced": "ignore"
4581
}
4682
],
4783
"unmapped_files": "run_all",

‎.github/codeql/codeql-config.yml‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# CodeQL scope: the repository's first-party source.
2+
#
3+
# Read by .github/workflows/codeql.yml (every scan, full and PR) and by
4+
# scripts/ci/select-lanes.sh (which changed paths select which language's PR
5+
# scan). Keep the lists plain: one path prefix per line, no globs.
6+
#
7+
# paths / paths-ignore narrow what the INTERPRETED languages extract
8+
# (javascript-typescript, python, actions). For c-cpp they have no effect:
9+
# CodeQL extracts exactly what the traced build compiles. A PR's c-cpp scan
10+
# keeps vendored C out by compiling it before tracing starts (except vendored
11+
# files the PR changes); the full scan on main, the dry run and the release
12+
# traces everything, vendored C included.
13+
name: cbm first-party source
14+
paths:
15+
- src
16+
- internal
17+
- graph-ui
18+
- pkg
19+
- scripts
20+
- tests
21+
- .github
22+
paths-ignore:
23+
- internal/cbm/vendored
24+
- graph-ui/vendor
25+
- graph-ui/fixtures
26+
- graph-ui/verification
27+
- tests/fixtures

‎.github/scancode-constraints.txt‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Constraints for the ScanCode install of the license gate (PIP_CONSTRAINT).
2+
# pluggy 1.7.0 (2026-10-15) no longer finds plugincode 32.0.0's class-level
3+
# hookspecs: scancode then crashes at import with "did not find any
4+
# 'pre_scan' hooks" and the gate fails on every run.
5+
pluggy==1.6.0

‎.github/workflows/_lint.yml‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Reusable: lint only (cppcheck + clang-format).
2-
# Security-static and CodeQL gate are separate — see _security.yml.
2+
# Security-static is separate — see _security.yml; CodeQL — see codeql.yml.
33
name: Lint & Security
44

55
on:
@@ -23,8 +23,11 @@ jobs:
2323
runs-on: ubuntu-24.04
2424
# 15 min proved too tight on a slow runner day and a timed-out lint reads
2525
# as "cancelled", which the release graph must treat as a hard stop; keep
26-
# a bound, but one only a genuine hang can hit (normal runtime ~5 min).
27-
timeout-minutes: 30
26+
# a bound, but one only a genuine hang can hit. 30 min stopped being that
27+
# in 2026-10: single-process cppcheck over a src tree that grew ~60 % in
28+
# files took the lint step from ~8 to 22-29 min, and three runs on
29+
# 2026-10-13 were cancelled at 30 min with cppcheck still alive.
30+
timeout-minutes: 45
2831
steps:
2932
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3033

‎.github/workflows/_security.yml‎

Lines changed: 14 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# Reusable: security-static + CodeQL gate.
1+
# Reusable: security-static + license gate.
2+
# CodeQL is not here: PRs do not run it. It runs on push to main, weekly, and
3+
# inside dry-run.yml / release.yml, which call codeql.yml directly.
24
# Runs independently from lint/test/build — does not block the main pipeline.
35
# Affects overall workflow success status.
46
name: Security Gate
@@ -21,9 +23,13 @@ jobs:
2123
steps:
2224
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2325
- name: "Layer 1: Static allow-list audit"
24-
run: scripts/security-audit.sh
26+
run: |
27+
bash tests/test_security_audit_subprocess_calls.sh
28+
scripts/security-audit.sh
2529
- name: "Layer 6: UI security audit"
26-
run: scripts/security-ui.sh
30+
run: |
31+
bash tests/test_security_ui_urls.sh
32+
scripts/security-ui.sh
2733
- name: "Layer 8: Vendored dependency integrity"
2834
run: scripts/security-vendored.sh
2935

@@ -34,7 +40,11 @@ jobs:
3440
steps:
3541
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3642
- name: Install ScanCode Toolkit
37-
run: pipx install scancode-toolkit
43+
# Pinned: an unpinned install picked up pluggy 1.7.0, which breaks
44+
# scancode at import (see .github/scancode-constraints.txt).
45+
env:
46+
PIP_CONSTRAINT: ${{ github.workspace }}/.github/scancode-constraints.txt
47+
run: pipx install scancode-toolkit==32.5.0
3848
- name: "Gate self-test (a planted violation must be detected)"
3949
run: scripts/license-gate.sh --selftest
4050
- name: "License compliance gate (one finding fails)"
@@ -44,96 +54,3 @@ jobs:
4454
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4555
run: scripts/audit-license-provenance.py
4656

47-
codeql-gate:
48-
if: ${{ inputs.lanes == 'all' || contains(fromJSON(inputs.lanes), 'codeql-gate') }}
49-
runs-on: ubuntu-latest
50-
timeout-minutes: 240
51-
# Without security-events:read this job inherits the workflow's
52-
# contents:read, the code-scanning alert API answers 403, and the gate
53-
# below reported "0 alerts" on every run it has ever made. actions:read is
54-
# what the CodeQL-run poll above needs for the same reason.
55-
permissions:
56-
contents: read
57-
security-events: read
58-
actions: read
59-
steps:
60-
- name: Wait for CodeQL on current commit (max 150 min)
61-
env:
62-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63-
run: |
64-
# On pull_request events github.sha is the synthetic merge commit;
65-
# CodeQL runs are recorded against the PR head SHA.
66-
CURRENT_SHA="${{ github.event.pull_request.head.sha || github.sha }}"
67-
echo "Waiting for CodeQL to complete on $CURRENT_SHA..."
68-
# 300 attempts x 30s = 150 min. The previous budget was 90 x 30s = 45 min,
69-
# which is shorter than CodeQL actually takes on this repository: a measured
70-
# run on PR #1426 (head 7b72652a) completed with conclusion=success after
71-
# 124 min, 7 minutes AFTER this gate had already given up. That marked at
72-
# least five contributor PRs red for a scan that passed. The job's own
73-
# timeout-minutes is 240, so 150 still leaves headroom.
74-
for attempt in $(seq 1 300); do
75-
LATEST=$(gh api "repos/${{ github.repository }}/actions/workflows/codeql.yml/runs?head_sha=$CURRENT_SHA&per_page=1" \
76-
--jq '.workflow_runs[] | "\(.conclusion) \(.status)"' 2>/dev/null | head -1 || echo "")
77-
if [ -z "$LATEST" ]; then
78-
echo " $attempt/300: no run yet..."; sleep 30; continue
79-
fi
80-
CONCLUSION=$(echo "$LATEST" | cut -d' ' -f1)
81-
STATUS=$(echo "$LATEST" | cut -d' ' -f2)
82-
if [ "$STATUS" = "completed" ] && [ "$CONCLUSION" = "success" ]; then
83-
echo "=== CodeQL passed ==="; exit 0
84-
elif [ "$STATUS" = "completed" ]; then
85-
echo "BLOCKED: CodeQL $CONCLUSION"; exit 1
86-
fi
87-
echo " $attempt/300: $STATUS..."; sleep 30
88-
done
89-
echo "BLOCKED: CodeQL timeout"; exit 1
90-
91-
- name: Check for open code scanning alerts
92-
env:
93-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
94-
run: |
95-
# FAIL CLOSED. The previous form was `gh api ... 2>/dev/null || echo "0"`,
96-
# which looks defensive and is the opposite. gh writes the API error
97-
# BODY to stdout, so a 403 made ALERTS the string
98-
# {"message":"Resource not accessible by integration",...,"status":"403"}0
99-
# every `[` comparison then failed as non-integer, the `if` took its
100-
# false branch, and the step printed "CodeQL gate passed (0 alerts)"
101-
# and exited 0. That is exactly how a security gate should NEVER fail:
102-
# silently, in the direction of "everything is fine". An unreadable
103-
# alert list is now an error, not a zero.
104-
# NOTE: this runs in a command substitution, so it must `return`, not
105-
# `exit` -- an `exit` here would only end the subshell and let the
106-
# caller continue with an empty count, recreating the very bug this
107-
# replaces. The callers below check the status explicitly.
108-
count_open_alerts() {
109-
local body status
110-
body=$(gh api 'repos/${{ github.repository }}/code-scanning/alerts?state=open' \
111-
--jq 'length' 2>/dev/null)
112-
status=$?
113-
if [ $status -ne 0 ]; then
114-
echo "BLOCKED: cannot read code scanning alerts (gh exit $status)." >&2
115-
echo " Refusing to treat an unreadable alert list as zero." >&2
116-
echo " Most likely cause: the job lacks security-events:read." >&2
117-
return 1
118-
fi
119-
case "$body" in
120-
''|*[!0-9]*)
121-
echo "BLOCKED: alert count was not a number: ${body:-<empty>}" >&2
122-
return 1
123-
;;
124-
esac
125-
printf '%s' "$body"
126-
}
127-
echo "Waiting 60s for alert API to settle..."
128-
sleep 60
129-
ALERTS=$(count_open_alerts) || exit 1
130-
sleep 15
131-
ALERTS2=$(count_open_alerts) || exit 1
132-
[ "$ALERTS" -lt "$ALERTS2" ] && ALERTS=$ALERTS2
133-
if [ "$ALERTS" -gt 0 ]; then
134-
echo "BLOCKED: $ALERTS open alert(s)"
135-
gh api 'repos/${{ github.repository }}/code-scanning/alerts?state=open' \
136-
--jq '.[] | " #\(.number) [\(.rule.security_severity_level // .rule.severity)] \(.rule.id) — \(.most_recent_instance.location.path):\(.most_recent_instance.location.start_line)"' 2>/dev/null || true
137-
exit 1
138-
fi
139-
echo "=== CodeQL gate passed (0 alerts) ==="

‎.github/workflows/_smoke.yml‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,13 @@ jobs:
9595
steps:
9696
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
9797

98+
# SMOKE_REQUIRE_WRAPPERS=1 needs a Go toolchain for the Go wrapper; the
99+
# macOS runner images have none on PATH.
100+
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
101+
with:
102+
go-version-file: pkg/go/go.mod
103+
cache: false
104+
98105
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
99106
with:
100107
name: binaries-${{ matrix.goos }}-${{ matrix.goarch }}
@@ -118,6 +125,7 @@ jobs:
118125
env:
119126
CBM_SMOKE_ARTIFACT_DIR: ${{ runner.temp }}/cbm-artifact
120127
SMOKE_REQUIRE_UI: "1"
128+
SMOKE_REQUIRE_WRAPPERS: "1"
121129

122130
- name: Security audits
123131
run: |
@@ -175,6 +183,13 @@ jobs:
175183
steps:
176184
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
177185

186+
# SMOKE_REQUIRE_WRAPPERS=1 needs a Go toolchain for the Go wrapper; the
187+
# MSYS2 shell below inherits it (path-type: inherit).
188+
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
189+
with:
190+
go-version-file: pkg/go/go.mod
191+
cache: false
192+
178193
- uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2
179194
with:
180195
msystem: ${{ matrix.arch == 'arm64' && 'CLANGARM64' || 'CLANG64' }}
@@ -224,6 +239,7 @@ jobs:
224239
env:
225240
SMOKE_ARCH: ${{ matrix.arch }}
226241
SMOKE_REQUIRE_UI: "1"
242+
SMOKE_REQUIRE_WRAPPERS: "1"
227243
run: |
228244
export CBM_SMOKE_ARTIFACT_DIR="$(cygpath -u "$RUNNER_TEMP")/cbm-artifact"
229245
bash test-infrastructure/vm/vm-smoke.sh
@@ -279,6 +295,12 @@ jobs:
279295
steps:
280296
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
281297

298+
# SMOKE_REQUIRE_WRAPPERS=1 needs a Go toolchain for the Go wrapper.
299+
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
300+
with:
301+
go-version-file: pkg/go/go.mod
302+
cache: false
303+
282304
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
283305
with:
284306
name: binaries-linux-${{ matrix.arch }}-portable
@@ -301,6 +323,7 @@ jobs:
301323
env:
302324
CBM_SMOKE_ARTIFACT_DIR: ${{ runner.temp }}/cbm-artifact
303325
SMOKE_REQUIRE_UI: "1"
326+
SMOKE_REQUIRE_WRAPPERS: "1"
304327

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

0 commit comments

Comments
 (0)