test(review-loop-run): ungate CR-7/8/9 tests — implementation merged (bug 5352fe72)

Claude-Session: https://claude.ai/code/session_01G3SkMRBRWXyiGuMGs8WVas
This commit is contained in:
Paul O'Reilly
2026-09-16 15:25:18 +12:00
parent e291f25880
commit b915dcc753

View File

@@ -81,35 +81,30 @@ assert_contains "no count block counts" "CRITICAL=1 HIGH=2 MEDIUM=0 LOW=0" "$out
assert_contains "no count block marked derived" "(derived)" "$out"
echo "review-loop-run — counts (CR-7/CR-8/CR-9, bug 5352fe72)"
if [[ "${CR789_IMPL_READY:-0}" != "1" ]]; then
echo " SKIP CR-7/CR-8/CR-9 counts tests (set CR789_IMPL_READY=1 once implemented)"
else
out=$("$SCRIPT" counts "$FIXTURES/annotated-table-cell.md"); rc=$?
assert_contains "counts annotated table cell" "CRITICAL=0 HIGH=1 MEDIUM=2 LOW=0" "$out"
out=$("$SCRIPT" counts "$FIXTURES/annotated-table-cell.md"); rc=$?
assert_exit "counts annotated cell exits 4" 4 "$rc"
out=$("$SCRIPT" counts "$FIXTURES/annotated-table-cell.md"); rc=$?
assert_contains "counts annotated table cell" "CRITICAL=0 HIGH=1 MEDIUM=2 LOW=0" "$out"
out=$("$SCRIPT" counts "$FIXTURES/annotated-table-cell.md"); rc=$?
assert_exit "counts annotated cell exits 4" 4 "$rc"
out=$("$SCRIPT" counts "$FIXTURES/prose-historic-quote.md"); rc=$?
assert_contains "counts prose historic quote ignored" "CRITICAL=0 HIGH=2 MEDIUM=0 LOW=0" "$out"
assert_exit "counts prose historic quote ignored exit 4" 4 "$rc"
out=$("$SCRIPT" counts "$FIXTURES/prose-historic-quote.md"); rc=$?
assert_contains "counts prose historic quote ignored" "CRITICAL=0 HIGH=2 MEDIUM=0 LOW=0" "$out"
assert_exit "counts prose historic quote ignored exit 4" 4 "$rc"
out=$("$SCRIPT" counts "$FIXTURES/suspect-derived.md"); rc=$?
assert_contains "counts suspect derived zero marks suspect" "CRITICAL=0 HIGH=0 MEDIUM=0 LOW=0 (suspect)" "$out"
# companion handle (not in spec matrix): asserts the negative -- no (derived) marker on a suspect result
[[ "$out" == *"(derived)"* ]] && { printf " ${RED}FAIL${NC} %s\n unexpected: (derived) present\n" "counts suspect derived zero not marked derived"; FAIL=$((FAIL+1)); } || { printf " ${GREEN}PASS${NC} %s\n" "counts suspect derived zero not marked derived"; PASS=$((PASS+1)); }
out=$("$SCRIPT" counts "$FIXTURES/suspect-derived.md"); rc=$?
assert_exit "counts suspect derived zero exits 4" 4 "$rc"
out=$("$SCRIPT" counts "$FIXTURES/suspect-derived.md"); rc=$?
assert_contains "counts suspect derived zero marks suspect" "CRITICAL=0 HIGH=0 MEDIUM=0 LOW=0 (suspect)" "$out"
# companion handle (not in spec matrix): asserts the negative -- no (derived) marker on a suspect result
[[ "$out" == *"(derived)"* ]] && { printf " ${RED}FAIL${NC} %s\n unexpected: (derived) present\n" "counts suspect derived zero not marked derived"; FAIL=$((FAIL+1)); } || { printf " ${GREEN}PASS${NC} %s\n" "counts suspect derived zero not marked derived"; PASS=$((PASS+1)); }
out=$("$SCRIPT" counts "$FIXTURES/suspect-derived.md"); rc=$?
assert_exit "counts suspect derived zero exits 4" 4 "$rc"
out=$("$SCRIPT" counts "$FIXTURES/suspect-derived-lower.md"); rc=$?
assert_contains "counts suspect derived zero case insensitive" "CRITICAL=0 HIGH=0 MEDIUM=0 LOW=0 (suspect)" "$out"
assert_exit "counts suspect derived zero case insensitive exit 4" 4 "$rc"
out=$("$SCRIPT" counts "$FIXTURES/declaration-with-annotation.md"); rc=$?
assert_contains "counts declaration line annotation rejected" "CRITICAL=0 HIGH=0 MEDIUM=0 LOW=0 (derived)" "$out"
# companion handle (not in spec matrix): exit-code check for the same declaration-line-annotation-rejected case
assert_exit "counts declaration line annotation rejected exits 0" 0 "$rc"
fi
out=$("$SCRIPT" counts "$FIXTURES/suspect-derived-lower.md"); rc=$?
assert_contains "counts suspect derived zero case insensitive" "CRITICAL=0 HIGH=0 MEDIUM=0 LOW=0 (suspect)" "$out"
assert_exit "counts suspect derived zero case insensitive exit 4" 4 "$rc"
out=$("$SCRIPT" counts "$FIXTURES/declaration-with-annotation.md"); rc=$?
assert_contains "counts declaration line annotation rejected" "CRITICAL=0 HIGH=0 MEDIUM=0 LOW=0 (derived)" "$out"
# companion handle (not in spec matrix): exit-code check for the same declaration-line-annotation-rejected case
assert_exit "counts declaration line annotation rejected exits 0" 0 "$rc"
echo "review-loop-run — status"
printf 'x\nexit=0\n' > "$REVIEW_LOOP_RUN_DIR/t-r1-stdout.txt"
out=$("$SCRIPT" status --name t 2>&1); rc=$?