Files
codebase-memory-mcp/.gitignore
Martin Vogel 3ecac479a6 test(harness): per-test selection and per-test coverage profiles
The test-impact selector has to hand the C runner individual tests, and the
map behind it has to know what each test executes. The runner could do
neither: argv selects whole suites.

Selection. CBM_TEST_ONLY (comma-separated) and CBM_TEST_ONLY_FILE (one per
line; blank lines and # comments allowed) take suite:test tokens, and are
unioned when both are set. A suite no token names never executes its body.
Inside a named suite only the named tests run; the rest are counted as
deselected and the summary reports the count. Argv still selects suites and
the tokens narrow inside that selection, so the parallel harness hands every
per-suite process the same list with no change of its own.

Tokens are strict: one that names a suite this build does not register, or a
test its suite never ran, is printed and fails the run. An unreadable file, a
malformed token, and a selection that names no test stop the run before any
suite. Without a selection the output is byte-identical to before, and
--list-suites ignores the selection.

Coverage. TEST_COVERAGE=1 compiles clang source coverage into our own code
(the one-shot sources, the LSP unity object, the preprocessor; vendored
objects stay uninstrumented) and the runner's hooks into the test runner.
`make test-runner-cov` and `make cbm-cov` build the instrumented runner and
product binary into build/cov. With CBM_TEST_COVERAGE_DIR set the runner
writes <suite>/<test>.parent.profraw for itself around each test, points
LLVM_PROFILE_FILE at <suite>/<test>.%p.profraw for the children the test
spawns, and sends what runs between tests to _setup.<n>.profraw. No other
build compiles any of it.

tests/test_harness_test_only.sh pins the selection contract against the built
runner and runs as Step 2b of scripts/test.sh, before the suites.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-01 22:56:52 +02:00

96 lines
2.1 KiB
Plaintext

# Binaries
code-graph-mcp
/codebase-memory-mcp
bin/
*.exe
*.dll
*.so
*.dylib
# Test artifacts
*.test
*.out
coverage.txt
# Test fixture temp dirs (created by C test suite in CWD instead of /tmp/)
cbm_*/
cli-*/
# IDE
.idea/
.vscode/
*.swp
*.swo
# OS
.DS_Store
Thumbs.db
# Database files (local cache)
*.db
*.db-wal
*.db-shm
# MCP config (user-local, generated by install command)
.mcp.json
# MCP Registry auth tokens
.mcpregistry_*
# Local project memory (Claude Code auto-memory)
memory/
reference/
# Local-only scratch / session notes (never pushed)
private/
# Build artifacts
build/
node_modules/
graph-ui/dist/
# Generated by scripts/embed-frontend.sh into the source tree (the linker needs
# it beside the other UI sources). Removed by scripts/clean.sh; never committed.
src/ui/embedded_assets.c
# Raw coverage profiles. A coverage-instrumented binary (make test-runner-cov,
# cbm-cov) run without LLVM_PROFILE_FILE drops default.profraw in its cwd.
*.profraw
# Generated reports
BENCHMARK_REPORT.md
TEST_PLAN.md
CHANGELOG.md
# Soak test output
soak-results/
# LSP originality-check reference cache (scripts/check-lsp-originality.sh)
.lsp-refs/
# Local npm cache
graph-ui/.npm-cache-local/
# Python bytecode from tests/windows/ harness
__pycache__/
*.pyc
# Local soak-leg outputs (uploaded as CI artifacts, never committed)
soak-results/
soak-results-query-leak/
# ...and ANY ad-hoc run directory at the repo root. The two exact names above did
# not match hand-named runs, so 13 soak directories and 4 memlab files (78 files
# of logs and CSVs) were committed to main by accident in 7808eee. Root-anchored
# so nothing under scripts/ or tests/ is affected — scripts/soak-legs.sh and
# scripts/soak-test.sh stay tracked.
/soak*/
/memlab-*
# Compiled Go wrapper binary. `go build` in pkg/go drops the executable beside
# its sources; one was committed by accident (8.8 MB ELF, flagged by OSSF
# Scorecard as a binary artifact in source). Source only, never the build.
/pkg/go/codebase-memory-mcp
/pkg/go/codebase-memory-mcp.exe
# Nix build symlinks (nix build → ./result, ./result-1, …)
/result
/result-*