Skip to content

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

refactor: test reorg (#310)

luigiagent9353095c3ede
diff --git a/.github/workflows/e2e-recent.yml b/.github/workflows/e2e-recent.yml
index 33326bb2..98e1bcbd 100644
--- a/.github/workflows/e2e-recent.yml
+++ b/.github/workflows/e2e-recent.yml
@@ -1,4 +1,4 @@
-name: E2E Recent Tests
+name: E2E
permissions:
contents: read
@@ -31,7 +31,7 @@ jobs:
recent:
name: E2E Recent Tests
runs-on: ubuntu-latest
- if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
+ if: github.event_name != 'workflow_dispatch' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false)
timeout-minutes: 10
steps:
@@ -56,15 +56,12 @@ jobs:
./dev e2e recent 2>&1 | tee e2e-output.log
EXIT_CODE=${PIPESTATUS[0]}
- PASSED=$(grep -oP 'Passed:\s*\K\d+' e2e-output.log | tail -1 || true)
- FAILED=$(grep -oP 'Failed:\s*\K\d+' e2e-output.log | tail -1 || true)
+ PASSED=$(grep -oP 'Passed:\s*\K\d+' e2e-output.log | awk '{s+=$1} END {print s+0}')
+ FAILED=$(grep -oP 'Failed:\s*\K\d+' e2e-output.log | awk '{s+=$1} END {print s+0}')
FAILURES=$(grep -E '✗.*failed' e2e-output.log | sed 's/.*✗ /- /' | head -10 || true)
- PASSED=${PASSED:-0}
- FAILED=${FAILED:-0}
echo "passed=$PASSED" >> $GITHUB_OUTPUT
echo "failed=$FAILED" >> $GITHUB_OUTPUT
-
{
echo 'failures<<EOF'
echo "$FAILURES"
@@ -106,16 +103,10 @@ jobs:
run: |
PASSED="${{ steps.e2e.outputs.passed }}"
FAILED="${{ steps.e2e.outputs.failed }}"
- PASSED="${PASSED:-0}"
- FAILED="${FAILED:-0}"
if [ "${{ steps.e2e.outcome }}" = "success" ]; then
echo "## ✅ E2E Recent Tests Passed" >> $GITHUB_STEP_SUMMARY
- if [ "$PASSED" = "0" ]; then
- echo "All tests passed" >> $GITHUB_STEP_SUMMARY
- else
- echo "**$PASSED** tests passed" >> $GITHUB_STEP_SUMMARY
- fi
+ echo "**$PASSED** tests passed" >> $GITHUB_STEP_SUMMARY
else
echo "## ❌ E2E Recent Tests Failed" >> $GITHUB_STEP_SUMMARY
echo "**Passed:** $PASSED" >> $GITHUB_STEP_SUMMARY
@@ -125,28 +116,75 @@ jobs:
echo '```' >> $GITHUB_STEP_SUMMARY
fi
- - name: Report check annotation
+ api-fast:
+ name: E2E API Fast Tests
+ needs: recent
+ runs-on: ubuntu-latest
+ if: github.event_name != 'workflow_dispatch'
+ timeout-minutes: 15
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v5
+
+ - name: Set up Go
+ uses: actions/setup-go@v6
+ with:
+ go-version-file: go.mod
+ cache: true
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v3
+
+ - name: Run API fast E2E tests
+ id: e2e
+ run: |
+ set +e
+ mkdir -p tests/e2e/results
+
+ ./dev e2e api-fast 2>&1 | tee e2e-output.log
+ EXIT_CODE=${PIPESTATUS[0]}
+
+ PASSED=$(grep -oP 'Passed:\s*\K\d+' e2e-output.log | awk '{s+=$1} END {print s+0}')
+ FAILED=$(grep -oP 'Failed:\s*\K\d+' e2e-output.log | awk '{s+=$1} END {print s+0}')
+ FAILURES=$(grep -E '✗.*failed' e2e-output.log | sed 's/.*✗ /- /' | head -10 || true)
+
+ echo "passed=$PASSED" >> $GITHUB_OUTPUT
+ echo "failed=$FAILED" >> $GITHUB_OUTPUT
+ {
+ echo 'failures<<EOF'
+ echo "$FAILURES"
+ echo 'EOF'
+ } >> $GITHUB_OUTPUT
+
+ exit $EXIT_CODE
+ env:
+ DOCKER_BUILDKIT: 1
+ COMPOSE_DOCKER_CLI_BUILD: 1
+
+ - name: Post summary
if: always()
run: |
PASSED="${{ steps.e2e.outputs.passed }}"
FAILED="${{ steps.e2e.outputs.failed }}"
- PASSED="${PASSED:-0}"
- FAILED="${FAILED:-0}"
if [ "${{ steps.e2e.outcome }}" = "success" ]; then
- if [ "$PASSED" = "0" ]; then
- echo "::notice title=E2E Recent Tests::✅ All tests passed"
- else
- echo "::notice title=E2E Recent Tests::✅ ${PASSED} tests passed"
- fi
+ echo "## ✅ E2E API Fast Tests Passed" >> $GITHUB_STEP_SUMMARY
+ echo "**$PASSED** tests passed" >> $GITHUB_STEP_SUMMARY
else
- echo "::error title=E2E Recent Tests::❌ ${FAILED} failed, ${PASSED} passed"
+ echo "## ❌ E2E API Fast Tests Failed" >> $GITHUB_STEP_SUMMARY
+ echo "**Passed:** $PASSED" >> $GITHUB_STEP_SUMMARY
+ echo "**Failed:** $FAILED" >> $GITHUB_STEP_SUMMARY
+ echo '```' >> $GITHUB_STEP_SUMMARY
+ echo "${{ steps.e2e.outputs.failures }}" >> $GITHUB_STEP_SUMMARY
+ echo '```' >> $GITHUB_STEP_SUMMARY
fi
- e2e-curl:
- name: E2E Curl Tests
+ cli-fast:
+ name: E2E CLI Fast Tests
needs: recent
runs-on: ubuntu-latest
+ if: github.event_name != 'workflow_dispatch'
timeout-minutes: 15
steps:
@@ -162,19 +200,18 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- - name: Run E2E curl tests
+ - name: Run CLI fast E2E tests
id: e2e
run: |
set +e
mkdir -p tests/e2e/results
- ./dev e2e curl 2>&1 | tee e2e-output.log
+
+ ./dev e2e cli-fast 2>&1 | tee e2e-output.log
EXIT_CODE=${PIPESTATUS[0]}
- PASSED=$(grep -oP 'Passed:\s*\K\d+' e2e-output.log | tail -1 || true)
- FAILED=$(grep -oP 'Failed:\s*\K\d+' e2e-output.log | tail -1 || true)
+ PASSED=$(grep -oP 'Passed:\s*\K\d+' e2e-output.log | awk '{s+=$1} END {print s+0}')
+ FAILED=$(grep -oP 'Failed:\s*\K\d+' e2e-output.log | awk '{s+=$1} END {print s+0}')
FAILURES=$(grep -E '✗.*failed' e2e-output.log | sed 's/.*✗ /- /' | head -10 || true)
- PASSED=${PASSED:-0}
- FAILED=${FAILED:-0}
echo "passed=$PASSED" >> $GITHUB_OUTPUT
echo "failed=$FAILED" >> $GITHUB_OUTPUT
@@ -194,18 +231,12 @@ jobs:
run: |
PASSED="${{ steps.e2e.outputs.passed }}"
FAILED="${{ steps.e2e.outputs.failed }}"
- PASSED="${PASSED:-0}"
- FAILED="${FAILED:-0}"
if [ "${{ steps.e2e.outcome }}" = "success" ]; then
- echo "## ✅ E2E Curl Tests Passed" >> $GITHUB_STEP_SUMMARY
- if [ "$PASSED" = "0" ]; then
- echo "All tests passed" >> $GITHUB_STEP_SUMMARY
- else
- echo "**$PASSED** tests passed" >> $GITHUB_STEP_SUMMARY
- fi
+ echo "## ✅ E2E CLI Fast Tests Passed" >> $GITHUB_STEP_SUMMARY
+ echo "**$PASSED** tests passed" >> $GITHUB_STEP_SUMMARY
else
- echo "## ❌ E2E Curl Tests Failed" >> $GITHUB_STEP_SUMMARY
+ echo "## ❌ E2E CLI Fast Tests Failed" >> $GITHUB_STEP_SUMMARY
echo "**Passed:** $PASSED" >> $GITHUB_STEP_SUMMARY
echo "**Failed:** $FAILED" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
@@ -213,28 +244,74 @@ jobs:
echo '```' >> $GITHUB_STEP_SUMMARY
fi
- - name: Report check annotation
+ full-api:
+ name: E2E Full API Tests
+ runs-on: ubuntu-latest
+ if: github.event_name == 'workflow_dispatch'
+ timeout-minutes: 20
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v5
+
+ - name: Set up Go
+ uses: actions/setup-go@v6
+ with:
+ go-version-file: go.mod
+ cache: true
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v3
+
+ - name: Run full API E2E tests
+ id: e2e
+ run: |
+ set +e
+ mkdir -p tests/e2e/results
+
+ ./dev e2e full-api 2>&1 | tee e2e-output.log
+ EXIT_CODE=${PIPESTATUS[0]}
+
+ PASSED=$(grep -oP 'Passed:\s*\K\d+' e2e-output.log | awk '{s+=$1} END {print s+0}')
+ FAILED=$(grep -oP 'Failed:\s*\K\d+' e2e-output.log | awk '{s+=$1} END {print s+0}')
+ FAILURES=$(grep -E '✗.*failed' e2e-output.log | sed 's/.*✗ /- /' | head -10 || true)
+
+ echo "passed=$PASSED" >> $GITHUB_OUTPUT
+ echo "failed=$FAILED" >> $GITHUB_OUTPUT
+ {
+ echo 'failures<<EOF'
+ echo "$FAILURES"
+ echo 'EOF'
+ } >> $GITHUB_OUTPUT
+
+ exit $EXIT_CODE
+ env:
+ DOCKER_BUILDKIT: 1
+ COMPOSE_DOCKER_CLI_BUILD: 1
+
+ - name: Post summary
if: always()
run: |
PASSED="${{ steps.e2e.outputs.passed }}"
FAILED="${{ steps.e2e.outputs.failed }}"
- PASSED="${PASSED:-0}"
- FAILED="${FAILED:-0}"
+
if [ "${{ steps.e2e.outcome }}" = "success" ]; then
- if [ "$PASSED" = "0" ]; then
- echo "::notice title=E2E Curl Tests::✅ All tests passed"
- else
- echo "::notice title=E2E Curl Tests::✅ ${PASSED} tests passed"
- fi
+ echo "## ✅ E2E Full API Tests Passed" >> $GITHUB_STEP_SUMMARY
+ echo "**$PASSED** tests passed" >> $GITHUB_STEP_SUMMARY
else
- echo "::error title=E2E Curl Tests::❌ ${FAILED} failed, ${PASSED} passed"
+ echo "## ❌ E2E Full API Tests Failed" >> $GITHUB_STEP_SUMMARY
+ echo "**Passed:** $PASSED" >> $GITHUB_STEP_SUMMARY
+ echo "**Failed:** $FAILED" >> $GITHUB_STEP_SUMMARY
+ echo '```' >> $GITHUB_STEP_SUMMARY
+ echo "${{ steps.e2e.outputs.failures }}" >> $GITHUB_STEP_SUMMARY
+ echo '```' >> $GITHUB_STEP_SUMMARY
fi
- e2e-cli:
- name: E2E CLI Tests
- needs: recent
+ full-cli:
+ name: E2E Full CLI Tests
runs-on: ubuntu-latest
- timeout-minutes: 15
+ if: github.event_name == 'workflow_dispatch'
+ timeout-minutes: 20
steps:
- name: Checkout
@@ -249,18 +326,18 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- - name: Run CLI E2E tests
+ - name: Run full CLI E2E tests
id: e2e
run: |
set +e
- ./dev e2e cli 2>&1 | tee e2e-output.log
+ mkdir -p tests/e2e/results
+
+ ./dev e2e full-cli 2>&1 | tee e2e-output.log
EXIT_CODE=${PIPESTATUS[0]}
- PASSED=$(grep -oP 'Passed:\s*\K\d+' e2e-output.log | tail -1 || true)
- FAILED=$(grep -oP 'Failed:\s*\K\d+' e2e-output.log | tail -1 || true)
+ PASSED=$(grep -oP 'Passed:\s*\K\d+' e2e-output.log | awk '{s+=$1} END {print s+0}')
+ FAILED=$(grep -oP 'Failed:\s*\K\d+' e2e-output.log | awk '{s+=$1} END {print s+0}')
FAILURES=$(grep -E '✗.*failed' e2e-output.log | sed 's/.*✗ /- /' | head -10 || true)
- PASSED=${PASSED:-0}
- FAILED=${FAILED:-0}
echo "passed=$PASSED" >> $GITHUB_OUTPUT
echo "failed=$FAILED" >> $GITHUB_OUTPUT
@@ -280,18 +357,12 @@ jobs:
run: |
PASSED="${{ steps.e2e.outputs.passed }}"
FAILED="${{ steps.e2e.outputs.failed }}"
- PASSED="${PASSED:-0}"
- FAILED="${FAILED:-0}"
if [ "${{ steps.e2e.outcome }}" = "success" ]; then
- echo "## ✅ E2E CLI Tests Passed" >> $GITHUB_STEP_SUMMARY
- if [ "$PASSED" = "0" ]; then
- echo "All tests passed" >> $GITHUB_STEP_SUMMARY
- else
- echo "**$PASSED** tests passed" >> $GITHUB_STEP_SUMMARY
- fi
+ echo "## ✅ E2E Full CLI Tests Passed" >> $GITHUB_STEP_SUMMARY
+ echo "**$PASSED** tests passed" >> $GITHUB_STEP_SUMMARY
else
- echo "## ❌ E2E CLI Tests Failed" >> $GITHUB_STEP_SUMMARY
+ echo "## ❌ E2E Full CLI Tests Failed" >> $GITHUB_STEP_SUMMARY
echo "**Passed:** $PASSED" >> $GITHUB_STEP_SUMMARY
echo "**Failed:** $FAILED" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
@@ -299,19 +370,65 @@ jobs:
echo '```' >> $GITHUB_STEP_SUMMARY
fi
- - name: Report check annotation
+ full-extended:
+ name: E2E Full Extended Tests
+ runs-on: ubuntu-latest
+ if: github.event_name == 'workflow_dispatch'
+ timeout-minutes: 20
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v5
+
+ - name: Set up Go
+ uses: actions/setup-go@v6
+ with:
+ go-version-file: go.mod
+ cache: true
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v3
+
+ - name: Run full extended E2E tests
+ id: e2e
+ run: |
+ set +e
+ mkdir -p tests/e2e/results
+
+ ./dev e2e full-extended 2>&1 | tee e2e-output.log
+ EXIT_CODE=${PIPESTATUS[0]}
+
+ PASSED=$(grep -oP 'Passed:\s*\K\d+' e2e-output.log | awk '{s+=$1} END {print s+0}')
+ FAILED=$(grep -oP 'Failed:\s*\K\d+' e2e-output.log | awk '{s+=$1} END {print s+0}')
+ FAILURES=$(grep -E '✗.*failed' e2e-output.log | sed 's/.*✗ /- /' | head -10 || true)
+
+ echo "passed=$PASSED" >> $GITHUB_OUTPUT
+ echo "failed=$FAILED" >> $GITHUB_OUTPUT
+ {
+ echo 'failures<<EOF'
+ echo "$FAILURES"
+ echo 'EOF'
+ } >> $GITHUB_OUTPUT
+
+ exit $EXIT_CODE
+ env:
+ DOCKER_BUILDKIT: 1
+ COMPOSE_DOCKER_CLI_BUILD: 1
+
+ - name: Post summary
if: always()
run: |
PASSED="${{ steps.e2e.outputs.passed }}"
FAILED="${{ steps.e2e.outputs.failed }}"
- PASSED="${PASSED:-0}"
- FAILED="${FAILED:-0}"
+
if [ "${{ steps.e2e.outcome }}" = "success" ]; then
- if [ "$PASSED" = "0" ]; then
- echo "::notice title=E2E CLI Tests::✅ All tests passed"
- else
- echo "::notice title=E2E CLI Tests::✅ ${PASSED} tests passed"
- fi
+ echo "## ✅ E2E Full Extended Tests Passed" >> $GITHUB_STEP_SUMMARY
+ echo "**$PASSED** tests passed" >> $GITHUB_STEP_SUMMARY
else
- echo "::error title=E2E CLI Tests::❌ ${FAILED} failed, ${PASSED} passed"
+ echo "## ❌ E2E Full Extended Tests Failed" >> $GITHUB_STEP_SUMMARY
+ echo "**Passed:** $PASSED" >> $GITHUB_STEP_SUMMARY
+ echo "**Failed:** $FAILED" >> $GITHUB_STEP_SUMMARY
+ echo '```' >> $GITHUB_STEP_SUMMARY
+ echo "${{ steps.e2e.outputs.failures }}" >> $GITHUB_STEP_SUMMARY
+ echo '```' >> $GITHUB_STEP_SUMMARY
fi
diff --git a/TESTING.md b/TESTING.md
index 4a4bad9e..1874bdca 100644
--- a/TESTING.md
+++ b/TESTING.md
@@ -8,10 +8,14 @@ The `dev` developer toolkit is the easiest way to run checks and tests:
./dev # Interactive picker
./dev test # All tests (unit + E2E)
./dev test unit # Unit tests only
-./dev e2e # E2E tests (both curl and CLI)
-./dev e2e orchestrator # Orchestrator-heavy E2E tests only
-./dev e2e curl # E2E curl tests only
-./dev e2e cli # E2E CLI tests only
+./dev e2e # Release meta-suite (full API + full CLI + full extended)
+./dev e2e pr # PR meta-suite (recent + api-fast + cli-fast)
+./dev e2e recent # Recent E2E coverage for fail-fast feedback
+./dev e2e api-fast # PR-fast API suite
+./dev e2e cli-fast # PR-fast CLI suite
+./dev e2e full-api # Full API suite
+./dev e2e full-cli # Full CLI suite
+./dev e2e full-extended # Extended suite (recent + orchestrator)
./dev check # All checks (format, vet, build, lint)
./dev check go # Go checks only
./dev check security # Gosec security scan
@@ -33,37 +37,53 @@ Unit tests are standard Go tests that validate individual packages and functions
End-to-end tests launch a real pinchtab server with Chrome and run e2e-level tests against it.
-### Curl Tests (HTTP API)
+### PR Suites
```bash
-./dev e2e curl
+./dev e2e pr
+./dev e2e recent
+./dev e2e api-fast
+./dev e2e cli-fast
+```
+
+Use these on pull requests and during normal development:
+
+- `pr` runs the same E2E suite composition as the PR workflow
+- `recent` is the fail-fast bucket for newly added coverage
+- `api-fast` is the stable API smoke/regression set
+- `cli-fast` is the stable CLI smoke/regression set
+
+### Full API Suite
+
+```bash
+./dev e2e full-api
```
Runs 184 HTTP-level tests using curl against the server. Tests the REST API, navigation, snapshots, activity logging, and other HTTP endpoints.
-### CLI Tests
+### Full CLI Suite
```bash
-./dev e2e cli
+./dev e2e full-cli
```
Runs CLI e2e tests. Tests the command-line interface directly, including activity queries.
-### Both E2E Test Suites
+### Full Extended Suite
```bash
-./dev e2e
+./dev e2e full-extended
```
-Runs all E2E tests (curl + CLI, 226 tests total).
+Runs the extended/manual coverage bucket: recent edge-case scenarios plus the orchestration-focused suite, including remote bridge attachment and multi-instance flows.
-### Orchestrator E2E Suite
+### Release Meta-Suite
```bash
-./dev e2e orchestrator
+./dev e2e
```
-Runs the orchestration-focused curl scenarios, including multi-instance flows and remote bridge attachment against the dedicated `pinchtab-bridge` Compose service.
+Runs `full-api`, `full-cli`, and `full-extended` in sequence.
## Environment Variables
@@ -86,7 +106,7 @@ Everything is cleaned up automatically when tests finish.
## Test File Structure
-E2E tests are organized in two directories:
+E2E tests are organized by surface plus suite manifests:
- **`tests/e2e/scenarios/*.sh`** — HTTP curl-based tests (184 tests)
- Test the REST API directly
@@ -98,7 +118,13 @@ E2E tests are organized in two directories:
- **`tests/e2e/scenarios-cli/*.sh`** — CLI e2e tests (42 tests)
- Test the command-line interface
- - Use Docker Compose: `tests/e2e/docker-compose.cli.yml`
+ - Use Docker Compose: `tests/e2e/docker-compose-cli.yml`
+
+- **`tests/e2e/scenarios-recent/*.sh`** — recent edge-case coverage for fail-fast CI
+
+- **`tests/e2e/suites/*.txt`** — curated suite manifests
+ - `api-fast.txt`
+ - `cli-fast.txt`
Each test is a standalone bash script that:
1. Starts the test server (or uses existing)
@@ -108,7 +134,7 @@ Each test is a standalone bash script that:
## Writing New E2E Tests
-Create a new bash script in `tests/e2e/scenarios/` (for curl tests) or `tests/e2e/scenarios-cli/` (for CLI tests):
+Create a new bash script in `tests/e2e/scenarios/` (for API tests), `tests/e2e/scenarios-cli/` (for CLI tests), or `tests/e2e/scenarios-recent/` (for fresh fail-fast coverage):
### Example: Simple Curl Test
diff --git a/dev b/dev
index d2cf6912..6a995f95 100755
--- a/dev
+++ b/dev
@@ -23,11 +23,15 @@ COMMANDS=(
"check:🧪:All checks"
"test unit:🔬:Go unit tests"
"test dashboard:🔬:Dashboard unit tests"
- "e2e:🐳:E2E tests"
+ "e2e:🐳:E2E release suites"
+ " pr:🐳:E2E PR suite"
" recent:🐳:E2E Recent tests"
- " orchestrator:🐳:E2E Orchestrator tests"
- " curl:🐳:E2E Curl tests"
- " cli:🐳:E2E CLI tests"
+ " api-fast:🐳:E2E API fast tests"
+ " cli-fast:🐳:E2E CLI fast tests"
+ " full-api:🐳:E2E full API tests"
+ " full-cli:🐳:E2E full CLI tests"
+ " full-extended:🐳:E2E full extended tests"
+ " release:🐳:E2E release meta-suite"
"doctor:🩺:Setup dev environment"
"check go:🧪:Go only"
"check dashboard:🧪:Dashboard only"
@@ -40,13 +44,6 @@ COMMANDS=(
# ── Helpers ──────────────────────────────────────────────────────────
-build_e2e_cli_binary() {
- echo " ${MUTED}Building static binary for E2E CLI tests...${NC}"
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o tests/e2e/runner-cli/pinchtab ./cmd/pinchtab
- echo " ${SUCCESS}✓${NC} Binary built"
- echo ""
-}
-
show_help() {
echo ""
echo " ${ACCENT}${BOLD}🦀 Pinchtab Dev${NC}"
@@ -135,133 +132,11 @@ run_command() {
exec bash scripts/test.sh system
;;
"e2e"*)
- # Ensure extension fixtures are readable and traversable by the docker user (UID 1000)
- # Directories need +x to be searchable.
- chmod -R 755 tests/e2e/fixtures/test-extension* 2>/dev/null || true
-
- case "$target" in
- "e2e")
- echo " ${ACCENT}${BOLD}🐳 E2E Recent tests (Docker)${NC}"
- echo ""
- docker compose -f tests/e2e/docker-compose.yml run --build --rm runner /scenarios-recent/run.sh
- local recent_exit=$?
- if [ $recent_exit -ne 0 ]; then
- echo -e "${ERROR} Recent tests failed. Showing pinchtab logs:${NC}"
- docker compose -f tests/e2e/docker-compose.yml logs pinchtab | tail -n 50
- docker compose -f tests/e2e/docker-compose.yml down -v 2>/dev/null
- exit 1
- fi
- docker compose -f tests/e2e/docker-compose.yml down -v 2>/dev/null
-
- echo ""
- echo " ${ACCENT}${BOLD}🐳 E2E Full Curl tests (Docker)${NC}"
- echo ""
- docker compose -f tests/e2e/docker-compose.yml up --abort-on-container-exit
- local curl_exit=$?
- if [ $curl_exit -ne 0 ]; then
- docker compose -f tests/e2e/docker-compose.yml logs pinchtab | tail -n 50
- fi
- docker compose -f tests/e2e/docker-compose.yml down -v 2>/dev/null
-
- echo ""
- echo " ${ACCENT}${BOLD}🐳 E2E Orchestrator tests (Docker)${NC}"
- echo ""
- docker compose -f tests/e2e/docker-compose-orchestrator.yml run --build --rm runner
- local orch_exit=$?
- if [ $orch_exit -ne 0 ]; then
- docker compose -f tests/e2e/docker-compose-orchestrator.yml logs pinchtab | tail -n 50 || true
- docker compose -f tests/e2e/docker-compose-orchestrator.yml logs pinchtab-bridge | tail -n 50 || true
- fi
- docker compose -f tests/e2e/docker-compose-orchestrator.yml down -v 2>/dev/null
-
- echo ""
- echo " ${ACCENT}${BOLD}🐳 E2E CLI tests (Docker)${NC}"
- echo ""
- build_e2e_cli_binary
- docker compose -f tests/e2e/docker-compose-cli.yml up --build --abort-on-container-exit
- local cli_exit=$?
- if [ $cli_exit -ne 0 ]; then
- docker compose -f tests/e2e/docker-compose-cli.yml logs pinchtab | tail -n 50
- fi
- docker compose -f tests/e2e/docker-compose-cli.yml down -v 2>/dev/null
-
- echo ""
- if [ $curl_exit -ne 0 ] || [ $orch_exit -ne 0 ] || [ $cli_exit -ne 0 ]; then
- echo " ${ERROR}Some E2E tests failed${NC}"
- exit 1
- fi
- echo " ${SUCCESS}All E2E tests passed${NC}"
- exit 0
- ;;
- "e2e curl")
- echo " ${ACCENT}${BOLD}🐳 E2E Curl tests (Docker)${NC}"
- echo ""
- docker compose -f tests/e2e/docker-compose.yml up --build --abort-on-container-exit
- local curl_exit=$?
- if [ $curl_exit -ne 0 ]; then
- docker compose -f tests/e2e/docker-compose.yml logs pinchtab | tail -n 50
- fi
- docker compose -f tests/e2e/docker-compose.yml down -v 2>/dev/null
- exit $curl_exit
- ;;
- "e2e cli")
- echo " ${ACCENT}${BOLD}🐳 E2E CLI tests (Docker)${NC}"
- echo ""
- build_e2e_cli_binary
- docker compose -f tests/e2e/docker-compose-cli.yml up --build --abort-on-container-exit
- local cli_exit=$?
- if [ $cli_exit -ne 0 ]; then
- docker compose -f tests/e2e/docker-compose-cli.yml logs pinchtab | tail -n 50
- fi
- docker compose -f tests/e2e/docker-compose-cli.yml down -v 2>/dev/null
- exit $cli_exit
- ;;
- "e2e orchestrator")
- echo " ${ACCENT}${BOLD}🐳 E2E Orchestrator tests (Docker)${NC}"
- echo ""
- docker compose -f tests/e2e/docker-compose-orchestrator.yml run --build --rm runner
- local orch_exit=$?
- if [ $orch_exit -ne 0 ]; then
- docker compose -f tests/e2e/docker-compose-orchestrator.yml logs pinchtab | tail -n 50 || true
- docker compose -f tests/e2e/docker-compose-orchestrator.yml logs pinchtab-bridge | tail -n 50 || true
- fi
- docker compose -f tests/e2e/docker-compose-orchestrator.yml down -v 2>/dev/null
- exit $orch_exit
- ;;
- "e2e recent")
- echo " ${ACCENT}${BOLD}🐳 E2E Recent tests (Docker)${NC}"
- echo ""
- docker compose -f tests/e2e/docker-compose.yml run --build --rm runner /scenarios-recent/run.sh
- local recent_exit=$?
- if [ $recent_exit -ne 0 ]; then
- echo ""
- echo -e "${ERROR} Recent tests failed. Dumping pinchtab logs:${NC}"
- docker compose -f tests/e2e/docker-compose.yml logs pinchtab || true
- echo ""
- echo -e "${ERROR} Filtered Chrome/extension lines:${NC}"
- docker compose -f tests/e2e/docker-compose.yml logs pinchtab 2>/dev/null | grep -Ei 'chrome|extension|devtools|load-extension|disable-extensions|headless|warning|error' || true
- echo ""
- echo -e "${ERROR} Instance inventory:${NC}"
- local instances_json
- instances_json=$(curl -sf http://localhost:9999/instances || true)
- if [ -n "$instances_json" ]; then
- echo "$instances_json"
- if command -v jq >/dev/null 2>&1; then
- while IFS= read -r inst_id; do
- [ -z "$inst_id" ] && continue
- echo ""
- echo -e "${ERROR} Instance logs for ${inst_id}:${NC}"
- curl -sf "http://localhost:9999/instances/${inst_id}/logs" || true
- done < <(echo "$instances_json" | jq -r '.[].id')
- fi
- else
- echo " unable to fetch /instances from localhost:9999"
- fi
- fi
- docker compose -f tests/e2e/docker-compose.yml down -v 2>/dev/null
- exit $recent_exit
- ;;
- esac
+ local suite="release"
+ if [ "$target" != "e2e" ]; then
+ suite="${target#e2e }"
+ fi
+ exec bash scripts/e2e.sh "$suite"
;;
"dev") exec bash scripts/dev.sh ;;
"build") exec bash scripts/build.sh ;;
diff --git a/internal/bridge/network.go b/internal/bridge/network.go
index 929976eb..1b78a3ab 100644
--- a/internal/bridge/network.go
+++ b/internal/bridge/network.go
@@ -12,6 +12,7 @@ import (
"github.com/chromedp/cdproto/cdp"
"github.com/chromedp/cdproto/network"
"github.com/chromedp/chromedp"
+ "github.com/pinchtab/pinchtab/internal/config"
)
// DefaultNetworkBufferSize is the default number of entries kept per tab.
@@ -52,6 +53,7 @@ type NetworkBuffer struct {
// NewNetworkBuffer creates a ring buffer with the given capacity.
func NewNetworkBuffer(size int) *NetworkBuffer {
+ size = config.ClampNetworkBufferSize(size)
if size <= 0 {
size = DefaultNetworkBufferSize
}
@@ -229,6 +231,7 @@ type NetworkMonitor struct {
// NewNetworkMonitor creates a new monitor with the given per-tab buffer size.
func NewNetworkMonitor(bufferSize int) *NetworkMonitor {
+ bufferSize = config.ClampNetworkBufferSize(bufferSize)
if bufferSize <= 0 {
bufferSize = DefaultNetworkBufferSize
}
diff --git a/internal/bridge/network_test.go b/internal/bridge/network_test.go
index 92c671df..c005f5df 100644
--- a/internal/bridge/network_test.go
+++ b/internal/bridge/network_test.go
@@ -4,6 +4,8 @@ import (
"fmt"
"testing"
"time"
+
+ "github.com/pinchtab/pinchtab/internal/config"
)
func TestNetworkBuffer_AddAndGet(t *testing.T) {
@@ -340,3 +342,17 @@ func TestNewNetworkBuffer_ZeroDefaultsTo100(t *testing.T) {
t.Errorf("expected maxSize %d, got %d", DefaultNetworkBufferSize, buf.maxSize)
}
}
+
+func TestNewNetworkBuffer_ClampsOversizedBuffer(t *testing.T) {
+ buf := NewNetworkBuffer(config.MaxNetworkBufferSize + 1)
+ if buf.maxSize != config.MaxNetworkBufferSize {
+ t.Errorf("expected maxSize %d, got %d", config.MaxNetworkBufferSize, buf.maxSize)
+ }
+}
+
+func TestNewNetworkMonitor_ClampsOversizedBuffer(t *testing.T) {
+ nm := NewNetworkMonitor(config.MaxNetworkBufferSize + 1)
+ if nm.bufSize != config.MaxNetworkBufferSize {
+ t.Errorf("expected bufSize %d, got %d", config.MaxNetworkBufferSize, nm.bufSize)
+ }
+}
diff --git a/internal/config/config_load.go b/internal/config/config_load.go
index 3c76d47a..163772e2 100644
--- a/internal/config/config_load.go
+++ b/internal/config/config_load.go
@@ -186,7 +186,7 @@ func applyFileConfig(cfg *RuntimeConfig, fc *FileConfig) {
cfg.Engine = fc.Server.Engine
}
if fc.Server.NetworkBufferSize != nil && *fc.Server.NetworkBufferSize > 0 {
- cfg.NetworkBufferSize = *fc.Server.NetworkBufferSize
+ cfg.NetworkBufferSize = ClampNetworkBufferSize(*fc.Server.NetworkBufferSize)
}
// Security
if fc.Security.AllowEvaluate != nil {
diff --git a/internal/config/config_load_test.go b/internal/config/config_load_test.go
index 55970f00..3d92d438 100644
--- a/internal/config/config_load_test.go
+++ b/internal/config/config_load_test.go
@@ -227,6 +227,20 @@ func TestApplyFileConfigToRuntimeResetsSecurityFlagsToSafeDefaults(t *testing.T)
}
}
+func TestApplyFileConfigToRuntime_ClampsNetworkBufferSize(t *testing.T) {
+ cfg := &RuntimeConfig{}
+ oversized := MaxNetworkBufferSize + 1
+ fc := &FileConfig{
+ Server: ServerConfig{NetworkBufferSize: &oversized},
+ }
+
+ ApplyFileConfigToRuntime(cfg, fc)
+
+ if cfg.NetworkBufferSize != MaxNetworkBufferSize {
+ t.Errorf("ApplyFileConfigToRuntime NetworkBufferSize = %d, want %d", cfg.NetworkBufferSize, MaxNetworkBufferSize)
+ }
+}
+
// clearConfigEnvVars unsets all config-related env vars for clean tests.
func clearConfigEnvVars(t *testing.T) {
t.Helper()
diff --git a/internal/config/network_buffer.go b/internal/config/network_buffer.go
new file mode 100644
index 00000000..c28bd617
--- /dev/null
+++ b/internal/config/network_buffer.go
@@ -0,0 +1,14 @@
+package config
+
+const MaxNetworkBufferSize = 10000
+
+// ClampNetworkBufferSize bounds per-tab network buffers to a safe maximum.
+func ClampNetworkBufferSize(size int) int {
+ if size <= 0 {
+ return 0
+ }
+ if size > MaxNetworkBufferSize {
+ return MaxNetworkBufferSize
+ }
+ return size
+}
diff --git a/internal/config/validate.go b/internal/config/validate.go
index b95d89fd..e141445b 100644
--- a/internal/config/validate.go
+++ b/internal/config/validate.go
@@ -31,6 +31,14 @@ func ValidateFileConfig(fc *FileConfig) []error {
errs = append(errs, err)
}
}
+ if fc.Server.NetworkBufferSize != nil {
+ if *fc.Server.NetworkBufferSize < 1 || *fc.Server.NetworkBufferSize > MaxNetworkBufferSize {
+ errs = append(errs, ValidationError{
+ Field: "server.networkBufferSize",
+ Message: fmt.Sprintf("must be between 1 and %d (got %d)", MaxNetworkBufferSize, *fc.Server.NetworkBufferSize),
+ })
+ }
+ }
if fc.MultiInstance.InstancePortStart != nil && fc.MultiInstance.InstancePortEnd != nil {
if *fc.MultiInstance.InstancePortStart > *fc.MultiInstance.InstancePortEnd {
errs = append(errs, ValidationError{
diff --git a/internal/config/validate_test.go b/internal/config/validate_test.go
index 4e7f5d74..9037c095 100644
--- a/internal/config/validate_test.go
+++ b/internal/config/validate_test.go
@@ -133,6 +133,38 @@ func TestValidateFileConfig_InvalidPort(t *testing.T) {
}
}
+func TestValidateFileConfig_InvalidNetworkBufferSize(t *testing.T) {
+ zero := 0
+ negative := -1
+ tooLarge := MaxNetworkBufferSize + 1
+ valid := MaxNetworkBufferSize
+
+ tests := []struct {
+ name string
+ size *int
+ wantErr bool
+ }{
+ {"nil", nil, false},
+ {"valid", &valid, false},
+ {"zero", &zero, true},
+ {"negative", &negative, true},
+ {"too_large", &tooLarge, true},
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ fc := &FileConfig{
+ Server: ServerConfig{NetworkBufferSize: tt.size},
+ }
+ errs := ValidateFileConfig(fc)
+ hasErr := len(errs) > 0
+ if hasErr != tt.wantErr {
+ t.Errorf("networkBufferSize=%v: got error=%v, want error=%v (errs: %v)", tt.size, hasErr, tt.wantErr, errs)
+ }
+ })
+ }
+}
+
func TestValidateFileConfig_InvalidStealthLevel(t *testing.T) {
tests := []struct {
level string
diff --git a/scripts/e2e.sh b/scripts/e2e.sh
new file mode 100644
index 00000000..5696f09f
--- /dev/null
+++ b/scripts/e2e.sh
@@ -0,0 +1,220 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+cd "$(dirname "$0")/.."
+
+BOLD=$'\033[1m'
+ACCENT=$'\033[38;2;251;191;36m'
+MUTED=$'\033[38;2;90;100;128m'
+SUCCESS=$'\033[38;2;0;229;204m'
+ERROR=$'\033[38;2;230;57;70m'
+NC=$'\033[0m'
+
+build_e2e_cli_binary() {
+ echo " ${MUTED}Building static binary for E2E CLI tests...${NC}"
+ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o tests/e2e/runner-cli/pinchtab ./cmd/pinchtab
+ echo " ${SUCCESS}✓${NC} Binary built"
+ echo ""
+}
+
+compose_down() {
+ local compose_file="$1"
+ docker compose -f "${compose_file}" down -v 2>/dev/null || true
+}
+
+run_recent() {
+ echo " ${ACCENT}${BOLD}🐳 E2E Recent tests (Docker)${NC}"
+ echo ""
+ set +e
+ docker compose -f tests/e2e/docker-compose.yml run --build --rm runner /scenarios-recent/run.sh
+ local recent_exit=$?
+ set -e
+ if [ "${recent_exit}" -ne 0 ]; then
+ echo -e "${ERROR} Recent tests failed. Showing pinchtab logs:${NC}"
+ docker compose -f tests/e2e/docker-compose.yml logs pinchtab | tail -n 50 || true
+ fi
+ compose_down tests/e2e/docker-compose.yml
+ return "${recent_exit}"
+}
+
+run_api_fast() {
+ echo " ${ACCENT}${BOLD}🐳 E2E API Fast tests (Docker)${NC}"
+ echo ""
+ set +e
+ docker compose -f tests/e2e/docker-compose.yml run --build --rm runner /scenarios/run-fast.sh
+ local api_fast_exit=$?
+ set -e
+ if [ "${api_fast_exit}" -ne 0 ]; then
+ docker compose -f tests/e2e/docker-compose.yml logs pinchtab | tail -n 50 || true
+ fi
+ compose_down tests/e2e/docker-compose.yml
+ return "${api_fast_exit}"
+}
+
+run_full_api() {
+ echo " ${ACCENT}${BOLD}🐳 E2E Full API tests (Docker)${NC}"
+ echo ""
+ set +e
+ docker compose -f tests/e2e/docker-compose.yml up --build --abort-on-container-exit
+ local api_exit=$?
+ set -e
+ if [ "${api_exit}" -ne 0 ]; then
+ docker compose -f tests/e2e/docker-compose.yml logs pinchtab | tail -n 50 || true
+ fi
+ compose_down tests/e2e/docker-compose.yml
+ return "${api_exit}"
+}
+
+run_cli_fast() {
+ echo " ${ACCENT}${BOLD}🐳 E2E CLI Fast tests (Docker)${NC}"
+ echo ""
+ build_e2e_cli_binary
+ set +e
+ docker compose -f tests/e2e/docker-compose-cli.yml run --build --rm runner /bin/bash /scenarios/run-fast.sh
+ local cli_fast_exit=$?
+ set -e
+ if [ "${cli_fast_exit}" -ne 0 ]; then
+ docker compose -f tests/e2e/docker-compose-cli.yml logs pinchtab | tail -n 50 || true
+ fi
+ compose_down tests/e2e/docker-compose-cli.yml
+ return "${cli_fast_exit}"
+}
+
+run_full_cli() {
+ echo " ${ACCENT}${BOLD}🐳 E2E Full CLI tests (Docker)${NC}"
+ echo ""
+ build_e2e_cli_binary
+ set +e
+ docker compose -f tests/e2e/docker-compose-cli.yml up --build --abort-on-container-exit
+ local cli_exit=$?
+ set -e
+ if [ "${cli_exit}" -ne 0 ]; then
+ docker compose -f tests/e2e/docker-compose-cli.yml logs pinchtab | tail -n 50 || true
+ fi
+ compose_down tests/e2e/docker-compose-cli.yml
+ return "${cli_exit}"
+}
+
+run_orchestrator() {
+ echo " ${ACCENT}${BOLD}🐳 E2E Orchestrator tests (Docker)${NC}"
+ echo ""
+ set +e
+ docker compose -f tests/e2e/docker-compose-orchestrator.yml run --build --rm runner
+ local orch_exit=$?
+ set -e
+ if [ "${orch_exit}" -ne 0 ]; then
+ docker compose -f tests/e2e/docker-compose-orchestrator.yml logs pinchtab | tail -n 50 || true
+ docker compose -f tests/e2e/docker-compose-orchestrator.yml logs pinchtab-bridge | tail -n 50 || true
+ fi
+ compose_down tests/e2e/docker-compose-orchestrator.yml
+ return "${orch_exit}"
+}
+
+run_full_extended() {
+ local recent_exit=0
+ local orch_exit=0
+
+ run_recent || recent_exit=$?
+
+ echo ""
+
+ run_orchestrator || orch_exit=$?
+
+ echo ""
+ if [ "${recent_exit}" -ne 0 ] || [ "${orch_exit}" -ne 0 ]; then
+ echo " ${ERROR}Extended E2E suites failed${NC}"
+ echo " ${MUTED}exit codes: recent=${recent_exit}, orchestrator=${orch_exit}${NC}"
+ return 1
+ fi
+ echo " ${SUCCESS}Extended E2E suites passed${NC}"
+ return 0
+}
+
+run_pr() {
+ local recent_exit=0
+ local api_fast_exit=0
+ local cli_fast_exit=0
+
+ run_recent || recent_exit=$?
+
+ echo ""
+
+ run_api_fast || api_fast_exit=$?
+
+ echo ""
+
+ run_cli_fast || cli_fast_exit=$?
+
+ echo ""
+ if [ "${recent_exit}" -ne 0 ] || [ "${api_fast_exit}" -ne 0 ] || [ "${cli_fast_exit}" -ne 0 ]; then
+ echo " ${ERROR}PR E2E suites failed${NC}"
+ echo " ${MUTED}exit codes: recent=${recent_exit}, api-fast=${api_fast_exit}, cli-fast=${cli_fast_exit}${NC}"
+ return 1
+ fi
+ echo " ${SUCCESS}PR E2E suites passed${NC}"
+ return 0
+}
+
+run_release() {
+ local api_exit=0
+ local cli_exit=0
+ local extended_exit=0
+
+ run_full_api || api_exit=$?
+
+ echo ""
+
+ run_full_cli || cli_exit=$?
+
+ echo ""
+
+ run_full_extended || extended_exit=$?
+
+ echo ""
+ if [ "${api_exit}" -ne 0 ] || [ "${cli_exit}" -ne 0 ] || [ "${extended_exit}" -ne 0 ]; then
+ echo " ${ERROR}Some E2E suites failed${NC}"
+ echo " ${MUTED}exit codes: full-api=${api_exit}, full-cli=${cli_exit}, full-extended=${extended_exit}${NC}"
+ return 1
+ fi
+ echo " ${SUCCESS}All E2E suites passed${NC}"
+ return 0
+}
+
+chmod -R 755 tests/e2e/fixtures/test-extension* 2>/dev/null || true
+
+suite="${1:-release}"
+
+case "${suite}" in
+ pr)
+ run_pr
+ ;;
+ recent)
+ run_recent
+ ;;
+ api-fast)
+ run_api_fast
+ ;;
+ cli-fast)
+ run_cli_fast
+ ;;
+ full-api|curl)
+ run_full_api
+ ;;
+ full-cli|cli)
+ run_full_cli
+ ;;
+ full-extended)
+ run_full_extended
+ ;;
+ orchestrator)
+ run_orchestrator
+ ;;
+ release|all)
+ run_release
+ ;;
+ *)
+ echo "Unknown E2E suite: ${suite}" >&2
+ echo "Available suites: pr, recent, api-fast, cli-fast, full-api, full-cli, full-extended, orchestrator, release" >&2
+ exit 1
+ ;;
+esac
diff --git a/tests/e2e/README.md b/tests/e2e/README.md
index 7ef129f0..7c9ad6af 100644
--- a/tests/e2e/README.md
+++ b/tests/e2e/README.md
@@ -7,11 +7,14 @@ End-to-end tests for PinchTab that exercise the full stack including browser aut
### With Docker (recommended)
```bash
-./dev e2e # Run all E2E tests
+./dev e2e # Run the release meta-suite
+./dev e2e pr # Run the PR meta-suite
./dev e2e recent # Run only recently added/changed scenarios (fast feedback)
-./dev e2e orchestrator # Run orchestrator-heavy scenarios only
-./dev e2e curl # Run only Curl-based scenarios
-./dev e2e cli # Run only CLI-based scenarios
+./dev e2e api-fast # Run the stable PR-fast API suite
+./dev e2e cli-fast # Run the stable PR-fast CLI suite
+./dev e2e full-api # Run the full API suite
+./dev e2e full-cli # Run the full CLI suite
+./dev e2e full-extended # Run the manual/pre-release extended suite
```
Or directly:
@@ -38,16 +41,27 @@ tests/e2e/
├── scenarios/ # Test scripts
│ ├── common.sh # Shared utilities
│ ├── run-all.sh # Generic curl scenarios
+│ ├── run-fast.sh # API fast suite runner
│ ├── 01-health.sh
│ ├── 02-navigate.sh
│ ├── 03-snapshot.sh
│ ├── 04-tabs-api.sh # Regression test for #207
│ ├── 05-actions.sh
│ └── 06-screenshot-pdf.sh
+├── scenarios-cli/ # CLI scenarios
+│ ├── run-all.sh
+│ ├── run-fast.sh # CLI fast suite runner
+│ └── ...
+├── scenarios-recent/ # Recent edge-case coverage
+│ ├── run.sh
+│ └── 41-extensions.sh
├── scenarios-orchestrator/ # Multi-instance and attach flows
│ ├── run-all.sh
│ ├── 01-attach-bridge.sh
│ └── 31-multi-instance.sh
+├── suites/ # Curated PR-fast suite manifests
+│ ├── api-fast.txt
+│ └── cli-fast.txt
├── runner/ # Test runner container
│ └── Dockerfile
└── results/ # Test output (gitignored)
@@ -114,9 +128,8 @@ Add HTML files to `fixtures/` for testing specific scenarios:
## CI Integration
The E2E tests run automatically:
-- On release tags (`v*`)
-- On PRs that modify `tests/e2e/`
-- Manually via workflow dispatch
+- On PRs and pushes to `main`: `recent`, `api-fast`, and `cli-fast`
+- Manually via workflow dispatch: `full-api`, `full-cli`, and `full-extended`
## Debugging
diff --git a/tests/e2e/docker-compose-cli.yml b/tests/e2e/docker-compose-cli.yml
index 6f359ca1..87be5380 100644
--- a/tests/e2e/docker-compose-cli.yml
+++ b/tests/e2e/docker-compose-cli.yml
@@ -42,5 +42,6 @@ services:
- FIXTURES_URL=http://fixtures:80
volumes:
- ./scenarios-cli:/scenarios:ro
+ - ./suites:/e2e-suites:ro
- ./results:/results
command: ["/scenarios/run-all.sh"]
diff --git a/tests/e2e/docker-compose.yml b/tests/e2e/docker-compose.yml
index 1efc6e7a..cfa4a4c5 100644
--- a/tests/e2e/docker-compose.yml
+++ b/tests/e2e/docker-compose.yml
@@ -89,5 +89,6 @@ services:
volumes:
- ./scenarios:/scenarios:ro
- ./scenarios-recent:/scenarios-recent:ro
+ - ./suites:/e2e-suites:ro
- ./results:/results
command: ["/scenarios/run-all.sh"]
diff --git a/tests/e2e/scenarios-cli/run-all.sh b/tests/e2e/scenarios-cli/run-all.sh
index 4bcf554a..555b7d33 100755
--- a/tests/e2e/scenarios-cli/run-all.sh
+++ b/tests/e2e/scenarios-cli/run-all.sh
@@ -40,3 +40,9 @@ for script in "$SCRIPT_DIR"/[0-9][0-9]-*.sh; do
done
print_summary
+
+if [ -d "${RESULTS_DIR:-}" ]; then
+ echo "passed=$TESTS_PASSED" > "${RESULTS_DIR}/summary-cli-full.txt"
+ echo "failed=$TESTS_FAILED" >> "${RESULTS_DIR}/summary-cli-full.txt"
+ echo "timestamp=$(date -u +%Y-%m-%dT%H:%M:%SZ)" >> "${RESULTS_DIR}/summary-cli-full.txt"
+fi
diff --git a/tests/e2e/scenarios-cli/run-fast.sh b/tests/e2e/scenarios-cli/run-fast.sh
new file mode 100644
index 00000000..5ea96059
--- /dev/null
+++ b/tests/e2e/scenarios-cli/run-fast.sh
@@ -0,0 +1,61 @@
+#!/bin/bash
+# run-fast.sh - Run the curated PR-fast CLI scenarios.
+
+set -uo pipefail
+
+SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
+SUITE_FILE="${E2E_SUITE_FILE:-/e2e-suites/cli-fast.txt}"
+
+source "${SCRIPT_DIR}/common.sh"
+
+echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
+echo " 🦀 PinchTab CLI Fast E2E Suite"
+echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
+echo ""
+echo " Server: $E2E_SERVER"
+echo " Fixtures: $FIXTURES_URL"
+echo " Suite file: $SUITE_FILE"
+echo ""
+
+if [ ! -f "${SUITE_FILE}" ]; then
+ echo "suite manifest not found: ${SUITE_FILE}" >&2
+ exit 1
+fi
+
+wait_for_instance_ready "$E2E_SERVER"
+
+if ! command -v pinchtab &> /dev/null; then
+ echo "ERROR: pinchtab CLI not found in PATH"
+ exit 1
+fi
+
+echo ""
+echo "Running CLI fast tests..."
+echo ""
+
+while IFS= read -r script_name || [ -n "${script_name}" ]; do
+ case "${script_name}" in
+ ''|'#'*)
+ continue
+ ;;
+ esac
+
+ script_path="${SCRIPT_DIR}/${script_name}"
+ if [ ! -f "${script_path}" ]; then
+ echo "suite entry not found: ${script_path}" >&2
+ exit 1
+ fi
+
+ echo -e "${YELLOW}Running: $(basename "${script_name}")${NC}"
+ echo ""
+ source "${script_path}"
+ echo ""
+done < "${SUITE_FILE}"
+
+print_summary
+
+if [ -d "${RESULTS_DIR:-}" ]; then
+ echo "passed=$TESTS_PASSED" > "${RESULTS_DIR}/summary-cli-fast.txt"
+ echo "failed=$TESTS_FAILED" >> "${RESULTS_DIR}/summary-cli-fast.txt"
+ echo "timestamp=$(date -u +%Y-%m-%dT%H:%M:%SZ)" >> "${RESULTS_DIR}/summary-cli-fast.txt"
+fi
diff --git a/tests/e2e/scenarios-orchestrator/run-all.sh b/tests/e2e/scenarios-orchestrator/run-all.sh
index 4d0d30a8..6e34c814 100644
--- a/tests/e2e/scenarios-orchestrator/run-all.sh
+++ b/tests/e2e/scenarios-orchestrator/run-all.sh
@@ -30,3 +30,11 @@ for script in "${SCRIPT_DIR}"/[0-9][0-9]-*.sh; do
echo ""
fi
done
+
+print_summary
+
+if [ -d "${RESULTS_DIR:-}" ]; then
+ echo "passed=$TESTS_PASSED" > "${RESULTS_DIR}/summary-orchestrator.txt"
+ echo "failed=$TESTS_FAILED" >> "${RESULTS_DIR}/summary-orchestrator.txt"
+ echo "timestamp=$(date -u +%Y-%m-%dT%H:%M:%SZ)" >> "${RESULTS_DIR}/summary-orchestrator.txt"
+fi
diff --git a/tests/e2e/scenarios-recent/run.sh b/tests/e2e/scenarios-recent/run.sh
index 9948f808..eca68740 100755
--- a/tests/e2e/scenarios-recent/run.sh
+++ b/tests/e2e/scenarios-recent/run.sh
@@ -25,7 +25,8 @@ fi
echo ""
# Recent test files — add new scenarios here for fast CI feedback.
-# Move to the full suite (run-all.sh) once stable.
+# Graduate stable coverage into api-fast/cli-fast or full-extended once the
+# feature settles, so "recent" stays intentionally small.
# All test files in this directory run as the recent suite.
for script in "${SCRIPT_DIR}"/[0-9][0-9]-*.sh; do
if [ -f "$script" ]; then
diff --git a/tests/e2e/scenarios/run-fast.sh b/tests/e2e/scenarios/run-fast.sh
new file mode 100644
index 00000000..9157b36f
--- /dev/null
+++ b/tests/e2e/scenarios/run-fast.sh
@@ -0,0 +1,58 @@
+#!/bin/bash
+# run-fast.sh - Run the curated PR-fast API scenarios.
+
+set -uo pipefail
+
+SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
+SUITE_FILE="${E2E_SUITE_FILE:-/e2e-suites/api-fast.txt}"
+
+source "${SCRIPT_DIR}/common.sh"
+
+echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
+echo -e "${BLUE}PinchTab E2E API Fast Suite${NC}"
+echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
+echo "E2E_SERVER: ${E2E_SERVER}"
+echo "FIXTURES_URL: ${FIXTURES_URL}"
+echo "SUITE_FILE: ${SUITE_FILE}"
+echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
+echo ""
+
+if [ ! -f "${SUITE_FILE}" ]; then
+ echo "suite manifest not found: ${SUITE_FILE}" >&2
+ exit 1
+fi
+
+echo "Waiting for instances to become ready..."
+wait_for_instance_ready "${E2E_SERVER}"
+wait_for_instance_ready "${E2E_SECURE_SERVER}"
+if [ -n "${E2E_LITE_SERVER:-}" ]; then
+ wait_for_instance_ready "${E2E_LITE_SERVER}"
+fi
+echo ""
+
+while IFS= read -r script_name || [ -n "${script_name}" ]; do
+ case "${script_name}" in
+ ''|'#'*)
+ continue
+ ;;
+ esac
+
+ script_path="${SCRIPT_DIR}/${script_name}"
+ if [ ! -f "${script_path}" ]; then
+ echo "suite entry not found: ${script_path}" >&2
+ exit 1
+ fi
+
+ echo -e "${YELLOW}Running: ${script_name}${NC}"
+ echo ""
+ source "${script_path}"
+ echo ""
+done < "${SUITE_FILE}"
+
+print_summary
+
+if [ -d "${RESULTS_DIR:-}" ]; then
+ echo "passed=$TESTS_PASSED" > "${RESULTS_DIR}/summary-api-fast.txt"
+ echo "failed=$TESTS_FAILED" >> "${RESULTS_DIR}/summary-api-fast.txt"
+ echo "timestamp=$(date -u +%Y-%m-%dT%H:%M:%SZ)" >> "${RESULTS_DIR}/summary-api-fast.txt"
+fi
diff --git a/tests/e2e/suites/api-fast.txt b/tests/e2e/suites/api-fast.txt
new file mode 100644
index 00000000..60eb6996
--- /dev/null
+++ b/tests/e2e/suites/api-fast.txt
@@ -0,0 +1,8 @@
+# Stable PR-fast API coverage: health, navigation, tabs, snapshot, actions, find, text.
+01-health.sh
+02-navigate.sh
+03-snapshot.sh
+04-tabs-api.sh
+05-actions.sh
+07-find.sh
+17-text-extraction.sh
diff --git a/tests/e2e/suites/cli-fast.txt b/tests/e2e/suites/cli-fast.txt
new file mode 100644
index 00000000..2dd982bc
--- /dev/null
+++ b/tests/e2e/suites/cli-fast.txt
@@ -0,0 +1,7 @@
+# Stable PR-fast CLI coverage: health, navigation, tabs, snapshot, actions, text.
+09-health.sh
+01-nav.sh
+02-snap.sh
+03-actions.sh
+04-tabs.sh
+06-text.sh