Skip to content

Commit 79f674e

Browse files
committed
Merge origin/main into fix/termux-portable-guard
Brings the branch up to current main (it was 2061 commits behind) so the new Step 0x2 runs inside the current scripts/test.sh. No conflicts. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2 parents 8b2b0d7 + edc2301 commit 79f674e

1,889 files changed

Lines changed: 1977048 additions & 714690 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.

‎.claude-plugin/marketplace.json‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "codebase-memory",
3+
"description": "The codebase-memory-mcp code knowledge graph server, as a Claude Code plugin.",
4+
"owner": {
5+
"name": "DeusData",
6+
"url": "https://github.com/DeusData"
7+
},
8+
"plugins": [
9+
{
10+
"name": "codebase-memory",
11+
"source": "./plugin",
12+
"description": "Codebase knowledge graph for AI agents: sub-ms queries, 99% fewer tokens."
13+
}
14+
]
15+
}

‎.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/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/dependabot.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,9 @@ updates:
44
directory: "/"
55
schedule:
66
interval: "weekly"
7+
groups:
8+
# init and analyze must run the same CodeQL Action version within a job, and
9+
# upload-sarif is kept in step with them, so one PR bumps all three.
10+
codeql-action:
11+
patterns:
12+
- "github/codeql-action*"

‎.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/_build.yml‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ jobs:
4141
goarch: arm64
4242
cc: gcc
4343
cxx: g++
44-
- os: macos-14
44+
# The macOS minimum (14.0) is pinned in Makefile.cbm, not inherited
45+
# from this runner's SDK, so both darwin binaries still start on macOS 14.
46+
- os: macos-15
4547
goos: darwin
4648
goarch: arm64
4749
cc: cc
@@ -64,7 +66,8 @@ jobs:
6466

6567
- name: Install deps (Ubuntu)
6668
if: startsWith(matrix.os, 'ubuntu')
67-
run: sudo apt-get update && sudo apt-get install -y zlib1g-dev
69+
timeout-minutes: 10
70+
run: APT_RETRIES=3; [ -f /etc/apt/apt-mirrors.txt ] && APT_RETRIES=0; sudo apt-get -o Acquire::Retries=$APT_RETRIES -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 --error-on=any update && sudo apt-get -o Acquire::Retries=$APT_RETRIES -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 install -y zlib1g-dev
6871

6972
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
7073
with:
@@ -117,7 +120,7 @@ jobs:
117120
steps:
118121
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
119122

120-
- uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2
123+
- uses: msys2/setup-msys2@ec48f7c5447b3140e2b088413ae3a55687bccb6e # v2
121124
with:
122125
msystem: CLANG64
123126
path-type: inherit
@@ -179,7 +182,7 @@ jobs:
179182
steps:
180183
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
181184

182-
- uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2
185+
- uses: msys2/setup-msys2@ec48f7c5447b3140e2b088413ae3a55687bccb6e # v2
183186
with:
184187
msystem: CLANGARM64
185188
path-type: inherit
@@ -248,7 +251,8 @@ jobs:
248251
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
249252

250253
- name: Install deps
251-
run: sudo apt-get update && sudo apt-get install -y zlib1g-dev
254+
timeout-minutes: 10
255+
run: APT_RETRIES=3; [ -f /etc/apt/apt-mirrors.txt ] && APT_RETRIES=0; sudo apt-get -o Acquire::Retries=$APT_RETRIES -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 --error-on=any update && sudo apt-get -o Acquire::Retries=$APT_RETRIES -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 install -y zlib1g-dev
252256

253257
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
254258
with:

‎.github/workflows/_lint.yml‎

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,33 @@
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:
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:
13-
runs-on: ubuntu-latest
18+
if: ${{ inputs.lanes == 'all' || contains(fromJSON(inputs.lanes), 'lint') }}
19+
# Pinned, not ubuntu-latest: the LLVM install below adds an
20+
# apt.llvm.org llvm-toolchain-NOBLE repo, which is 24.04 by name. When
21+
# GitHub moves ubuntu-latest to the next LTS this job breaks on a day
22+
# nobody chose. Pin the runner to the release the repo line already names.
23+
runs-on: ubuntu-24.04
1424
# 15 min proved too tight on a slow runner day and a timed-out lint reads
1525
# as "cancelled", which the release graph must treat as a hard stop; keep
16-
# a bound, but one only a genuine hang can hit (normal runtime ~5 min).
17-
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
1831
steps:
1932
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2033

@@ -24,14 +37,16 @@ jobs:
2437
run: bash scripts/check-no-test-skips.sh
2538

2639
- name: Install build deps
27-
run: sudo apt-get update && sudo apt-get install -y zlib1g-dev cmake
40+
timeout-minutes: 10
41+
run: APT_RETRIES=3; [ -f /etc/apt/apt-mirrors.txt ] && APT_RETRIES=0; sudo apt-get -o Acquire::Retries=$APT_RETRIES -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 --error-on=any update && sudo apt-get -o Acquire::Retries=$APT_RETRIES -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 install -y zlib1g-dev cmake
2842

2943
- name: Install LLVM 20
44+
timeout-minutes: 10
3045
run: |
3146
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
3247
echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-20 main" | sudo tee /etc/apt/sources.list.d/llvm-20.list
33-
sudo apt-get update
34-
sudo apt-get install -y clang-format-20
48+
APT_RETRIES=3; [ -f /etc/apt/apt-mirrors.txt ] && APT_RETRIES=0; sudo apt-get -o Acquire::Retries=$APT_RETRIES -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 --error-on=any update
49+
sudo apt-get -o Acquire::Retries=$APT_RETRIES -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 install -y clang-format-20
3550
3651
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
3752
id: cppcheck-cache
@@ -60,20 +75,24 @@ jobs:
6075
# provability (never suppressed — the NOLINT ban applies here too).
6176
# Vendored-tree diagnostics are path-filtered, mirroring .cppcheck.
6277
lint-mem:
63-
runs-on: ubuntu-latest
78+
if: ${{ inputs.lanes == 'all' || contains(fromJSON(inputs.lanes), 'lint-mem') }}
79+
# Pinned for the same reason as `lint`: llvm-toolchain-noble-21 below.
80+
runs-on: ubuntu-24.04
6481
timeout-minutes: 60
6582
steps:
6683
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
6784

6885
- name: Install build deps
69-
run: sudo apt-get update && sudo apt-get install -y zlib1g-dev
86+
timeout-minutes: 10
87+
run: APT_RETRIES=3; [ -f /etc/apt/apt-mirrors.txt ] && APT_RETRIES=0; sudo apt-get -o Acquire::Retries=$APT_RETRIES -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 --error-on=any update && sudo apt-get -o Acquire::Retries=$APT_RETRIES -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 install -y zlib1g-dev
7088

7189
- name: Install LLVM 21 (pinned analyzer toolchain)
90+
timeout-minutes: 10
7291
run: |
7392
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
7493
echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-21 main" | sudo tee /etc/apt/sources.list.d/llvm-21.list
75-
sudo apt-get update
76-
sudo apt-get install -y clang-tidy-21
94+
APT_RETRIES=3; [ -f /etc/apt/apt-mirrors.txt ] && APT_RETRIES=0; sudo apt-get -o Acquire::Retries=$APT_RETRIES -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 --error-on=any update
95+
sudo apt-get -o Acquire::Retries=$APT_RETRIES -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 install -y clang-tidy-21
7796
7897
- name: Memory-analyzer gate
7998
run: scripts/ci/lint-mem.sh clang-tidy-21

‎.github/workflows/_memwaste.yml‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ jobs:
3737
steps:
3838
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3939
- name: Install deps
40-
run: sudo apt-get update && sudo apt-get install -y zlib1g-dev python3 clang llvm
40+
timeout-minutes: 10
41+
run: APT_RETRIES=3; [ -f /etc/apt/apt-mirrors.txt ] && APT_RETRIES=0; sudo apt-get -o Acquire::Retries=$APT_RETRIES -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 --error-on=any update && sudo apt-get -o Acquire::Retries=$APT_RETRIES -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 install -y zlib1g-dev python3 clang llvm
4142
- name: Event lane on this repository
4243
run: |
4344
# `cmd | tee` reports TEE's status: without this a failing lane
@@ -66,7 +67,8 @@ jobs:
6667
steps:
6768
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
6869
- name: Install deps
69-
run: sudo apt-get update && sudo apt-get install -y zlib1g-dev python3 clang llvm
70+
timeout-minutes: 10
71+
run: APT_RETRIES=3; [ -f /etc/apt/apt-mirrors.txt ] && APT_RETRIES=0; sudo apt-get -o Acquire::Retries=$APT_RETRIES -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 --error-on=any update && sudo apt-get -o Acquire::Retries=$APT_RETRIES -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 install -y zlib1g-dev python3 clang llvm
7072
- name: CPU scaling lane (src/ at 2x against 4x)
7173
# Report-only: the script exits 1 when it flags a super-linear function.
7274
continue-on-error: true
@@ -93,7 +95,8 @@ jobs:
9395
steps:
9496
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
9597
- name: Install deps
96-
run: sudo apt-get update && sudo apt-get install -y zlib1g-dev python3 clang llvm
98+
timeout-minutes: 10
99+
run: APT_RETRIES=3; [ -f /etc/apt/apt-mirrors.txt ] && APT_RETRIES=0; sudo apt-get -o Acquire::Retries=$APT_RETRIES -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 --error-on=any update && sudo apt-get -o Acquire::Retries=$APT_RETRIES -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 install -y zlib1g-dev python3 clang llvm
97100
- name: Access lane on this repository
98101
run: |
99102
# `cmd | tee` reports TEE's status: without this a failing lane
@@ -115,7 +118,7 @@ jobs:
115118

116119
event-macos:
117120
if: ${{ inputs.mode == 'full' }}
118-
runs-on: macos-14
121+
runs-on: macos-15
119122
timeout-minutes: 60
120123
steps:
121124
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -146,7 +149,7 @@ jobs:
146149
timeout-minutes: 90
147150
steps:
148151
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
149-
- uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2
152+
- uses: msys2/setup-msys2@ec48f7c5447b3140e2b088413ae3a55687bccb6e # v2
150153
with:
151154
msystem: CLANG64
152155
path-type: inherit

0 commit comments

Comments
 (0)