C2 KOMPLETT (C2.1->C2.4). C2.4 var verifikasjon, ikke nybygg: privat-greinen
i onboarding kom i 6e1fc6d (FOER C2.1), saa audit §167-onboarding-residu var
allerede lukket i kode. Denne oekta beviser + laaser det.
- tests/test-onboarding-parity.sh (NY): 14 asserts mot KILDEN
(onboarding-agent.md Phase 1; onboarding er interaktivt AskUserQuestion ->
ingen output-fixture). Dekker sektortype-forgrening, privat sektor-grein
(bank slipper «Annet»), privat reg-sett (DORA/Finansforetaksloven/
Finanstilsynets IKT-forskrift/Verdipapirhandelloven/Hvitvaskingsloven), og
at private aldri spoerres Offentleglova/Arkivloven. TDD roed->groenn:
strippet offentlig-only-kopi -> 13/14 FAIL; ekte fil -> 14/14 PASS.
- tests/run-e2e.sh: wiret --onboarding (med i --all).
- §167 (d) bevisst IKKE bygget: «egen dataklassifiserings-taksonomi for privat
Fase 3» er gull-plating utenfor K4 (dagens taksonomi er alminnelig norsk
bedrifts-klassifisering; privat fullfoerer Fase 3 uhindret).
- Omdoept feildoept docs/onboarding-ros-analysis.md ->
docs/windows-clone-to-pr-ros-guide.md (Windows clone-to-PR-bidragsyterguide,
ikke onboarding-analyse); plan+brief-ref oppdatert.
Verifisert: onboarding-parity 14/14 (NY) · validate 239/0/0 · e2e alle suiter ·
discovery 13/13 · test-hooks 11/11 · kb-integrity 192/192 (220 baseline-warns) ·
gitleaks 3 PRE-EKSISTERENDE (playground/vendor/).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
111 lines
3.6 KiB
Bash
Executable file
111 lines
3.6 KiB
Bash
Executable file
#!/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] [--kb-update] [--onboarding] [--all]
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
|
|
RED='\033[0;31m'
|
|
GREEN='\033[0;32m'
|
|
CYAN='\033[0;36m'
|
|
NC='\033[0m'
|
|
|
|
# Parse arguments
|
|
RUN_SECURITY=false
|
|
RUN_COST=false
|
|
RUN_SUMMARY=false
|
|
RUN_ROS=false
|
|
RUN_AI_ACT=false
|
|
RUN_PLAYGROUND=false
|
|
RUN_KB_UPDATE=false
|
|
RUN_ONBOARDING=false
|
|
|
|
if [ $# -eq 0 ] || [ "${1:-}" = "--all" ]; then
|
|
RUN_SECURITY=true
|
|
RUN_COST=true
|
|
RUN_SUMMARY=true
|
|
RUN_ROS=true
|
|
RUN_AI_ACT=true
|
|
RUN_PLAYGROUND=true
|
|
RUN_KB_UPDATE=true
|
|
RUN_ONBOARDING=true
|
|
else
|
|
while [ $# -gt 0 ]; do
|
|
case "$1" in
|
|
--security) RUN_SECURITY=true ;;
|
|
--cost) RUN_COST=true ;;
|
|
--summary) RUN_SUMMARY=true ;;
|
|
--ros) RUN_ROS=true ;;
|
|
--ai-act) RUN_AI_ACT=true ;;
|
|
--playground) RUN_PLAYGROUND=true ;;
|
|
--kb-update) RUN_KB_UPDATE=true ;;
|
|
--onboarding) RUN_ONBOARDING=true ;;
|
|
*)
|
|
echo "Usage: bash tests/run-e2e.sh [--security] [--cost] [--summary] [--ros] [--ai-act] [--playground] [--kb-update] [--onboarding] [--all]"
|
|
exit 1
|
|
;;
|
|
esac
|
|
shift
|
|
done
|
|
fi
|
|
|
|
echo -e "${CYAN}╔══════════════════════════════════════════════╗${NC}"
|
|
echo -e "${CYAN}║ MS AI Architect — E2E Regression Tests ║${NC}"
|
|
echo -e "${CYAN}╚══════════════════════════════════════════════╝${NC}"
|
|
echo ""
|
|
|
|
FAILURES=0
|
|
|
|
if $RUN_SECURITY; then
|
|
bash "$SCRIPT_DIR/test-security-output.sh" || FAILURES=$((FAILURES + 1))
|
|
fi
|
|
|
|
if $RUN_COST; then
|
|
bash "$SCRIPT_DIR/test-cost-output.sh" || FAILURES=$((FAILURES + 1))
|
|
fi
|
|
|
|
if $RUN_SUMMARY; then
|
|
bash "$SCRIPT_DIR/test-summary-output.sh" || FAILURES=$((FAILURES + 1))
|
|
fi
|
|
|
|
if $RUN_ROS; then
|
|
bash "$SCRIPT_DIR/test-ros-output.sh" || FAILURES=$((FAILURES + 1))
|
|
fi
|
|
|
|
if $RUN_AI_ACT; then
|
|
bash "$SCRIPT_DIR/test-ai-act-output.sh" || FAILURES=$((FAILURES + 1))
|
|
fi
|
|
|
|
if $RUN_ONBOARDING; then
|
|
bash "$SCRIPT_DIR/test-onboarding-parity.sh" || FAILURES=$((FAILURES + 1))
|
|
fi
|
|
|
|
if $RUN_PLAYGROUND; then
|
|
bash "$SCRIPT_DIR/test-playground-v3.sh" || FAILURES=$((FAILURES + 1))
|
|
bash "$SCRIPT_DIR/test-playground-parsers.sh" || FAILURES=$((FAILURES + 1))
|
|
bash "$SCRIPT_DIR/test-playground-migrations.sh" || FAILURES=$((FAILURES + 1))
|
|
bash "$SCRIPT_DIR/test-playground-fingerprints.sh" || FAILURES=$((FAILURES + 1))
|
|
bash "$SCRIPT_DIR/test-playground-projectview.sh" || FAILURES=$((FAILURES + 1))
|
|
bash "$SCRIPT_DIR/test-playground-actions.sh" || FAILURES=$((FAILURES + 1))
|
|
fi
|
|
|
|
if $RUN_KB_UPDATE; then
|
|
echo -e "${CYAN}─── KB Update utilities ───${NC}"
|
|
PLUGIN_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
if (cd "$PLUGIN_ROOT" && node --test tests/kb-update/*.test.mjs); then
|
|
echo -e "${GREEN}KB Update: PASS${NC}"
|
|
else
|
|
echo -e "${RED}KB Update: FAIL${NC}"
|
|
FAILURES=$((FAILURES + 1))
|
|
fi
|
|
fi
|
|
|
|
echo -e "${CYAN}══════════════════════════════════════════════${NC}"
|
|
if [ "$FAILURES" -eq 0 ]; then
|
|
echo -e "${GREEN} All E2E suites passed${NC}"
|
|
else
|
|
echo -e "${RED} $FAILURES suite(s) had failures${NC}"
|
|
fi
|
|
echo -e "${CYAN}══════════════════════════════════════════════${NC}"
|
|
|
|
exit $FAILURES
|