fix(review-loop-run): CR-10 — scope exits only on headings shallower-or-equal to start depth (8c865eb4-7fd1-4a8d-b51d-04d020ba41c0)
This commit is contained in:
18
tests/fixtures/review-loop-run/h2-terminates-scope.md
vendored
Normal file
18
tests/fixtures/review-loop-run/h2-terminates-scope.md
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
# Review
|
||||
|
||||
## Count by Severity
|
||||
|
||||
| Severity | Count |
|
||||
|----------|-------|
|
||||
| CRITICAL | 0 |
|
||||
| HIGH | 1 |
|
||||
| MEDIUM | 2 |
|
||||
| LOW | 0 |
|
||||
|
||||
## Next Section
|
||||
|
||||
This section is outside the count-by-severity scope and must be ignored.
|
||||
|
||||
### HIGH: 99
|
||||
|
||||
A trailing severity line that should not be picked up.
|
||||
21
tests/fixtures/review-loop-run/h3-subsections.md
vendored
Normal file
21
tests/fixtures/review-loop-run/h3-subsections.md
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# Review
|
||||
|
||||
Some review content above.
|
||||
|
||||
## Count by Severity
|
||||
|
||||
### CRITICAL: 0
|
||||
|
||||
No critical findings in this round.
|
||||
|
||||
### HIGH: 0
|
||||
|
||||
No high findings either.
|
||||
|
||||
### MEDIUM: 0
|
||||
|
||||
No medium findings.
|
||||
|
||||
### LOW: 0
|
||||
|
||||
Nothing to fix.
|
||||
@@ -105,6 +105,15 @@ 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 — counts (CR-10, bug 8c865eb4)"
|
||||
out=$("$SCRIPT" counts "$FIXTURES/h3-subsections.md"); rc=$?
|
||||
assert_contains "counts h3 subsections parse as zero" "CRITICAL=0 HIGH=0 MEDIUM=0 LOW=0" "$out"
|
||||
assert_exit "counts h3 subsections exit 0" 0 "$rc"
|
||||
|
||||
out=$("$SCRIPT" counts "$FIXTURES/h2-terminates-scope.md"); rc=$?
|
||||
assert_contains "counts h2 still terminates scope" "CRITICAL=0 HIGH=1 MEDIUM=2 LOW=0" "$out"
|
||||
assert_exit "counts h2 termination exit 4" 4 "$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=$?
|
||||
|
||||
Reference in New Issue
Block a user