feat(ms-ai-architect): wire kb-update test suite into run-e2e dispatch [skip-docs]

Step 12 — adds --kb-update flag to tests/run-e2e.sh and a Bash 3.2-compatible
shim test-kb-update.sh that runs `node --test tests/kb-update/*.test.mjs`
(shell-glob form; Node 25 rejects directory-form arguments). Shim translates
node --test exit code + parsed pass/fail counts into the e2e-helpers.sh
suite counters (init_suite/print_summary).

Verification:
- Playground baseline 271 PASS unchanged before/after edit
- bash tests/run-e2e.sh --kb-update: exits 0, 110/110 inner tests pass
- bash tests/run-e2e.sh --all: kb-update suite included
- Pre-existing ROS-fixture absence (tests/fixtures/ros-analysis/) is
  unrelated to this change and remains for separate handling

Wave 5 of 7 in v1.12.0 auto-KB-update plan.
Plan: .claude/projects/2026-05-04-kb-update-fork-and-own/plan.md (Step 12)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-05-05 11:32:47 +02:00
commit 97d1101e91
2 changed files with 53 additions and 2 deletions

View file

@ -1,6 +1,6 @@
#!/bin/bash
# run-e2e.sh — Run E2E regression tests for agent outputs
# Usage: bash tests/run-e2e.sh [--security] [--cost] [--summary] [--ros] [--ai-act] [--playground] [--all]
# Usage: bash tests/run-e2e.sh [--security] [--cost] [--summary] [--ros] [--ai-act] [--playground] [--kb-update] [--all]
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
@ -17,6 +17,7 @@ RUN_SUMMARY=false
RUN_ROS=false
RUN_AI_ACT=false
RUN_PLAYGROUND=false
RUN_KB_UPDATE=false
if [ $# -eq 0 ] || [ "${1:-}" = "--all" ]; then
RUN_SECURITY=true
@ -25,6 +26,7 @@ if [ $# -eq 0 ] || [ "${1:-}" = "--all" ]; then
RUN_ROS=true
RUN_AI_ACT=true
RUN_PLAYGROUND=true
RUN_KB_UPDATE=true
else
while [ $# -gt 0 ]; do
case "$1" in
@ -34,8 +36,9 @@ else
--ros) RUN_ROS=true ;;
--ai-act) RUN_AI_ACT=true ;;
--playground) RUN_PLAYGROUND=true ;;
--kb-update) RUN_KB_UPDATE=true ;;
*)
echo "Usage: bash tests/run-e2e.sh [--security] [--cost] [--summary] [--ros] [--ai-act] [--playground] [--all]"
echo "Usage: bash tests/run-e2e.sh [--security] [--cost] [--summary] [--ros] [--ai-act] [--playground] [--kb-update] [--all]"
exit 1
;;
esac
@ -75,6 +78,10 @@ if $RUN_PLAYGROUND; then
bash "$SCRIPT_DIR/test-playground-parsers.sh" || FAILURES=$((FAILURES + 1))
fi
if $RUN_KB_UPDATE; then
bash "$SCRIPT_DIR/test-kb-update.sh" || FAILURES=$((FAILURES + 1))
fi
echo -e "${CYAN}══════════════════════════════════════════════${NC}"
if [ "$FAILURES" -eq 0 ]; then
echo -e "${GREEN} All E2E suites passed${NC}"