Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)
[![CI](https://img.shields.io/github/actions/workflow/status/DeusData/codebase-memory-mcp/dry-run.yml?label=CI)](https://github.com/DeusData/codebase-memory-mcp/actions/workflows/dry-run.yml)
[![Tests](https://img.shields.io/badge/tests-6768_passing-brightgreen)](https://github.com/DeusData/codebase-memory-mcp)
[![Languages](https://img.shields.io/badge/languages-158-orange)](https://github.com/DeusData/codebase-memory-mcp)
[![Languages](https://img.shields.io/badge/languages-161-orange)](https://github.com/DeusData/codebase-memory-mcp)
[![Hybrid LSP](https://img.shields.io/badge/Hybrid_LSP-10_languages-blue)](#hybrid-lsp)
[![Agents](https://img.shields.io/badge/agent_surfaces-43-purple)](https://github.com/DeusData/codebase-memory-mcp)
[![Pure C](https://img.shields.io/badge/pure_C-no_language_runtime-blue)](https://github.com/DeusData/codebase-memory-mcp)
Expand Down
2 changes: 1 addition & 1 deletion tests/repro/repro_call_argument_matrix_b.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Exhaustive call-argument reproduction matrix, CBMLanguage 80..163.
* Exhaustive call-argument reproduction matrix, CBMLanguage 80..164.
*
* Every language in this numeric range whose live spec has call-node metadata
* owns one TEST row below. Semantic applications are exercised twice: once as
Expand Down
12 changes: 10 additions & 2 deletions tests/test_language_count_contract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,15 @@ for path in "${SURFACES[@]}"; do
failures=$((failures + 1))
continue
fi
hits=$(grep -oE '[0-9]{2,3} languages' "$path" | grep -oE '^[0-9]+' | sort -u || true)
# Two claim forms. Prose says "<N> languages"; a shields.io badge says
# "languages-<N>-colour". The badge was MISSED by the first version of this
# contract: it gated only the prose form, so README's badge sat three behind
# the prose in the same file while this test reported success. The lesson is
# that the enumeration and the gate must not share a regex — if they do, the
# gate can only ever confirm what the enumeration already saw.
hits=$( { grep -oE '[0-9]{2,3} languages' "$path" | grep -oE '^[0-9]+'
grep -oiE 'languages-[0-9]{2,3}' "$path" | grep -oE '[0-9]+$'
} | sort -u || true)
if [[ -z "$hits" ]]; then
echo "FAIL: $path is registered as a language-count surface but states no" \
"count — either it lost the claim (drop it from SURFACES) or the" \
Expand Down Expand Up @@ -113,7 +121,7 @@ while IFS= read -r path; do
"SURFACES so it stays in step with the registry, or to EXEMPT with a" \
"note saying what its number actually counts." >&2
failures=$((failures + 1))
done < <(git grep -IlE '[0-9]{2,3} languages' || true)
done < <(git grep -IlE '[0-9]{2,3} languages|languages-[0-9]{2,3}' || true)

if ((failures > 0)); then
echo "FAIL: $failures language-count contract violation(s)" >&2
Expand Down
Loading