Skip to content

Commit 8af291d

Browse files
authored
Merge branch 'main' into fix/2433-server-discover-probe-log
2 parents 6bc7ade + 4c80d89 commit 8af291d

1,664 files changed

Lines changed: 790593 additions & 24128 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: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
{
2+
"test_impact": {
3+
"version": 1,
4+
"tests": {
5+
"presets": {
6+
"c-cbm": true
7+
}
8+
},
9+
"rules": [
10+
{
11+
"id": "harness",
12+
"paths": ["tests/test_framework.h", "tests/test_helpers.*", "tests/test_main.c"],
13+
"action": "run_all"
14+
},
15+
{
16+
"id": "engine",
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+
],
24+
"action": "run_all"
25+
},
26+
{
27+
"id": "build",
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+
],
41+
"action": "run_all"
42+
},
43+
{
44+
"id": "grammars",
45+
"paths": ["internal/cbm/vendored/**"],
46+
"action": "run_all"
47+
},
48+
{
49+
"id": "fixtures",
50+
"paths": ["tests/fixtures/*/**"],
51+
"action": "referencing_tests",
52+
"key": "path_segment:2"
53+
},
54+
{
55+
"id": "contracts",
56+
"paths": ["tests/**/*.{sh,py,json,txt,ps1}"],
57+
"action": "ignore"
58+
},
59+
{
60+
"id": "notices",
61+
"paths": ["NOTICE*", "CHANGELOG*", "THIRD_PARTY*"],
62+
"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"
81+
}
82+
],
83+
"unmapped_files": "run_all",
84+
"coverage": {
85+
"compatibility_paths": [
86+
"tests/test_framework.h",
87+
"tests/test_main.c",
88+
"tests/test_helpers.h",
89+
"Makefile.cbm",
90+
"scripts/test-impact/coverage-map.py",
91+
"scripts/test-impact/coverage-merge.py"
92+
]
93+
}
94+
}
95+
}

‎.gitattributes‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,10 @@ scripts/hooks/pre-commit text eol=lf
1515
# Chialisp grammar corpus: one case asserts CRLF comment termination, so this
1616
# file must keep its exact bytes on every platform (no eol conversion). (#919)
1717
tools/tree-sitter-chialisp/test/corpus/comments.txt -text
18+
19+
# llvm-profdata text captures: tests/test_profile_text_parser.py checks their
20+
# SHA-256, so they keep their exact bytes on every platform (no eol conversion).
21+
tests/fixtures/profile_text/*.proftext -text
22+
# Golden profile-map outputs: tests/test_profile_map_v2.py compares the
23+
# producer's LF bytes against them, so they keep their exact bytes too.
24+
tests/fixtures/profile_map_v2/*.tsv -text

‎.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: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,31 @@
33
name: Lint & Security
44

55
on:
6-
workflow_call: {}
6+
workflow_call:
7+
inputs:
8+
lanes:
9+
description: 'PR lane selection (scripts/ci/select-lanes.sh JSON list); "all" = every job (dry run, release)'
10+
type: string
11+
default: all
712

813
permissions:
914
contents: read
1015

1116
jobs:
1217
lint:
18+
if: ${{ inputs.lanes == 'all' || contains(fromJSON(inputs.lanes), 'lint') }}
1319
# Pinned, not ubuntu-latest: the LLVM install below adds an
1420
# apt.llvm.org llvm-toolchain-NOBLE repo, which is 24.04 by name. When
1521
# GitHub moves ubuntu-latest to the next LTS this job breaks on a day
1622
# nobody chose. Pin the runner to the release the repo line already names.
1723
runs-on: ubuntu-24.04
1824
# 15 min proved too tight on a slow runner day and a timed-out lint reads
1925
# as "cancelled", which the release graph must treat as a hard stop; keep
20-
# a bound, but one only a genuine hang can hit (normal runtime ~5 min).
21-
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
2231
steps:
2332
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2433

@@ -64,6 +73,7 @@ jobs:
6473
# provability (never suppressed — the NOLINT ban applies here too).
6574
# Vendored-tree diagnostics are path-filtered, mirroring .cppcheck.
6675
lint-mem:
76+
if: ${{ inputs.lanes == 'all' || contains(fromJSON(inputs.lanes), 'lint-mem') }}
6777
# Pinned for the same reason as `lint`: llvm-toolchain-noble-21 below.
6878
runs-on: ubuntu-24.04
6979
timeout-minutes: 60

‎.github/workflows/_security.yml‎

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
name: Security Gate
55

66
on:
7-
workflow_call: {}
7+
workflow_call:
8+
inputs:
9+
lanes:
10+
description: 'PR lane selection (scripts/ci/select-lanes.sh JSON list); "all" = every job (dry run, release)'
11+
type: string
12+
default: all
813

914
permissions:
1015
contents: read
@@ -16,19 +21,28 @@ jobs:
1621
steps:
1722
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
1823
- name: "Layer 1: Static allow-list audit"
19-
run: scripts/security-audit.sh
24+
run: |
25+
bash tests/test_security_audit_subprocess_calls.sh
26+
scripts/security-audit.sh
2027
- name: "Layer 6: UI security audit"
21-
run: scripts/security-ui.sh
28+
run: |
29+
bash tests/test_security_ui_urls.sh
30+
scripts/security-ui.sh
2231
- name: "Layer 8: Vendored dependency integrity"
2332
run: scripts/security-vendored.sh
2433

2534
license-gate:
35+
if: ${{ inputs.lanes == 'all' || contains(fromJSON(inputs.lanes), 'license-gate') }}
2636
runs-on: ubuntu-latest
2737
timeout-minutes: 240
2838
steps:
2939
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3040
- name: Install ScanCode Toolkit
31-
run: pipx install scancode-toolkit
41+
# Pinned: an unpinned install picked up pluggy 1.7.0, which breaks
42+
# scancode at import (see .github/scancode-constraints.txt).
43+
env:
44+
PIP_CONSTRAINT: ${{ github.workspace }}/.github/scancode-constraints.txt
45+
run: pipx install scancode-toolkit==32.5.0
3246
- name: "Gate self-test (a planted violation must be detected)"
3347
run: scripts/license-gate.sh --selftest
3448
- name: "License compliance gate (one finding fails)"
@@ -39,6 +53,7 @@ jobs:
3953
run: scripts/audit-license-provenance.py
4054

4155
codeql-gate:
56+
if: ${{ inputs.lanes == 'all' || contains(fromJSON(inputs.lanes), 'codeql-gate') }}
4257
runs-on: ubuntu-latest
4358
timeout-minutes: 240
4459
# Without security-events:read this job inherits the workflow's

‎.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)