Skip to content

Commit a00d0d7

Browse files
patnikoCopilot
andcommitted
fix: remove soft-pass fallbacks in verify.sh scenario scripts
Replace else/elif fallback branches that always passed with proper failure reporting. Previously, when the expected grep pattern wasn't found, the test would emit a warning but still count as passed. Now these cases correctly report failure and increment the FAIL counter. Changed 18 files with 21 soft-pass fixes across: - 10 standard else-branch fallbacks (modes, prompts, tools, sessions) - 3 elif-branch fallbacks (callbacks, streaming, virtual-filesystem) - 3 multi-branch fixes with both 'partial' and 'got response' fallbacks (concurrent-sessions, multi-user-long-lived, multi-user-short-lived) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent e61e9a6 commit a00d0d7

18 files changed

Lines changed: 63 additions & 42 deletions

File tree

test/scenarios/callbacks/hooks/verify.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@ run_with_timeout() {
7373
echo "$name passed (hooks confirmed)"
7474
PASS=$((PASS + 1))
7575
elif [ "$code" -eq 0 ] && [ -n "$output" ]; then
76-
echo "$name passed (got response)"
77-
PASS=$((PASS + 1))
76+
echo "$name failed (expected pattern not found)"
77+
FAIL=$((FAIL + 1))
78+
ERRORS="$ERRORS\n - $name"
7879
fi
7980
elif [ "$code" -eq 124 ]; then
8081
echo "$name failed (timed out after ${TIMEOUT}s)"

test/scenarios/callbacks/permissions/verify.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@ run_with_timeout() {
7373
echo "$name passed (permission flow confirmed)"
7474
PASS=$((PASS + 1))
7575
elif [ "$code" -eq 0 ] && [ -n "$output" ]; then
76-
echo "$name passed (got response)"
77-
PASS=$((PASS + 1))
76+
echo "$name failed (expected pattern not found)"
77+
FAIL=$((FAIL + 1))
78+
ERRORS="$ERRORS\n - $name"
7879
fi
7980
elif [ "$code" -eq 124 ]; then
8081
echo "$name failed (timed out after ${TIMEOUT}s)"

test/scenarios/callbacks/user-input/verify.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@ run_with_timeout() {
7373
echo "$name passed (user input flow confirmed)"
7474
PASS=$((PASS + 1))
7575
elif [ "$code" -eq 0 ] && [ -n "$output" ]; then
76-
echo "$name passed (got response)"
77-
PASS=$((PASS + 1))
76+
echo "$name failed (expected pattern not found)"
77+
FAIL=$((FAIL + 1))
78+
ERRORS="$ERRORS\n - $name"
7879
fi
7980
elif [ "$code" -eq 124 ]; then
8081
echo "$name failed (timed out after ${TIMEOUT}s)"

test/scenarios/modes/default/verify.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ run_with_timeout() {
7474
PASS=$((PASS + 1))
7575
else
7676
echo "⚠️ $name ran but response may not confirm CLI tools"
77-
echo "$name passed (got response)"
78-
PASS=$((PASS + 1))
77+
echo "$name failed (expected pattern not found)"
78+
FAIL=$((FAIL + 1))
79+
ERRORS="$ERRORS\n - $name"
7980
fi
8081
elif [ "$code" -eq 124 ]; then
8182
echo "$name failed (timed out after ${TIMEOUT}s)"

test/scenarios/modes/minimal/verify.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ run_with_timeout() {
7474
PASS=$((PASS + 1))
7575
else
7676
echo "⚠️ $name ran but response may not confirm tool-less state"
77-
echo "$name passed (got response)"
78-
PASS=$((PASS + 1))
77+
echo "$name failed (expected pattern not found)"
78+
FAIL=$((FAIL + 1))
79+
ERRORS="$ERRORS\n - $name"
7980
fi
8081
elif [ "$code" -eq 124 ]; then
8182
echo "$name failed (timed out after ${TIMEOUT}s)"

test/scenarios/prompts/attachments/verify.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ run_with_timeout() {
7474
PASS=$((PASS + 1))
7575
else
7676
echo "⚠️ $name ran but response may not reference attached file content"
77-
echo "$name passed (got response)"
78-
PASS=$((PASS + 1))
77+
echo "$name failed (expected pattern not found)"
78+
FAIL=$((FAIL + 1))
79+
ERRORS="$ERRORS\n - $name"
7980
fi
8081
elif [ "$code" -eq 124 ]; then
8182
echo "$name failed (timed out after ${TIMEOUT}s)"

test/scenarios/prompts/reasoning-effort/verify.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ run_with_timeout() {
7474
PASS=$((PASS + 1))
7575
else
7676
echo "⚠️ $name ran but response may not contain expected content"
77-
echo "$name passed (got response)"
78-
PASS=$((PASS + 1))
77+
echo "$name failed (expected pattern not found)"
78+
FAIL=$((FAIL + 1))
79+
ERRORS="$ERRORS\n - $name"
7980
fi
8081
elif [ "$code" -eq 124 ]; then
8182
echo "$name failed (timed out after ${TIMEOUT}s)"

test/scenarios/prompts/system-message/verify.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ run_with_timeout() {
7474
PASS=$((PASS + 1))
7575
else
7676
echo "⚠️ $name ran but response may not contain pirate language"
77-
echo "$name passed (got response)"
78-
PASS=$((PASS + 1))
77+
echo "$name failed (expected pattern not found)"
78+
FAIL=$((FAIL + 1))
79+
ERRORS="$ERRORS\n - $name"
7980
fi
8081
elif [ "$code" -eq 124 ]; then
8182
echo "$name failed (timed out after ${TIMEOUT}s)"

test/scenarios/sessions/concurrent-sessions/verify.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,14 @@ run_with_timeout() {
8282
PASS=$((PASS + 1))
8383
elif $has_session1 || $has_session2; then
8484
echo "⚠️ $name ran but only one session responded"
85-
echo "$name passed (partial)"
86-
PASS=$((PASS + 1))
85+
echo "$name failed (expected both to respond)"
86+
FAIL=$((FAIL + 1))
87+
ERRORS="$ERRORS\n - $name (partial)"
8788
else
8889
echo "⚠️ $name ran but session labels not found in output"
89-
echo "$name passed (got response)"
90-
PASS=$((PASS + 1))
90+
echo "$name failed (expected pattern not found)"
91+
FAIL=$((FAIL + 1))
92+
ERRORS="$ERRORS\n - $name"
9193
fi
9294
elif [ "$code" -eq 124 ]; then
9395
echo "$name failed (timed out after ${TIMEOUT}s)"

test/scenarios/sessions/infinite-sessions/verify.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@ run_with_timeout() {
7373
PASS=$((PASS + 1))
7474
else
7575
echo "⚠️ $name ran but completion message not found"
76-
echo "$name passed (got response)"
77-
PASS=$((PASS + 1))
76+
echo "$name failed (expected pattern not found)"
77+
FAIL=$((FAIL + 1))
78+
ERRORS="$ERRORS\n - $name"
7879
fi
7980
elif [ "$code" -eq 124 ]; then
8081
echo "$name failed (timed out after ${TIMEOUT}s)"

0 commit comments

Comments
 (0)