mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-10-21 05:59:35 +08:00
The first commit of this branch is the Smart CI change as of the rebase
onto 9f85f104. A review of it found places where the engine could run
fewer tests than a change needs; each now runs everything or selects the
right tests, with a test that fails when its fix is reverted.
Engine:
- A `#define NAME "literal"` line counted as naming a role but selected
nobody, so the tests that start the blocking-git probe through their
marker macros would not have run. The scan now follows NAME, as a whole
word, to the code that uses it, through chains of up to 4 macros; a
define it cannot follow runs everything.
- main dispatches through the role table, so no edge leads from main to a
handler. A table entry the engine cannot read, or whose handler is not
exactly one function, was skipped; it now runs everything.
- In a runner file, only a test case names a role's literal. The runner's
own helper that reads the marker no longer counts as a spawner, so a
role only the runner names runs everything again.
- A handler reached first by a parse gap or by the spawn lift was never
lifted. Role lifts and parse gaps now run to a fixpoint, before the
runner check and again after the spawn lift.
- A reached sink that main calls (the blocking-git probe) counted as a way
into main and hid the real one: #2644 now names the start-up path main
-> cbm_index_supervisor_capture_build_fingerprint.
- No pointer past the end of a role line; the RUNNER_REACHED note clamps
its prefix.
CI:
- pkg/npm/README.md, which test_cli reads, runs the test legs instead of
the docs tier.
- The build rule lists the harness scripts the test legs run:
run-test-wave.py, path-safety.sh, clean.sh.
- The revert guard rejects the ancestor's coverage when a diff fails.
- The vetoed selection is uploaded (test-selection-vetoed).
Docs: SMART_CI.md states the new fail-safe cases, the version that lacks
the new config keys, the selection base, and that the narrowed leg builds
with gcc while the coverage comes from clang.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
96 lines
2.4 KiB
JSON
96 lines
2.4 KiB
JSON
{
|
|
"test_impact": {
|
|
"version": 1,
|
|
"tests": {
|
|
"presets": {
|
|
"c-cbm": true
|
|
}
|
|
},
|
|
"rules": [
|
|
{
|
|
"id": "harness",
|
|
"paths": ["tests/test_framework.h", "tests/test_helpers.*", "tests/test_main.c"],
|
|
"action": "run_all"
|
|
},
|
|
{
|
|
"id": "engine",
|
|
"paths": [
|
|
".codebase-memory.json",
|
|
"src/mcp/test_impact*",
|
|
"src/store/store_impact.*",
|
|
"scripts/test-impact/**",
|
|
"scripts/ci/test-impact-*"
|
|
],
|
|
"action": "run_all"
|
|
},
|
|
{
|
|
"id": "build",
|
|
"paths": [
|
|
"scripts/build.sh",
|
|
"scripts/env.sh",
|
|
"scripts/test.sh",
|
|
"scripts/run-tests-parallel.sh",
|
|
"scripts/run-test-wave.py",
|
|
"scripts/path-safety.sh",
|
|
"scripts/clean.sh",
|
|
"scripts/suite-failure-report.sh",
|
|
"scripts/ci/verify-shard-union.sh",
|
|
"scripts/embed-frontend.sh",
|
|
"/.gitattributes"
|
|
],
|
|
"action": "run_all"
|
|
},
|
|
{
|
|
"id": "grammars",
|
|
"paths": ["internal/cbm/vendored/**"],
|
|
"action": "run_all"
|
|
},
|
|
{
|
|
"id": "fixtures",
|
|
"paths": ["tests/fixtures/*/**"],
|
|
"action": "referencing_tests",
|
|
"key": "path_segment:2"
|
|
},
|
|
{
|
|
"id": "contracts",
|
|
"paths": ["tests/**/*.{sh,py,json,txt,ps1}"],
|
|
"action": "ignore"
|
|
},
|
|
{
|
|
"id": "notices",
|
|
"paths": ["NOTICE*", "CHANGELOG*", "THIRD_PARTY*"],
|
|
"action": "ignore"
|
|
},
|
|
{
|
|
"id": "repo-data",
|
|
"paths": [
|
|
"scripts/**",
|
|
"pkg/**",
|
|
"test-infrastructure/**",
|
|
"docs/**",
|
|
"**/*.md",
|
|
"graph-ui/**",
|
|
"tools/**",
|
|
"tests/fuzz/corpus/**",
|
|
"/{.clang-format,.clang-tidy,.cppcheck,.gitignore,.gitleaksignore,DCO,Formula}",
|
|
"/{flake.lock,flake.nix,glama.json,install.ps1,install.sh,server.json}"
|
|
],
|
|
"action": "referencing_tests",
|
|
"key": "path",
|
|
"unreferenced": "ignore"
|
|
}
|
|
],
|
|
"unmapped_files": "run_all",
|
|
"coverage": {
|
|
"compatibility_paths": [
|
|
"tests/test_framework.h",
|
|
"tests/test_main.c",
|
|
"tests/test_helpers.h",
|
|
"Makefile.cbm",
|
|
"scripts/test-impact/coverage-map.py",
|
|
"scripts/test-impact/coverage-merge.py"
|
|
]
|
|
}
|
|
}
|
|
}
|