feat(nav): enforce strict embedding length guards and autonomous brain-first navigation

This commit is contained in:
2026-04-27 23:09:22 +02:00
parent ee3de811d3
commit 7277f27fae
4 changed files with 62 additions and 106 deletions

View File

@@ -20,8 +20,11 @@ else
filename=$(basename "$file")
# Heuristic: Try to find a matching unit test
test_file="tests/unit/test_${filename}"
core_test_file="tests/core/test_${filename}"
if [ -f "$test_file" ]; then
TEST_TARGETS="$TEST_TARGETS $test_file"
elif [ -f "$core_test_file" ]; then
TEST_TARGETS="$TEST_TARGETS $core_test_file"
else
# If no direct unit test, fallback to running all unit tests to be safe
echo "⚠️ No direct unit test found for $file, falling back to all unit tests."
@@ -41,7 +44,7 @@ if [ -z "$TEST_TARGETS" ]; then
fi
echo "🧪 Running tests on: $TEST_TARGETS"
venv/bin/pytest $TEST_TARGETS --cov=GramAddict --cov-report=xml -q
PYTHONPATH=. venv/bin/pytest $TEST_TARGETS --cov=GramAddict --cov-report=xml -q
echo ""
echo "========================================"