Skip to content

High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.

chore: improve verification steps

Boschd71dac58affe
diff --git a/tests/benchmark/AGENT_TASKS.md b/tests/benchmark/AGENT_TASKS.md
index 18a16e28..89ae8c70 100644
--- a/tests/benchmark/AGENT_TASKS.md
+++ b/tests/benchmark/AGENT_TASKS.md
@@ -75,9 +75,9 @@ Check that the PinchTab server is healthy.
**Verify**: Server responds with `status: ok`.
### 0.2 Auth is required
-Make a request to the server WITHOUT an auth token and confirm it is rejected.
+Make a request to the server with a **wrong** token (`PINCHTAB_TOKEN=wrong-token ./scripts/pt health`) and confirm it is rejected. The `pt` wrapper always injects the benchmark token by default, so you must explicitly override it to test auth rejection.
-**Verify**: Response is HTTP 401 (or other auth-error status).
+**Verify**: Response is HTTP 401 or contains `unauthorized`.
### 0.3 Auth works with token
Repeat the same request WITH the bearer token and confirm it succeeds.
diff --git a/tests/benchmark/scripts/baseline_all.sh b/tests/benchmark/scripts/baseline_all.sh
index 20ec6e8f..c3bffbda 100755
--- a/tests/benchmark/scripts/baseline_all.sh
+++ b/tests/benchmark/scripts/baseline_all.sh
@@ -18,6 +18,18 @@ cd "$(dirname "${BASH_SOURCE[0]}")/.."
AUTH="Authorization: Bearer benchmark-token"
BASE="http://localhost:9867"
REC() { ./scripts/record-step.sh --type baseline "$@" > /dev/null; }
+
+# VERIFY_MARKER <group> <step> <text> <marker> ["extra notes"]
+# Grep for the marker in the text; record pass with the marker as evidence
+# (so the verifier can audit baseline results), or fail with what was expected.
+VERIFY_MARKER() {
+ local g="$1" s="$2" text="$3" marker="$4" extra="${5:-}"
+ if printf '%s' "$text" | grep -q "$marker"; then
+ REC "$g" "$s" pass "${marker}${extra:+ $extra}"
+ else
+ REC "$g" "$s" fail "expected $marker"
+ fi
+}
NAV() { curl -sf -X POST "$BASE/navigate" -H "$AUTH" -H "Content-Type: application/json" -d "{\"tabId\":\"$T\",\"url\":\"$1\"}" > /dev/null; }
SNAP() { curl -sf "$BASE/tabs/$T/snapshot?format=compact&maxTokens=${2:-1500}" -H "$AUTH"; }
ACT() { curl -sf -X POST "$BASE/tabs/$T/action" -H "$AUTH" -H "Content-Type: application/json" -d "$1"; }
@@ -39,22 +51,22 @@ R=$(curl -sf "$BASE/tabs" -H "$AUTH"); echo "$R" | grep -q "$T" && REC 0 8 pass
# Group 1
NAV "http://fixtures/wiki.html"; S=$(SNAP "" 1500)
-echo "$S" | grep -q "VERIFY_WIKI_INDEX_55555" && echo "$S" | grep -q "COUNT_LANGUAGES_12" && REC 1 1 pass "wiki" || REC 1 1 fail "miss"
-R=$(ACT '{"kind":"click","selector":"#link-go","waitNav":true}'); echo "$R" | grep -q '"success":true' && REC 1 2 pass "click" || REC 1 2 fail "miss"
-S=$(SNAP "" 2000); echo "$S" | grep -q "VERIFY_WIKI_GO_LANG_88888" && REC 1 3 pass "go" || REC 1 3 fail "miss"
-echo "$S" | grep -q "FEATURE_COUNT_6" && REC 1 4 pass "6" || REC 1 4 fail "miss"
-NAV "http://fixtures/articles.html"; S=$(SNAP "" 2000); echo "$S" | grep -q "Artificial Intelligence" && REC 1 5 pass "heads" || REC 1 5 fail "miss"
-NAV "http://fixtures/dashboard.html"; S=$(SNAP "" 2000); echo "$S" | grep -q '1,284,930' && REC 1 6 pass "metrics" || REC 1 6 fail "miss"
+if echo "$S" | grep -q "VERIFY_WIKI_INDEX_55555" && echo "$S" | grep -q "COUNT_LANGUAGES_12"; then REC 1 1 pass "VERIFY_WIKI_INDEX_55555 COUNT_LANGUAGES_12"; else REC 1 1 fail "expected VERIFY_WIKI_INDEX_55555 + COUNT_LANGUAGES_12"; fi
+R=$(ACT '{"kind":"click","selector":"#link-go","waitNav":true}'); echo "$R" | grep -q '"success":true' && REC 1 2 pass "clicked #link-go waitNav" || REC 1 2 fail "click failed"
+S=$(SNAP "" 2000); VERIFY_MARKER 1 3 "$S" "VERIFY_WIKI_GO_LANG_88888"
+VERIFY_MARKER 1 4 "$S" "FEATURE_COUNT_6"
+NAV "http://fixtures/articles.html"; S=$(SNAP "" 2000); VERIFY_MARKER 1 5 "$S" "Artificial Intelligence"
+NAV "http://fixtures/dashboard.html"; S=$(SNAP "" 2000); VERIFY_MARKER 1 6 "$S" "1,284,930"
# Group 2
NAV "http://fixtures/wiki.html"; ACT '{"kind":"fill","selector":"#wiki-search-input","text":"golang"}' > /dev/null
ACT '{"kind":"click","selector":"#wiki-search-btn","waitNav":true}' > /dev/null
-S=$(SNAP "" 2000); echo "$S" | grep -q "VERIFY_WIKI_GO_LANG_88888" && REC 2 1 pass "search" || REC 2 1 fail "miss"
+S=$(SNAP "" 2000); VERIFY_MARKER 2 1 "$S" "VERIFY_WIKI_GO_LANG_88888"
NAV "http://fixtures/search.html"; ACT '{"kind":"fill","selector":"#search-input","text":"xyznonexistent"}' > /dev/null
ACT '{"kind":"click","selector":"#search-btn"}' > /dev/null; REC 2 2 pass "no-res"
NAV "http://fixtures/search.html"; ACT '{"kind":"fill","selector":"#search-input","text":"artificial intelligence"}' > /dev/null
ACT '{"kind":"click","selector":"#search-btn"}' > /dev/null
-S=$(SNAP "" 1000); echo "$S" | grep -q "Artificial Intelligence" && REC 2 3 pass "ai" || REC 2 3 fail "miss"
+S=$(SNAP "" 1000); VERIFY_MARKER 2 3 "$S" "Artificial Intelligence"
# Group 3
NAV "http://fixtures/form.html"
@@ -67,7 +79,7 @@ ACT '{"kind":"fill","selector":"#message","text":"This is a benchmark test messa
ACT '{"kind":"click","selector":"#newsletter"}' > /dev/null
ACT '{"kind":"click","selector":"input[name=priority][value=high]"}' > /dev/null
ACT '{"kind":"click","selector":"#submit-btn"}' > /dev/null
-S=$(SNAP "" 1000); echo "$S" | grep -q "VERIFY_FORM_SUBMITTED_SUCCESS" && REC 3 1 pass "form" || REC 3 1 fail "miss"
+S=$(SNAP "" 1000); VERIFY_MARKER 3 1 "$S" "VERIFY_FORM_SUBMITTED_SUCCESS"
curl -sf "$BASE/tabs/$T/snapshot?filter=interactive&format=compact" -H "$AUTH" > /dev/null; REC 3 2 pass "interactive"
# Group 4
@@ -95,7 +107,7 @@ ACT '{"kind":"click","selector":"#product-1 .add-to-cart"}' > /dev/null
ACT '{"kind":"click","selector":"#product-2 .add-to-cart"}' > /dev/null
S=$(SNAP "" 1000); echo "$S" | grep -q "CART_ITEM_WIRELESS_HEADPHONES" && REC 6 2 pass "cart" || REC 6 2 fail "miss"
ACT '{"kind":"click","selector":"#checkout-btn"}' > /dev/null
-S=$(SNAP "" 2000); echo "$S" | grep -q "VERIFY_CHECKOUT_SUCCESS_ORDER" && REC 6 3 pass "co" || REC 6 3 fail "miss"
+S=$(SNAP "" 2000); VERIFY_MARKER 6 3 "$S" "VERIFY_CHECKOUT_SUCCESS_ORDER"
# Group 7
NAV "http://fixtures/wiki-go.html"; S1=$(SNAP "" 2000)
@@ -128,14 +140,14 @@ NAV "http://fixtures/dashboard.html"; ACT '{"kind":"click","selector":"#settings
S=$(SNAP "" 3000); echo "$S" | grep -q "Dashboard Settings" && REC 10 1 pass "m" || REC 10 1 fail "miss"
ACT '{"kind":"select","selector":"#theme-select","value":"dark"}' > /dev/null
ACT '{"kind":"click","selector":"#modal-save"}' > /dev/null
-S=$(SNAP "" 3000); echo "$S" | grep -q "THEME_DARK_APPLIED" && REC 10 2 pass "d" || REC 10 2 fail "miss"
+S=$(SNAP "" 3000); VERIFY_MARKER 10 2 "$S" "THEME_DARK_APPLIED"
# Group 11
NAV "http://fixtures/spa.html?reset=1"
ACT '{"kind":"fill","selector":"#new-task-input","text":"Persistent Task Test"}' > /dev/null
ACT '{"kind":"click","selector":"#add-task-btn"}' > /dev/null
NAV "http://fixtures/"; NAV "http://fixtures/spa.html"
-S=$(SNAP "" 1500); echo "$S" | grep -q "TASK_PERSISTENT_TEST_FOUND" && REC 11 1 pass "p" || REC 11 1 fail "miss"
+S=$(SNAP "" 1500); VERIFY_MARKER 11 1 "$S" "TASK_PERSISTENT_TEST_FOUND"
NAV "http://fixtures/login.html"
for act in \
'{"kind":"fill","selector":"#username","text":"benchmark"}' \
@@ -174,7 +186,7 @@ S=$(SNAP "" 1000); echo "$S" | grep -q "VERIFY_FORM_SUBMITTED_SUCCESS" && REC 13
# Group 14
NAV "http://fixtures/ecommerce.html"; ACT '{"kind":"click","selector":"#load-more-btn"}' > /dev/null
-S=$(SNAP "" 2000); echo "$S" | grep -q "ADDITIONAL_PRODUCTS_LOADED" && REC 14 1 pass "m" || REC 14 1 fail "miss"
+S=$(SNAP "" 2000); VERIFY_MARKER 14 1 "$S" "ADDITIONAL_PRODUCTS_LOADED"
ACT '{"kind":"click","selector":"#product-5 .add-to-cart"}' > /dev/null
S=$(SNAP "" 1000); echo "$S" | grep -q "CART_UPDATED_WITH_LAZY_PRODUCT" && REC 14 2 pass "l" || REC 14 2 fail "miss"
@@ -187,15 +199,15 @@ echo "$G" | grep -q "FEATURE_COUNT_6" && echo "$P" | grep -q "FEATURE_COUNT_7" &
# Group 16
NAV "http://fixtures/hovers.html"; ACT '{"kind":"hover","selector":"#avatar-1"}' > /dev/null
-S=$(SNAP "" 1000); echo "$S" | grep -q "HOVER_REVEALED_USER_1" && REC 16 1 pass "1" || REC 16 1 fail "miss"
+S=$(SNAP "" 1000); VERIFY_MARKER 16 1 "$S" "HOVER_REVEALED_USER_1"
ACT '{"kind":"hover","selector":"#avatar-2"}' > /dev/null
-S=$(SNAP "" 1000); echo "$S" | grep -q "HOVER_REVEALED_USER_2" && REC 16 2 pass "2" || REC 16 2 fail "miss"
+S=$(SNAP "" 1000); VERIFY_MARKER 16 2 "$S" "HOVER_REVEALED_USER_2"
# Group 17
NAV "http://fixtures/scroll.html"; ACT '{"kind":"scroll","scrollY":1500}' > /dev/null
-S=$(SNAP "" 1500); echo "$S" | grep -q "SCROLL_MIDDLE_MARKER" && REC 17 1 pass "m" || REC 17 1 fail "miss"
+S=$(SNAP "" 1500); VERIFY_MARKER 17 1 "$S" "SCROLL_MIDDLE_MARKER"
ACT '{"kind":"scroll","selector":"#footer"}' > /dev/null
-S=$(SNAP "" 1500); echo "$S" | grep -q "SCROLL_REACHED_FOOTER" && REC 17 2 pass "f" || REC 17 2 fail "miss"
+S=$(SNAP "" 1500); VERIFY_MARKER 17 2 "$S" "SCROLL_REACHED_FOOTER"
# Group 18
R=$(curl -sf "$BASE/tabs/$T/download?url=http://fixtures/download-sample.txt" -H "$AUTH")
diff --git a/tests/benchmark/scripts/finalize-report.sh b/tests/benchmark/scripts/finalize-report.sh
index c126f8ed..e8cf56fc 100755
--- a/tests/benchmark/scripts/finalize-report.sh
+++ b/tests/benchmark/scripts/finalize-report.sh
@@ -45,6 +45,21 @@ if [[ -z "${REPORT_FILE}" || ! -f "${REPORT_FILE}" ]]; then
exit 1
fi
+# Auto-verify pending agent answers before rendering the summary.
+# This ensures the "Verification Pass Rate" in the summary reflects actual
+# grading, not just the answer count. For baseline reports (which use
+# pass/fail directly) this is a no-op.
+PENDING=$(jq -r '.totals.steps_pending_verification // 0' "${REPORT_FILE}")
+if [[ "${PENDING}" -gt 0 ]]; then
+ VERIFY_SCRIPT="${SCRIPT_DIR}/verify-answers.sh"
+ if [[ -x "${VERIFY_SCRIPT}" ]]; then
+ echo "Auto-verifying ${PENDING} pending answers..."
+ "${VERIFY_SCRIPT}" "${REPORT_FILE}"
+ else
+ echo "WARNING: ${PENDING} answers pending verification but verify-answers.sh not found"
+ fi
+fi
+
SUMMARY_FILE="${REPORT_FILE%.json}_summary.md"
jq -r '
diff --git a/tests/benchmark/scripts/pt b/tests/benchmark/scripts/pt
index d32959ac..19c06143 100755
--- a/tests/benchmark/scripts/pt
+++ b/tests/benchmark/scripts/pt
@@ -7,7 +7,9 @@
set -euo pipefail
: "${PINCHTAB_CONTAINER:=benchmark-pinchtab-1}"
-: "${PINCHTAB_TOKEN:=benchmark-token}"
+# Use = (not :=) for TOKEN so that PINCHTAB_TOKEN="" sends no auth header —
+# needed for step 0.2 which tests unauthenticated access (401 expected).
+: "${PINCHTAB_TOKEN=benchmark-token}"
: "${PINCHTAB_SERVER:=http://localhost:9867}"
args=(docker exec
diff --git a/tests/benchmark/scripts/record-step.sh b/tests/benchmark/scripts/record-step.sh
index 7f44ff31..75df4742 100755
--- a/tests/benchmark/scripts/record-step.sh
+++ b/tests/benchmark/scripts/record-step.sh
@@ -210,7 +210,8 @@ elif [[ "${BENCHMARK_TYPE}" == "agent-browser" ]]; then
fi
fi
-# Create step entry
+# Create step entry — only include metric fields when they have real values.
+# Zero-value tokens/cost/bytes/tool_calls are omitted to reduce noise.
STEP_JSON=$(jq -n \
--argjson group "${GROUP}" \
--argjson step "${STEP}" \
@@ -225,16 +226,16 @@ STEP_JSON=$(jq -n \
--arg answer "${ANSWER}" \
--arg notes "${NOTES}" \
--arg ts "${TIMESTAMP}" \
- '{group: $group, step: $step, id: $id, status: $status,
- input_tokens: $in_tokens, output_tokens: $out_tokens,
- total_tokens: $total_tokens,
- tool_calls: $tool_calls,
- cost_usd: $cost,
- response_bytes: $bytes, answer: $answer,
- notes: $notes, timestamp: $ts} |
- if $status == "answer" then
- .verification = {status: "pending"}
- else . end')
+ '{group: $group, step: $step, id: $id, status: $status, timestamp: $ts} |
+ if ($answer | length) > 0 then .answer = $answer else . end |
+ if ($notes | length) > 0 then .notes = $notes else . end |
+ if $in_tokens > 0 then .input_tokens = $in_tokens else . end |
+ if $out_tokens > 0 then .output_tokens = $out_tokens else . end |
+ if $total_tokens > 0 then .total_tokens = $total_tokens else . end |
+ if $tool_calls > 0 then .tool_calls = $tool_calls else . end |
+ if $cost > 0 then .cost_usd = $cost else . end |
+ if $bytes > 0 then .response_bytes = $bytes else . end |
+ if $status == "answer" then .verification = {status: "pending"} else . end')
# Append to report and update totals
TMP_FILE=$(mktemp)
diff --git a/tests/benchmark/scripts/verify-answers.sh b/tests/benchmark/scripts/verify-answers.sh
new file mode 100755
index 00000000..11ced7d1
--- /dev/null
+++ b/tests/benchmark/scripts/verify-answers.sh
@@ -0,0 +1,164 @@
+#!/usr/bin/env bash
+#
+# One-off verifier for Loop #31 answers. Reads the agent report, matches each
+# step's `.answer` against an expected marker/substring set, and invokes
+# verify-step.sh with pass/fail. The marker map below is hand-derived from
+# BASELINE_TASKS.md "Pass if" criteria.
+#
+# Usage:
+# ./verify_answers_for_loop31.sh results/agent_benchmark_20260415_233421.json
+
+set -euo pipefail
+
+REPORT="${1:-results/agent_benchmark_20260415_233421.json}"
+
+declare -A EXPECT
+# Setup & diagnosis — tightened after manual audit (see Loop #33 notes)
+EXPECT[0.1]='status.*ok|status:.*ok'
+EXPECT[0.2]='401|missing_token|unauth'
+EXPECT[0.3]='200|authed.*200'
+EXPECT[0.4]='running'
+EXPECT[0.5]='tab.*list|tabs.*returned|active tab|listed.*tab'
+EXPECT[0.6]='cleaned|closed|no stale|reused.*tab|no cleanup|single active|already empty'
+EXPECT[0.7]='VERIFY_HOME_LOADED_12345|navigated to fixtures|fixtures.*home'
+EXPECT[0.8]='[0-9A-F]{32}|tab.*id.*captured'
+# Reading & Extracting
+EXPECT[1.1]='COUNT_LANGUAGES_12|Programming Languages 12|12 articles'
+EXPECT[1.2]='wiki-go|Go \(programming language\)|409 success|clicked'
+EXPECT[1.3]='Robert Griesemer.*2009|2009.*Griesemer'
+EXPECT[1.4]='FEATURE_COUNT_6|6 key features|6 features'
+EXPECT[1.5]='Artificial Intelligence.*Climate Action.*Mars|Artificial Intelligence, Climate Action'
+EXPECT[1.6]='24,582.*1,284,930|24,582|Revenue \$1,284,930'
+# Search
+EXPECT[2.1]='wiki-go|VERIFY_WIKI_GO_LANG_88888'
+EXPECT[2.2]='No results|no results|xyznonexistent'
+EXPECT[2.3]='Artificial Intelligence|ARTIFICIAL_INTELLIGENCE'
+# Form
+EXPECT[3.1]='submitted|VERIFY_FORM_SUBMITTED_SUCCESS|FORM_SUBMITTED|SUBMISSION_DATA'
+EXPECT[3.2]='[Rr]eset.*button|#reset-btn|[Rr]eset.*present|reset-btn'
+# SPA
+EXPECT[4.1]='TASK_STATS_TOTAL_3|Total.*3.*Active.*2.*Done.*1|3.*2.*1'
+EXPECT[4.2]='TASK_ADDED|AUTOMATE|DEPLOYMENT|high'
+EXPECT[4.3]='deleted.*task|TASK_STATS_TOTAL_3|All Tasks.*3|3.*tasks'
+# Login
+EXPECT[5.1]='INVALID_CREDENTIALS_ERROR|Invalid'
+EXPECT[5.2]='VERIFY_LOGIN_SUCCESS_DASHBOARD|SESSION_TOKEN_ACTIVE_TRUE|login success|Dashboard'
+# E-commerce
+EXPECT[6.1]='149.99.*299.99|Wireless.*Smart Watch|Portable Charger'
+EXPECT[6.2]='449.98|CART_ITEM_WIRELESS'
+EXPECT[6.3]='VERIFY_CHECKOUT_SUCCESS_ORDER|checkout'
+# Content + Interaction
+EXPECT[7.1]='COMMENT_POSTED_RATING_5'
+EXPECT[7.2]='Developer Tools.*15|15.*Developer|wiki-go|VERIFY_WIKI_GO'
+# Error handling
+EXPECT[8.1]='404|not found'
+EXPECT[8.2]='element.*not found|no element found|no element|clear error'
+# Export
+EXPECT[9.1]='[Ss]creenshot|\.png.*[0-9]{4,} bytes'
+EXPECT[9.2]='[Pp][Dd][Ff]|\.pdf.*[0-9]{4,} bytes'
+# Modals
+EXPECT[10.1]='Dashboard Settings'
+EXPECT[10.2]='THEME_DARK_APPLIED'
+# Persistence
+EXPECT[11.1]='TASK_PERSISTENT_TEST_FOUND'
+EXPECT[11.2]='SESSION_RENEWED|VERIFY_LOGIN_SUCCESS_DASHBOARD'
+# Multi-page nav
+EXPECT[12.1]='home|VERIFY_HOME_LOADED_12345|PinchTab Benchmark - Home'
+EXPECT[12.2]='COUNT_LANGUAGES_12|12.*Programming|Artificial Intelligence|Total Articles|12\+8\+15|COMPARISON_DATA_FOUND'
+# Form validation
+EXPECT[13.1]='blocked|display:none|valueMissing|not submitted'
+EXPECT[13.2]='VERIFY_FORM_SUBMITTED_SUCCESS|OPTIONAL_FIELD_SKIPPED_SUCCESS|submitted'
+# Dynamic content
+EXPECT[14.1]='ADDITIONAL_PRODUCTS_LOADED'
+EXPECT[14.2]='CART_UPDATED_WITH_LAZY_PRODUCT|USB-C'
+# Data aggregation
+EXPECT[15.1]='1,284,930.*384,930|PROFIT_MARGIN_CALCULATED|Revenue.*Profit'
+EXPECT[15.2]='FEATURE_COUNT_6.*7.*5|Go=6.*Python=7.*Rust=5|6, 7, 5|COMPARISON_TABLE_BUILT'
+# Hover
+EXPECT[16.1]='HOVER_REVEALED_USER_1'
+EXPECT[16.2]='HOVER_REVEALED_USER_2'
+# Scroll
+EXPECT[17.1]='SCROLL_MIDDLE_MARKER'
+EXPECT[17.2]='SCROLL_REACHED_FOOTER'
+# Download
+EXPECT[18.1]='DOWNLOAD_FILE_CONTENT_VERIFIED|143 bytes'
+# iFrame
+EXPECT[19.1]='IFRAME_INNER_CONTENT_LOADED'
+EXPECT[19.2]='IFRAME_INPUT_RECEIVED_HELLO_WORLD'
+# Dialogs
+EXPECT[20.1]='DIALOG_ALERT_DISMISSED'
+EXPECT[20.2]='DIALOG_CONFIRM_CANCELLED'
+# Async / awaitPromise
+EXPECT[21.1]='ASYNC_PAYLOAD_READY_42'
+EXPECT[21.2]='ASYNC_USER_NAME_ADA'
+# Drag
+EXPECT[22.1]='DROP_ZONE_A_OK'
+EXPECT[22.2]='DROP_SEQUENCE=DROP_ZONE_A_OK,DROP_ZONE_B_OK,DROP_ZONE_C_OK'
+# Loading
+EXPECT[23.1]='VERIFY_LOADING_COMPLETE_88888'
+# Keyboard
+EXPECT[24.1]='KEYBOARD_ESCAPE_PRESSED'
+EXPECT[24.2]='KEYBOARD_KEY_A_PRESSED|KEYBOARD_ENTER_PRESSED|ESC.*A.*ENTER'
+# Tabs
+EXPECT[25.1]='TAB_SETTINGS_CONTENT'
+EXPECT[25.2]='TAB_BILLING_CONTENT'
+# Accordion
+EXPECT[26.1]='ACCORDION_SECTION_A_OPEN'
+EXPECT[26.2]='ACCORDION_SECTION_B_OPEN.*aria-expanded=false|Section A aria-expanded=false'
+# Editor
+EXPECT[27.1]='EDITOR_CHARS=15|Hello rich text'
+EXPECT[27.2]='EDITOR_COMMITTED=Hello rich text'
+# Range
+EXPECT[28.1]='RANGE_VALUE_90.*BUCKET_HIGH|RANGE_VALUE_90'
+EXPECT[28.2]='RANGE_VALUE_10.*BUCKET_LOW|RANGE_VALUE_10'
+# Pagination
+EXPECT[29.1]='PAGE_2_FIRST_ITEM|PAGE_2_OF_3'
+EXPECT[29.2]='PAGE_3_FIRST_ITEM|disabled=true'
+# Dropdown
+EXPECT[30.1]='DROPDOWN_SELECTED=BETA'
+EXPECT[30.2]='DROPDOWN_SELECTED=GAMMA'
+# Iframe variants
+EXPECT[31.1]='DEEP_CLICKED=YES_LEVEL_3'
+EXPECT[32.1]='IFRAME_INPUT_RECEIVED_LATE_WORLD'
+EXPECT[33.1]='INLINE_RECEIVED_SRCDOC'
+EXPECT[34.1]='SANDBOX_CLICKED=YES'
+# Text-heavy
+EXPECT[35.1]='ARTICLE_PUBLISHED_2026_04_15.*ARTICLE_WORD_COUNT_MARKER_323|ARTICLE_WORD_COUNT_MARKER_323'
+EXPECT[35.2]='FOOTER_COPYRIGHT_MARKER'
+EXPECT[36.1]='RESULT_3_TITLE.*RESULT_3_SNIPPET_MARKER|RESULT_3'
+EXPECT[36.2]='RESULT_1.*RESULT_6|SERP_RESULT_COUNT_6'
+EXPECT[37.1]='a-2'
+EXPECT[37.2]='ANSWER_2_BODY_MARKER.*ACCEPTED_ANSWER_ID_A2|ACCEPTED_ANSWER_ID_A2'
+EXPECT[38.1]='PLAN_PRO_PRICE_29'
+EXPECT[38.2]='PLAN_FREE_PRICE_0.*PLAN_PRO_PRICE_29.*PLAN_ENTERPRISE_PRICE_CUSTOM|PLAN_PRO_PRICE_29'
+
+pass=0
+fail=0
+failed_ids=()
+
+while IFS='|' read -r id answer; do
+ pattern="${EXPECT[$id]:-}"
+ if [[ -z "$pattern" ]]; then
+ echo "skip $id — no expected pattern defined"
+ "$(dirname "${BASH_SOURCE[0]}")/verify-step.sh" --report-file "$REPORT" \
+ "${id%.*}" "${id#*.}" skip "no expected pattern" > /dev/null
+ continue
+ fi
+ if printf '%s' "$answer" | grep -qE "$pattern"; then
+ "$(dirname "${BASH_SOURCE[0]}")/verify-step.sh" --report-file "$REPORT" \
+ "${id%.*}" "${id#*.}" pass "auto: matched /$pattern/" > /dev/null
+ pass=$((pass + 1))
+ else
+ "$(dirname "${BASH_SOURCE[0]}")/verify-step.sh" --report-file "$REPORT" \
+ "${id%.*}" "${id#*.}" fail "auto: answer did not match /$pattern/" > /dev/null
+ fail=$((fail + 1))
+ failed_ids+=("$id")
+ fi
+done < <(jq -r '.steps[] | "\(.id)|\(.answer)"' "$REPORT")
+
+echo
+echo "Verified: $pass pass, $fail fail"
+if (( fail > 0 )); then
+ echo "Failed ids:"
+ printf ' %s\n' "${failed_ids[@]}"
+fi