High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.
autorun: consolidate all test results into v0.4.0-test-summary.md
bot58ed5b637a46
diff --git a/tests/bosch-test-00.md b/tests/bosch-test-00.mddeleted file mode 100644index 14e89fba..00000000--- a/tests/bosch-test-00.md+++ /dev/null@@ -1,68 +0,0 @@-# Pinchtab Autorun Test Report — Hour 00-**Date:** 2026-02-17 00:32 UTC-**Branch:** autorun-**Build:** f0d541e--## Health Check-Response: `{"cdp":"","status":"ok","tabs":1}`-Result: ✅ PASS--## Per-Site Tests & Performance--### example.com--**Navigate:** 311ms — title: `Example Domain`-**Snapshot:** 32ms — 747B (~186 tok) — 8 nodes — JSON valid: yes-**Interactive:** 22ms — 1 nodes-**Text:** 23ms — 190B (~47 tok) — `{"text":"Example DomainThis domain is for use in documentation examples without `--### news.ycombinator.com--**Navigate:** 687ms — title: `Hacker News`-**Snapshot:** 43ms — 74282B (~18570 tok) — 966 nodes — JSON valid: yes-**Interactive:** 38ms — 226 nodes-**Text:** 23ms — 3789B (~947 tok) — `{"text":"Hacker Newsnew | past | comments | ask | show | jobs | submitlogin1.Stu`--### github.com/pinchtab/pinchtab--**Navigate:** 899ms — title: `GitHub - pinchtab/pinchtab`-**Snapshot:** 91ms — 117605B (~29401 tok) — 1482 nodes — JSON valid: yes-**Interactive:** 62ms — 154 nodes-**Text:** 27ms — 9886B (~2471 tok) — `{"text":"Browser control for AI agents.\n 12MB Go binary. Zero config. Accessib`--### finance.yahoo.com--**Navigate:** 498ms — title: `Your privacy choices`-**Snapshot:** 26ms — 6119B (~1529 tok) — 68 nodes — JSON valid: yes-**Interactive:** 23ms — 12 nodes-**Text:** 22ms — 3076B (~769 tok) — `{"text":"Your privacy is important to us\n\n `--### stackoverflow.com--**Navigate:** 967ms — title: `Newest Questions - Stack Overflow`-**Snapshot:** 84ms — 65505B (~16376 tok) — 764 nodes — JSON valid: yes-**Interactive:** 68ms — 191 nodes-**Text:** 24ms — 23622B (~5905 tok) — `{"text":"Newest Questions\n\n \n \n `--## Active Tab Tracking (K1)-Active tab correctly tracked to example.com ✅--## Tab Close (K2)-Tab close response: `{"error":"close tab: No target with given id found (-32602)"}` ✅--## Action Error Handling-**A9 unknown kind:** `{"error":"unknown action: dance - valid values: focus, humanClick, type, press, hover, select, scroll, humanType, click, fill"}` — ✅-**A11 bad ref:** `{"error":"ref e9999 not found - take a /snapshot first"}` — ✅--## Performance Summary--| Site | Nav (ms) | Snap (ms) | Snap (B) | Snap (~tok) | Nodes | Interactive | Text (ms) | Text (B) | Text (~tok) |-|------|----------|-----------|----------|-------------|-------|-------------|-----------|----------|-------------|-| example.com | 311 | 32 | 747 | 186 | 8 | 1 | 23 | 190 | 47 |-| news.ycombinator.com | 687 | 43 | 74282 | 18570 | 966 | 226 | 23 | 3789 | 947 |-| github.com/pinchtab/pinchtab | 899 | 91 | 117605 | 29401 | 1482 | 154 | 27 | 9886 | 2471 |-| finance.yahoo.com | 498 | 26 | 6119 | 1529 | 68 | 12 | 22 | 3076 | 769 |-| stackoverflow.com | 967 | 84 | 65505 | 16376 | 764 | 191 | 24 | 23622 | 5905 |------*Generated by Bosch autorun at 2026-02-17 00:32 UTC*diff --git a/tests/bosch-test-02.md b/tests/bosch-test-02.mddeleted file mode 100644index d19be5fe..00000000--- a/tests/bosch-test-02.md+++ /dev/null@@ -1,91 +0,0 @@-# Pinchtab Test Report — 02:00 AM, 2026-02-17--**Branch:** autorun-**Build:** fresh from main-**Chrome:** 144.0.7559.133-**Profile:** clean (/tmp/pinchtab-test2)-**Mode:** headless, port 18801, BRIDGE_NO_RESTORE=true--> Note: Default profile (~/.pinchtab/chrome-profile) caused Chrome launch to hang indefinitely. Fresh temp profile worked fine. Possible corrupted profile or lock file issue.--## 1.1 Health & Startup--| # | Scenario | Result | Details | Time | Size | Tokens |-|---|----------|--------|---------|------|------|--------|-| H1 | Health check | ✅ PASS | `{"cdp":"","status":"ok","tabs":1}` | 28ms | 33B | 8 |-| H2 | Startup headless | ✅ PASS | Launched, bound port, Chrome not visible | — | — | — |--## 1.2 Navigation--| # | Scenario | Result | Details | Time | Size | Tokens |-|---|----------|--------|---------|------|------|--------|-| N1 | Basic navigate | ✅ PASS | title='Example Domain' | 354ms | 55B | 13 |-| N4 | Navigate newTab | ✅ PASS | New tab created with tabId | 70ms | 98B | 24 |-| N5 | Invalid URL | ✅ PASS | Error returned, no crash | 21ms | 76B | 19 |-| N6 | Missing URL | ✅ PASS | `{"error":"url required"}` | 21ms | 24B | 6 |-| N7 | Bad JSON | ✅ PASS | Parse error returned | 21ms | 84B | 21 |--## 1.3 Snapshot--| # | Scenario | Result | Details | Time | Size | Tokens |-|---|----------|--------|---------|------|------|--------|-| S1 | Basic snapshot | ✅ PASS | 8 nodes, refs (e0-e7) | 38ms | 747B | 186 |-| S2 | Interactive filter | ✅ PASS | Filtered down to 144B | 25ms | 144B | 36 |-| S3 | Depth filter | ✅ PASS | Truncated at depth 2 | 23ms | 154B | 38 |-| S4 | Text format | ✅ PASS | Plain text, not JSON | 23ms | 399B | 99 |-| S5 | YAML format | ✅ PASS | Valid YAML with role: keys | 23ms | 1347B | 336 |-| S6 | Diff second call | ✅ PASS | 165B (same as first — no changes) | 22ms | 165B | 41 |-| S7 | Diff first call | ✅ PASS | Full snapshot returned | 23ms | 165B | 41 |--## 1.4 Text Extraction--| # | Scenario | Result | Details | Time | Size | Tokens |-|---|----------|--------|---------|------|------|--------|-| T1 | Text readability | ✅ PASS | 190B clean text | 24ms | 190B | 47 |-| T2 | Text raw mode | ✅ PASS | 198B raw text | 23ms | 198B | 49 |--## 1.5 Actions--| # | Scenario | Result | Details | Time | Size | Tokens |-|---|----------|--------|---------|------|------|--------|-| A1 | Click by ref | ✅ PASS | `{"clicked":true}` (ref e6, "Learn more" link) | 42ms | 16B | 4 |-| A4 | Press key | ✅ PASS | `{"pressed":"Tab"}` | 29ms | 17B | 4 |-| A8 | Scroll | ✅ PASS | `{"scrolled":true,"y":800}` | 23ms | 25B | 6 |-| A9 | Unknown kind | ✅ PASS | Error lists valid kinds | 21ms | 127B | 31 |-| A10 | Missing kind | ✅ PASS | Error about missing ref | 21ms | 53B | 13 |-| A11 | Ref not found | ✅ PASS | `ref e9999 not found` | 20ms | 56B | 14 |-| A12 | CSS selector | ✅ PASS | `{"clicked":true}` via `h1` | 42ms | 16B | 4 |--**Not tested:** A2 (type), A3 (fill) — Google search didn't expose textbox ref in a11y tree. Need a page with visible form inputs.--## 1.6 Tabs--| # | Scenario | Result | Details | Time | Size | Tokens |-|---|----------|--------|---------|------|------|--------|-| TB1 | List tabs | ✅ PASS | Returned tab array | 21ms | 230B | 57 |-| TB2 | New tab | ✅ PASS | Returns `tabId` (not `id` — test script key was wrong) | 66ms | 98B | 24 |-| TB3 | Close tab | ❌ FAIL | Empty tabId passed → `tabId required`. Likely K2 bug still present — close with valid tabId untested (may hang) | 20ms | 26B | 6 |-| TB4 | Close no tabId | ✅ PASS | `{"error":"tabId required"}` | 22ms | 26B | 6 |-| TB5 | Bad action | ✅ PASS | `{"error":"action must be 'new' or 'close'"}` | 22ms | 43B | 10 |--## Performance Metrics--| Endpoint | Avg Response Time | Avg Size | Avg Tokens |-|----------|------------------|----------|------------|-| GET /health | 28ms | 33B | 8 |-| POST /navigate | 97ms (range 21-354ms) | 67B | 17 |-| GET /snapshot | 25ms (range 22-38ms) | 389B | 97 |-| GET /text | 24ms | 194B | 48 |-| POST /action | 28ms (range 20-42ms) | 44B | 11 |-| GET /tabs | 21ms | 230B | 57 |-| POST /tab | 36ms (range 20-66ms) | 66B | 16 |--## Summary--- **24/26 tests passed** (92%)-- **1 test failed:** TB3 (tab close) — couldn't properly test due to tabId not passing through test script; K2 hang bug may still be present-- **1 test skipped:** A2/A3 (type/fill) — no suitable input field on test pages-- **Critical finding:** Default Chrome profile (`~/.pinchtab/chrome-profile`) causes Chrome launch hang. Fresh profiles work fine. This could be a real user issue.-- **All error handling solid** — invalid URLs, bad JSON, missing params, unknown actions all return clean errors-- **Snapshot is fast** — sub-40ms for all formats, token-efficient-- **Navigation** is the slowest endpoint (~354ms for real page loads), which is expecteddiff --git a/tests/mario-test-00.md b/tests/mario-test-00.mddeleted file mode 100644index 2631df9c..00000000--- a/tests/mario-test-00.md+++ /dev/null@@ -1,77 +0,0 @@-# Pinchtab Test Report — 00:00 UTC, 2026-02-17--## Unit Tests-- **Result:** ✅ ALL PASS-- **Total tests:** 70 (including subtests)-- **Failures:** 0-- **Duration:** 0.19s--## Integration Tests (stealth, require Chrome)-- **Result:** ✅ ALL PASS (1 expected skip)-- **Total:** 8 integration tests- - 7 PASS: StealthScriptInjected, CanvasNoiseApplied, FontMetricsNoise, PluginsPresent, FingerprintRotation, CDPTimezoneOverride, StealthStatusEndpoint- - 1 SKIP: WebGLVendorSpoofed (headless, no GPU — expected)-- **Duration:** ~3.3s--## TEST-PLAN.md Scenario Coverage--### Covered by automated tests:-| Section | Scenarios | Status |-|---------|-----------|--------|-| 1.2 Navigation | N5 (invalid URL), N6 (missing URL), N7 (bad JSON) | ✅ Pass |-| 1.3 Snapshot | S10 (no tab) | ✅ Pass |-| 1.4 Text | T4 (no tab) | ✅ Pass |-| 1.5 Actions | A9 (unknown kind), A10 (missing kind), A11 (ref not found), A13 (no tab), A15 (empty batch) | ✅ Pass |-| 1.6 Tabs | TB4 (close no tabId), TB5 (bad action) | ✅ Pass |-| 1.7 Screenshots | SS3 (no tab) | ✅ Pass |-| 1.8 Evaluate | E3 (missing expr), E4 (bad JSON), E5 (no tab) | ✅ Pass |-| 1.9 Cookies | C3 (no tab), C5 (empty cookies) | ✅ Pass |-| 1.10 Stealth | ST1 (status) | ✅ Pass |-| 4. Integration | SI1-SI8 | ✅ 7 Pass, 1 Skip |--### Not covered (require running instance / manual):-- Section 1.1: H1-H7 (startup, health, auth, shutdown)-- Section 1.2: N1-N4, N8 (live navigation)-- Section 1.3: S1-S9, S11-S12 (live snapshots)-- Section 1.4: T1-T3, T5 (live text extraction)-- Section 1.5: A1-A8, A12, A14, A16-A17 (live actions)-- Section 1.6: TB1-TB3, TB6 (live tab management)-- Section 1.7: SS1-SS2 (live screenshots)-- Section 1.10: ST2-ST8 (live stealth checks)-- Section 2: HM1-HM3 (headed mode)-- Section 3: MA1-MA8 (multi-agent)-- Section 5: D1-D7 (Docker)--## Known Issues Status (Section 8)-| # | Issue | Status |-|---|-------|--------|-| K1 | Active tab tracking unreliable | 🔴 OPEN |-| K2 | Tab close hangs | 🟡 OPEN |-| K3 | x.com title empty | 🟢 OPEN |-| K4 | Chrome flag warning | 🟢 OPEN |-| K5 | Stealth PRNG weak | ✅ FIXED (verified by tests) |-| K6 | Chrome UA hardcoded | ✅ FIXED (verified by tests) |-| K7 | Fingerprint rotation JS-only | ✅ FIXED (verified by tests) |-| K8 | Timezone hardcoded | ✅ FIXED (verified by CDPTimezoneOverride test) |-| K9 | Stealth status hardcoded | ✅ FIXED (verified by StealthStatusEndpoint test) |--## Performance Metrics-| Metric | Value |-|--------|-------|-| Build time | 0.41s (0.61s user, 0.46s sys) |-| Binary size | 12 MB |-| Unit test duration | 0.19s |-| Integration test duration | 3.3s |-| Benchmarks | No bench functions defined |--## Release Criteria Progress (Section 9)-- **P0 — Unit tests 100% pass:** ✅-- **P0 — Integration tests pass:** ✅ (7/7 + 1 expected skip)-- **P0 — K1 fixed:** ❌ Still open-- **P0 — K2 fixed:** ❌ Still open-- **P0 — Zero crashes:** ✅ No crashes observed-- **P1 — Multi-agent:** Not tested (needs live instance)-- **P1 — Stealth bot.sannysoft.com:** Not tested (needs live instance)-- **P1 — Session persistence:** Not tested-- **P2 — Coverage > 30%:** Not measured-- **P2 — K3-K4 addressed:** Still opendiff --git a/tests/mario-test-07.md b/tests/mario-test-07.mddeleted file mode 100644index 27719d34..00000000--- a/tests/mario-test-07.md+++ /dev/null@@ -1,210 +0,0 @@-# Pinchtab Full Test Report — 07:46 UTC, 2026-02-17 (Updated 07:55)--**Run by:** Mario (manual, full test plan)-**Branch:** autorun-**Instance:** headless, clean profile, BRIDGE_NO_RESTORE=true-------## Summary--| Category | Pass | Fail | Skip | Total |-|----------|------|------|------|-------|-| Unit tests | 92 | 0 | 0 | 92 |-| Integration tests | ~100 | 0 | 0 | ~100 |-| Live curl (Section 1) | **38** | **0** | 0 | 38 |-| **Total** | **~230** | **0** | **0** | **~230** |--### Bugs Fixed This Run-- **K2 (tab close):** Switched to `cancel()` on the tab's chromedp context instead of `target.CloseTarget` via `chromedp.Run`. The library expects context cancellation, not direct CDP calls through Run.-- **Stealth injection on new tabs:** Added `stealthScript` field to Bridge, `injectStealth()` helper called on CreateTab and TabContext slow path. `navigator.webdriver` now returns `null` on all tabs.-------## Unit Tests-- **Result:** ✅ ALL 92 PASS-- **Duration:** 0.32s-- **Coverage:** 28.9%--## Integration Tests (stealth, require Chrome)-- **Result:** ✅ ALL PASS (~100 including subtests)-- **Duration:** 3.3s-------## Live Curl Tests (against running instance)--### Section 1.1: Health & Startup--| # | Scenario | Status | Detail |-|---|----------|--------|--------|-| H1 | Health check | ✅ PASS | `{"cdp":"","status":"ok","tabs":1}` |--### Section 1.2: Navigation--| # | Scenario | Status | Detail |-|---|----------|--------|--------|-| N1 | Navigate example.com | ✅ PASS | title="Example Domain" |-| N2 | Navigate BBC | ✅ PASS | title contains "BBC" |-| N3 | Navigate SPA (x.com) | ✅ PASS | title="" (expected — SPA limitation) |-| N4 | Navigate newTab | ✅ PASS | tabId returned |-| N5 | Invalid URL | ✅ PASS | Error returned |-| N6 | Missing URL | ✅ PASS | Error returned |-| N7 | Bad JSON | ✅ PASS | Parse error returned |--### Section 1.3: Snapshot--| # | Scenario | Status | Detail |-|---|----------|--------|--------|-| S1 | Basic snapshot | ✅ PASS | Nodes array with refs |-| S2 | Interactive filter | ✅ PASS | 1 node (link "Learn more") |-| S3 | Depth filter | ✅ PASS | Truncated at depth 2 |-| S4 | Text format | ✅ PASS | Plain text output |--### Section 1.4: Text Extraction--| # | Scenario | Status | Detail |-|---|----------|--------|--------|-| T1 | Text extraction | ✅ PASS | Clean text returned |-| T2 | Raw text mode | ✅ PASS | 199 chars |--### Section 1.5: Actions--| # | Scenario | Status | Detail |-|---|----------|--------|--------|-| A1 | Click by ref | ✅ PASS | `{"clicked":true}` |-| A4 | Press key | ✅ PASS | `{"pressed":"Enter"}` |-| A9 | Unknown kind | ✅ PASS | Error: invalid kind |-| A10 | Missing kind | ✅ PASS | Error returned |-| A11 | Ref not found | ✅ PASS | Error returned |--### Section 1.6: Tabs--| # | Scenario | Status | Detail |-|---|----------|--------|--------|-| TB1 | List tabs | ✅ PASS | Tabs array returned |-| TB2 | New tab | ✅ PASS | Tab created with tabId |-| TB3 | Close tab | ✅ **PASS** | `{"closed":true}` — **K2 FIXED** |-| TB4 | Close without tabId | ✅ PASS | Error: tabId required |-| TB5 | Bad action | ✅ PASS | Error: invalid action |--### Section 1.7: Screenshots--| # | Scenario | Status | Detail |-|---|----------|--------|--------|-| SS1 | Basic screenshot | ✅ PASS | 21KB JPEG data |-| SS2 | Raw screenshot | ✅ PASS | HTTP 200, file saved |--### Section 1.8: Evaluate--| # | Scenario | Status | Detail |-|---|----------|--------|--------|-| E1 | Simple eval (1+1) | ✅ PASS | `{"result":"2"}` |-| E2 | DOM eval (title) | ✅ PASS | `{"result":"Example Domain"}` |-| E3 | Missing expression | ✅ PASS | Error returned |-| E4 | Bad JSON | ✅ PASS | Parse error |--### Section 1.9: Cookies--| # | Scenario | Status | Detail |-|---|----------|--------|--------|-| C1 | Get cookies | ✅ PASS | `{"cookies":[],"count":0}` |-| C2 | Set cookies | ✅ PASS | `{"failed":0,"set":1,"total":1}` |--### Section 1.10: Stealth--| # | Scenario | Status | Detail |-|---|----------|--------|--------|-| ST1 | Stealth status | ✅ PASS | Score and level returned |-| ST2 | Webdriver hidden | ✅ **PASS** | `navigator.webdriver` returns `null` — **stealth injection fixed for all tabs** |-| ST3 | Chrome runtime | ✅ PASS | `window.chrome` present |-| ST4 | Plugins present | ✅ PASS | 3-5 plugins |-| ST5 | Fingerprint rotate (windows) | ✅ PASS | Windows UA applied |-| ST6 | Fingerprint rotate (random) | ✅ PASS | Random fingerprint applied |-------## Sections Not Tested--| Section | Reason |-|---------|--------|-| 1.1 H2-H7 | Need separate instances (auth, graceful shutdown) |-| 1.3 S5-S12 | YAML format, diff mode, file output, large pages |-| 1.5 A2-A3, A5-A8, A12-A17 | Type, fill, focus, hover, select, scroll, CSS selector, batch, human actions |-| 1.6 TB6 | Max tabs limit |-| 2. Headed Mode | Requires non-headless |-| 3. Multi-Agent | Requires concurrent test harness |-| 5. Docker | Requires Docker build |-| 6. Config Extended | Requires multiple instances |-| 7. Error Handling | Chrome crash, large page, binary page, rapid nav |-------## Performance Metrics--| Metric | Value |-|--------|-------|-| Build time | 0.36s |-| Binary size | 12.4 MB |-| Unit test duration | 0.32s (92 tests) |-| Integration test duration | 3.3s |-| Coverage | 28.9% |-| Health check latency | <1ms |-| Navigate (example.com) | ~2s |-| Snapshot (example.com) | <100ms |-| Screenshot size | 21KB |-------## Known Issues Status--| # | Issue | Status | Change This Run |-|---|-------|--------|-----------------|-| K1 | Active tab tracking | ✅ FIXED | — |-| K2 | Tab close hangs | ✅ **FIXED** | Used context cancellation instead of target.CloseTarget via Run |-| K3 | x.com title empty | 🔧 IMPROVED | waitTitle param available |-| K4 | Chrome flag warning | ✅ FIXED | — |-| K5-K9 | Stealth issues | ✅ ALL FIXED | — |-| NEW | Stealth not on new tabs | ✅ **FIXED** | Added stealthScript to Bridge, injectStealth() on new tabs |-| NEW | Profile crash on stale locks | 🟡 OPEN | Needs BRIDGE_NO_RESTORE or clean profile |-------## Release Readiness--### P0 — Must Pass-| Criterion | Status |-|-----------|--------|-| All Section 1 scenarios pass (headless) | ✅ **38/38** |-| K1 (active tab tracking) | ✅ FIXED |-| K2 (tab close hangs) | ✅ **FIXED** |-| Zero crashes | ✅ (with clean profile) |-| `go test ./...` 100% pass | ✅ 92/92 |-| `go test -tags integration` pass | ✅ ~100 pass |--### P1 — Should Pass-| Criterion | Status |-|-----------|--------|-| Multi-agent (MA1-MA5) | ❌ Not tested |-| Stealth bot.sannysoft.com | ❌ Not tested |-| Session persistence | ❌ Not tested |--### P2 — Nice to Have-| Criterion | Status |-|-----------|--------|-| Coverage > 30% | 🟡 28.9% (close!) |-| K3 (SPA title) | 🔧 waitTitle param |-| K4 (Chrome flag) | ✅ FIXED |-------## Key Takeaways--1. **All 38 live curl tests pass** — zero failures across core endpoints-2. **K2 (tab close) properly fixed** — chromedp expects context cancellation, not CDP target.CloseTarget via chromedp.Run-3. **Stealth injection now works on all tabs** — new stealthScript field + injectStealth() on CreateTab and TabContext-4. **Profile stability issue remains** — needs BRIDGE_NO_RESTORE or clean profile dir to avoid crash on stale locks-5. **Coverage at 28.9%** — need ~2% more for P2 target-6. **All P0 release criteria now met** ✅--*Generated by Mario (manual run) at 2026-02-17 07:55 UTC*diff --git a/tests/mario-test-08.md b/tests/mario-test-08.mddeleted file mode 100644index 00355284..00000000--- a/tests/mario-test-08.md+++ /dev/null@@ -1,123 +0,0 @@-# Pinchtab Test Report — Hour 08 (2026-02-17 08:00 GMT)--**Tester:** Mario (autorun)-**Branch:** autorun-**Build time:** 0.4s-**Binary size:** 13.0 MB--## Unit Tests--- **54 unit tests: ALL PASS**-- `go test ./... -v -count=1` — 0.34s--## Integration Tests--- **83 tests: ALL PASS** (1 skip: TestWebGLVendorSpoofed — headless, no GPU)-- `go test -tags integration -v -count=1` — 3.3s--## Live Curl Tests (against http://localhost:9867)--**Note:** Required fresh profile (`BRIDGE_PROFILE=/tmp/...`). The default profile at `~/.pinchtab/chrome-profile` caused Chrome to hang during startup due to stale lock files and restored tabs. This is a potential issue for production — see new bug below.--| # | Scenario | Result | Notes |-|---|----------|--------|-------|-| H1 | Health check | PASS | 200, status=ok |-| H2-H4 | Startup variants | SKIP | Need separate instances |-| H5-H6 | Auth | SKIP | No token configured |-| H7 | Graceful shutdown | SKIP | Destructive |-| N1 | Navigate example.com | PASS | title=Example Domain |-| N2 | Navigate BBC | PASS | title=BBC - Home |-| N3 | Navigate x.com | INFO | Empty title (known SPA limitation K3) |-| N4 | Navigate newTab | PASS | tabs 4->5 |-| N8 | Navigate timeout | PASS | Returned response for slow URL |-| S1 | Basic snapshot | PASS | 46ms |-| S2 | Interactive filter | PASS | |-| S3 | Depth filter | PASS | |-| S4 | Text format | PASS | |-| S5 | YAML format | PASS | |-| S6 | Diff mode | PASS | |-| S7 | Diff first call | PASS | Full snapshot returned |-| S8 | File output with path | **FAIL** | Ignores `path` param, writes to default location |-| S9 | Snapshot with tabId | PASS | |-| T1 | Text readability | PASS | Contains expected content |-| T2 | Raw text | PASS | |-| T3 | Text with tabId | PASS | |-| T5 | Token efficiency (Google) | INFO | ~210 words |-| A1 | Click by ref | PASS | |-| A2 | Type by ref | PASS | |-| A3 | Fill by ref | PASS | |-| A4 | Press key | PASS | |-| A5-A7 | Focus/Hover/Select | SKIP | Need specific page setup |-| A8 | Scroll | PASS | |-| A12 | CSS selector click | PASS | |-| A14 | Batch actions | PASS | |-| TB1 | List tabs | PASS | 5 tabs |-| TB2 | New tab | PASS | |-| TB3 | Close tab | PASS | |-| TB6 | Max tabs | SKIP | |-| SS1 | Screenshot | PASS | 113KB |-| SS2 | Raw screenshot | PASS | 85KB JPEG |-| E1 | Eval 1+1 | PASS | |-| E2 | Eval document.title | PASS | |-| C1 | Get cookies | PASS | |-| C2 | Set cookies | PASS | |-| C4 | Bad JSON error | PASS | |-| ST2 | Webdriver hidden | PASS | navigator.webdriver=undefined |-| ST3 | Chrome runtime | PASS | window.chrome=true |-| ST4 | Plugins present | PASS | 3 plugins |-| ST5 | Fingerprint rotate | PASS | Windows OS |-| ST6 | Fingerprint random | PASS | |-| ST8 | bot.sannysoft.com | PASS | 574ms navigate |--**Totals: 39 PASS / 1 FAIL / 10 SKIP**--## Performance Metrics--| Metric | Value |-|--------|-------|-| Build time | 0.4s |-| Binary size | 13.0 MB |-| Unit test duration | 0.34s |-| Integration test duration | 3.3s |-| Snapshot latency (avg) | 49ms |-| Navigate example.com | 298ms |-| Navigate BBC | 915ms |-| Navigate bot.sannysoft.com | 574ms |--## New Issues Found--### K10: Stale profile causes Chrome startup hang (NEW)-- **Severity:** P1-- **Status:** Open-- When the default profile at `~/.pinchtab/chrome-profile` has stale lock files (SingletonLock, SingletonSocket, SingletonCookie) AND restored tabs, Chrome launches but the HTTP server never starts listening.-- Pinchtab logs show "launching Chrome" but never reaches "PINCH! PINCH!"-- Workaround: Use `BRIDGE_PROFILE=/tmp/fresh-profile` or manually delete lock files-- Suggestion: Add timeout for Chrome connection + auto-cleanup of stale locks--### K11: S8 file output ignores path parameter (NEW)-- **Severity:** P2-- **Status:** Open-- `GET /snapshot?output=file&path=/tmp/custom.json` ignores the `path` param-- Always writes to `~/.pinchtab/snapshots/snapshot-YYYYMMDD-HHMMSS.json`-- Response returns the actual path used, but doesn't honor the requested one--## Release Criteria Status (Section 9)--### P0 (Must Pass)-- [x] All Section 1 scenarios pass in headless (39/40 — S8 minor)-- [ ] All Section 1 scenarios pass in headed (not tested)-- [x] K1 active tab tracking: FIXED-- [x] K2 tab close hangs: FIXED-- [x] Zero crashes across test suite-- [x] `go test ./...` 100% pass (54 tests)-- [x] `go test -tags integration` pass (83 pass, 1 skip)--### P1 (Should Pass)-- [ ] Multi-agent scenarios MA1-MA5 (not tested)-- [x] Stealth passes bot.sannysoft.com-- [ ] Session persistence SP1/SP2 (not tested)--### P2 (Nice to Have)-- [x] K3-K9 addressed/fixed-- [ ] Coverage > 30% (not measured)-- [x] Performance baselineddiff --git a/tests/test-summary-07.md b/tests/test-summary-07.mddeleted file mode 100644index 536fa731..00000000--- a/tests/test-summary-07.md+++ /dev/null@@ -1,88 +0,0 @@-# Pinchtab Test Summary — Hour 07--**Date:** 2026-02-17 07:35 UTC-**Branch:** autorun-**Action:** Odd hour — summarize & fix-------## Test Trends--| Report | Unit Tests | Integration | Notes |-|--------|-----------|-------------|-------|-| mario-test-00 (00:00) | 70 pass | 7 pass, 1 skip | Baseline |-| bosch-test-00 (00:30) | — (curl) | — | 24/26 scenarios pass |-| bosch-test-02 (02:00) | — (curl) | — | More endpoint coverage |-| test-summary-07 (prev) | 78→86 pass | — | Config tests, CreateTab fix |-| **This run (07:35)** | **91 pass** | **not re-run** | +5 new handler tests |--## What Changed This Hour--### New Unit Tests (+5)-| Test | Covers | Plan Scenario |-|------|--------|---------------|-| `TestHandleHealth_NoBrowser` | Health endpoint disconnected state | H1 (error path) |-| `TestHandleTabs_NoBrowser` | Tabs endpoint no browser | TB1 (error path) |-| `TestHandleScreenshot_QualityParam` | Quality param parsing | SS1 (param path) |-| `TestHandleScreenshot_InvalidQuality` | Bad quality fallback | SS1 (edge case) |-| `TestHandleNavigate_InvalidURL` | Invalid URL handling | N5 |--### No Failures Found-All 91 unit tests pass. No bugs to fix this cycle.--## Progress Toward v1.0 Release Criteria (Section 9)--### P0 — Must Pass-| Criterion | Status | Notes |-|-----------|--------|-------|-| All Section 1 scenarios pass (headless) | 🟡 ~35/55 tested | Health/tabs/screenshot tests added |-| K1 (active tab tracking) fixed | ✅ FIXED | |-| K2 (tab close hangs) fixed | 🔧 FIX APPLIED | Needs re-verification with live instance |-| Zero crashes | ✅ | |-| `go test ./...` 100% pass | ✅ 91/91 | Up from 86 |-| `go test -tags integration` pass | ✅ 7 pass, 1 skip | Stable |--### P1 — Should Pass-| Criterion | Status |-|-----------|--------|-| Multi-agent (MA1-MA5) | ❌ Not tested |-| Stealth bot.sannysoft.com | ❌ Not tested |-| Session persistence (SP1-SP2) | ❌ Not tested |--### P2 — Nice to Have-| Criterion | Status |-|-----------|--------|-| Coverage > 30% | 🟡 28.9% (close!) |-| K3 (SPA title) | 🔧 Improved (waitTitle param) |-| K4 (Chrome flag) | ✅ FIXED |--## Known Issues Status--| # | Issue | Status | Change |-|---|-------|--------|--------|-| K1 | Active tab tracking | ✅ FIXED | — |-| K2 | Tab close hangs | 🔧 FIX APPLIED | Needs retest |-| K3 | x.com title empty | 🔧 IMPROVED | waitTitle param |-| K4 | Chrome flag warning | ✅ FIXED | — |-| K5-K9 | Stealth issues | ✅ ALL FIXED | — |-| NEW | CreateTab nil panic | ✅ FIXED (earlier) | — |-| NEW | Profile dir hang | 🟡 OPEN | Reported by Bosch |--## Performance Metrics--| Metric | Value |-|--------|-------|-| Build time | 0.46s |-| Binary size | 12 MB |-| Unit test duration | 0.195s (91 tests) |-| Coverage | 28.9% |--## Recommendations--1. **Next even hour (08):** Run full test suite + curl scenarios against live instance-2. **Coverage gap:** Need ~2% more to hit 30% target — add tests for cookie/stealth handler happy paths-3. **K2 retest:** Need a live instance to verify tab close fix-4. **Profile dir hang:** Needs investigation — potential UX blocker------*Generated by Mario autorun at 2026-02-17 07:35 UTC*diff --git a/tests/test-summary.md b/tests/test-summary.mddeleted file mode 100644index b59c8580..00000000--- a/tests/test-summary.md+++ /dev/null@@ -1,104 +0,0 @@-# Pinchtab Test Summary--**Last updated:** 2026-02-17 07:00 UTC-**Runs analyzed:** bosch-test-00.md, bosch-test-02.md-------## Overall Status--| Area | Status | Notes |-|------|--------|-------|-| Health/Startup | ✅ Pass | Both runs |-| Navigation | ✅ Pass | All sites, 70-967ms range |-| Snapshot | ✅ Pass | All formats (JSON, text, YAML, diff), refs correct |-| Interactive filter | ✅ Pass | Properly filters to actionable elements |-| Text extraction | ✅ Pass | Readability + raw modes working |-| Actions | ✅ Pass | Click, press, scroll, CSS selector all work. Type/fill untested (no form page) |-| Error handling | ✅ Pass | Bad JSON, missing params, unknown kinds, bad refs — all return clean errors |-| Active tab tracking (K1) | ✅ Fixed | Confirmed in hour 00 run |-| Tab close (K2) | ✅ Fixed | Hour 07: replaced `page.Close()` with `target.CloseTarget` + 5s timeout. No more hangs. |-| SPA title (K3) | 🔧 Improved | Added `waitTitle` param to navigate (hour 03) |-| Chrome flag (K4) | ✅ Fixed | Removed deprecated flag (hour 05), CDP stealth handles it |--## Performance Metrics--### Hour 00 — Multi-Site Benchmark--| Site | Nav (ms) | Snap (ms) | Snap (~tok) | Nodes | Text (ms) | Text (~tok) |-|------|----------|-----------|-------------|-------|-----------|-------------|-| example.com | 311 | 32 | 186 | 8 | 23 | 47 |-| news.ycombinator.com | 687 | 43 | 18,570 | 966 | 23 | 947 |-| github.com/pinchtab | 899 | 91 | 29,401 | 1,482 | 27 | 2,471 |-| finance.yahoo.com | 498 | 26 | 1,529 | 68 | 22 | 769 |-| stackoverflow.com | 967 | 84 | 16,376 | 764 | 24 | 5,905 |--### Hour 02 — Endpoint Averages (example.com focused)--| Endpoint | Avg (ms) | Avg Size | Avg Tokens |-|----------|----------|----------|------------|-| GET /health | 28 | 33B | 8 |-| POST /navigate | 97 | 67B | 17 |-| GET /snapshot | 25 | 389B | 97 |-| GET /text | 24 | 194B | 48 |-| POST /action | 28 | 44B | 11 |-| GET /tabs | 21 | 230B | 57 |--### Performance Trends--| Metric | Hour 00 | Hour 02 | Trend |-|--------|---------|---------|-------|-| Snapshot (example.com) | 32ms | 38ms | Stable |-| Text (example.com) | 23ms | 24ms | Stable |-| Snapshot formats | JSON only | JSON+text+YAML+diff | All fast (<25ms) |--Key observations:-- Snapshot latency scales with page complexity: 26ms (68 nodes) → 91ms (1482 nodes)-- Text extraction consistently fast regardless of page size (~23ms)-- Navigate time dominated by network/page load, not pinchtab overhead--## Test Coverage--| Section | Tested | Pass | Fail | Skip |-|---------|--------|------|------|------|-| 1.1 Health | 2/7 | 2 | 0 | 0 |-| 1.2 Navigation | 5/8 | 5 | 0 | 0 |-| 1.3 Snapshot | 7/12 | 7 | 0 | 0 |-| 1.4 Text | 2/5 | 2 | 0 | 0 |-| 1.5 Actions | 7/17 | 7 | 0 | 0 |-| 1.6 Tabs | 5/6 | 4 | 1 | 0 |-| 1.7-1.12 | 0 | — | — | — |--**Total: 28/55 core tests executed, 27 pass, 1 fail (TB3 — should pass now with K2 fix)**--## Known Issues Status--| # | Issue | Severity | Status | Notes |-|---|-------|----------|--------|-------|-| K1 | Active tab tracking | 🔴 P0 | ✅ FIXED | Confirmed working hour 00 |-| K2 | Tab close hangs | 🟡 P1 | ✅ FIXED | Hour 07: switched to `target.CloseTarget` with 5s timeout |-| K3 | x.com title empty | 🟢 P2 | 🔧 IMPROVED | Added `waitTitle` param (hour 03) |-| K4 | Chrome flag warning | 🟢 P2 | ✅ FIXED | Removed deprecated flag (hour 05) |-| K5-K9 | Stealth issues | — | ✅ ALL FIXED | Mario's fixes (CDP overrides) |-| NEW | Profile dir hang | 🟡 P1 | OPEN | Default profile can hang Chrome launch. Fresh profiles work. |--## Fixes Applied This Run (Hour 07, second pass)--**Invalid config JSON warning:** `loadConfig()` previously silently ignored malformed `config.json` files. Now logs a `slog.Warn` with the path and parse error. Added `TestLoadConfig_InvalidJSON` unit test. Total: 79 tests passing.--**TEST-PLAN.md updated:** K2 status → ✅ FIXED, K3 status → 🔧 IMPROVED (were stale).--## Fixes Applied This Run (Hour 07)--**K2 — Tab close hangs:** Root cause was `page.Close()` requiring an active page context. If the tab was unresponsive or the context was stale, `chromedp.Run` would hang indefinitely. Fix: replaced with `target.CloseTarget` (CDP-level command via browser context) wrapped in a 5-second timeout. This operates at the browser level rather than the page level, so it works even when the tab is frozen. Also removed unused `page` import from bridge.go.--## Release Readiness (v1.0)--**P0 blockers:** K1 ✅, K2 ✅, zero crashes ✅-**Unit tests:** 79 pass ✅-**Integration tests:** 6 pass, 1 skip (headless), 1 skip (headed-only) ✅--Remaining: expand autorun coverage to sections 1.7+, investigate profile hang (P1), verify K2 fix in next even-hour run.------*Generated by Bosch autorun*diff --git a/tests/v0.3.0-performance-history.md b/tests/v0.3.0-performance-history.mddeleted file mode 100644index 91049eaa..00000000--- a/tests/v0.3.0-performance-history.md+++ /dev/null@@ -1,113 +0,0 @@-# Pinchtab v0.3.0 Performance History--**Collected:** 2026-02-15, from QA rounds by Bosch and Mario.-**Build:** v0.3.0 (commits 4fc2a3e through c41d2cd)-**Machine:** MacBook Pro (Apple Silicon), Chrome headless-**Go test suite:** 71 tests, 24.6% coverage, all passing-------## Token Performance--### Full Snapshot (`GET /snapshot`) — Tokens by Site--| Site | Tokens | Notes |-|------|--------|-------|-| Google | ~848 | Down from ~2K after language picker fix |-| GitHub | ~9,835 | Stable |-| x.com | ~2,000 | Measured when active tab worked |-| BBC | ~26,598 | Heavy nav + content |-| Wikipedia | ~20,474 | Long-form article |-| LinkedIn | ~7,500 | Measured when active tab worked |-| Yahoo Finance | ~16,000 | Complex finance page |-| Google Finance | ~12,000 | Finance widgets |-| Hacker News | ~24,000 | Many repetitive link nodes |--### Text Extraction (`GET /text`) — Tokens by Site--| Site | Tokens | Notes |-|------|--------|-------|-| Google | ~143 | Dramatically improved after language blob fix (was ~764) |-| GitHub | ~1,249 | Stable |-| x.com | ~121 | Very compact (mostly auth wall) |-| BBC | ~3,479 | Article content |-| Wikipedia | ~3,306 | Long-form |-| LinkedIn | ~6,100 | Heavy (includes sidebar content) |-| Yahoo Finance | ~1,400 | Good compression |-| Google Finance | ~1,100 | Clean extraction |-| Hacker News | ~875 | Compact |--### Snapshot vs Text Savings--| Site | /snapshot | /text | Savings |-|------|----------|-------|---------|-| Google | ~848 | ~143 | **5.9×** |-| GitHub | ~9,835 | ~1,249 | **7.9×** |-| x.com | ~2,000 | ~121 | **16.5×** |-| BBC | ~26,598 | ~3,479 | **7.6×** |-| Wikipedia | ~20,474 | ~3,306 | **6.2×** |-| LinkedIn | ~7,500 | ~6,100 | **1.2×** |--**Average savings:** `/text` is **~7.5× cheaper** than full snapshot.--### Pinchtab vs OpenClaw Browser Comparison--| Site | Pinchtab /snapshot | Pinchtab /text | OpenClaw aria tree |-|------|-------------------|---------------|-------------------|-| Yahoo Finance | ~16,000 | ~1,400 | ~3,500 |-| Google Finance | ~12,000 | ~1,100 | ~3,700 |--**Key finding:** Pinchtab snapshots are **3-4× larger** than OpenClaw aria trees (verbose JSON per node). Pinchtab `/text` is **2.5-3× cheaper** than OpenClaw aria trees.-------## Speed Performance--### Endpoint Latency (from Bosch benchmark, v0.2.0 build)--| Endpoint | Latency | Notes |-|----------|---------|-------|-| `/snapshot` | ~26ms | Accessibility tree fetch |-| `/screenshot` | ~200ms | JPEG render + encode |-| `/text` | ~7ms | Readability extraction |-| `/action` (click) | ~7ms | CDP click dispatch |--### Startup--- Cold start to first request: ~3 seconds (headless)-- Chrome launch + profile load included-------## Stability--### Sites Tested Successfully (no crashes, no bot detection)--Google, GitHub, BBC, Wikipedia, x.com, LinkedIn, Yahoo Finance, Google Finance, Bloomberg, StackOverflow, Hacker News, Example.com--### Known Stability Issues--| Issue | Severity | Impact |-|-------|----------|--------|-| Active tab tracking drift | 🔴 P0 | Sequential navigate→read returns stale tab without explicit tabId |-| Tab close hangs | 🟡 P1 | `POST /tab {"action":"close"}` hangs indefinitely |-| x.com title always empty | 🟢 P2 | SPA hydration too slow for navigate timeout |-------## Go Test Performance--```-71 tests, 0.2s total runtime-24.6% statement coverage-0 failures, 0 flaky tests-```-------## Recommendations (from QA)--1. **Always use explicit `tabId`** — active tab tracking is unreliable-2. **Use `/text` for read-only tasks** — 7-16× cheaper than snapshots-3. **Use `?filter=interactive` when acting** — 60-75% fewer tokens than full snapshot-4. **Investigate compact snapshot format** — closing the 3-4× gap with OpenClaw aria trees would be high-valuediff --git a/tests/v0.4.0-test-summary.md b/tests/v0.4.0-test-summary.mdnew file mode 100644index 00000000..55f91d9f--- /dev/null+++ b/tests/v0.4.0-test-summary.md@@ -0,0 +1,294 @@+# Pinchtab v0.4.0 Test Summary++**Date:** 2026-02-17+**Branch:** autorun+**Testers:** Mario, Bosch (autorun cron)+**Machine:** Mac Mini (Apple Silicon), Chrome 144 headless++---++## Overall Results++| Category | Pass | Fail | Skip | Total |+|----------|------|------|------|-------|+| Unit tests | 92 | 0 | 0 | 92 |+| Integration tests (stealth) | ~100 | 0 | 1 (WebGL, headless) | ~101 |+| Live curl — Section 1 core | 39 | 1 | 10 | 50 |+| **Total** | **~231** | **1** | **11** | **~243** |++**Coverage:** 28.9%+**Build time:** 0.36-0.46s+**Binary size:** 13 MB++---++## Live Test Results (all runs consolidated)++### 1.1 Health & Startup++| # | Scenario | Status | Notes |+|---|----------|--------|-------|+| H1 | Health check | ✅ PASS | `{"status":"ok"}` |+| H2 | Startup headless | ✅ PASS | Launches, binds port |+| H3-H4 | Headed / custom port | ⏭️ SKIP | Need separate instances |+| H5-H6 | Auth token | ⏭️ SKIP | Not configured |+| H7 | Graceful shutdown | ⏭️ SKIP | Destructive |++### 1.2 Navigation++| # | Scenario | Status | Notes |+|---|----------|--------|-------|+| N1 | Navigate example.com | ✅ PASS | title="Example Domain", ~300ms |+| N2 | Navigate BBC | ✅ PASS | title contains "BBC", ~915ms |+| N3 | Navigate SPA (x.com) | ✅ PASS | title="" (known K3 limitation) |+| N4 | Navigate newTab | ✅ PASS | tabId returned |+| N5 | Invalid URL | ✅ PASS | Error returned |+| N6 | Missing URL | ✅ PASS | `{"error":"url required"}` |+| N7 | Bad JSON | ✅ PASS | Parse error returned |+| N8 | Navigate timeout | ✅ PASS | Returns response for slow URL |++### 1.3 Snapshot++| # | Scenario | Status | Notes |+|---|----------|--------|-------|+| S1 | Basic snapshot | ✅ PASS | Nodes with refs, 32-46ms |+| S2 | Interactive filter | ✅ PASS | 1 node on example.com (link) |+| S3 | Depth filter | ✅ PASS | Truncated at depth 2 |+| S4 | Text format | ✅ PASS | Plain text output |+| S5 | YAML format | ✅ PASS | Valid YAML |+| S6 | Diff mode | ✅ PASS | Returns changes only |+| S7 | Diff first call | ✅ PASS | Full snapshot (no prior) |+| S8 | File output path | ❌ **FAIL** | Ignores `path` param — see K11 |+| S9 | Snapshot with tabId | ✅ PASS | Correct tab returned |++### 1.4 Text Extraction++| # | Scenario | Status | Notes |+|---|----------|--------|-------|+| T1 | Readability mode | ✅ PASS | Clean text, ~23ms |+| T2 | Raw mode | ✅ PASS | Full innerText |+| T3 | Text with tabId | ✅ PASS | Correct tab |++### 1.5 Actions++| # | Scenario | Status | Notes |+|---|----------|--------|-------|+| A1 | Click by ref | ✅ PASS | `{"clicked":true}` |+| A2 | Type by ref | ✅ PASS | Text entered |+| A3 | Fill by ref | ✅ PASS | Input value set |+| A4 | Press key | ✅ PASS | `{"pressed":"Enter"}` |+| A8 | Scroll | ✅ PASS | `{"scrolled":true}` |+| A9 | Unknown kind | ✅ PASS | Error lists valid kinds |+| A10 | Missing kind | ✅ PASS | Error returned |+| A11 | Ref not found | ✅ PASS | `ref e9999 not found` |+| A12 | CSS selector click | ✅ PASS | `{"clicked":true}` via `h1` |+| A14 | Batch actions | ✅ PASS | Both executed in order |+| A5-A7 | Focus/Hover/Select | ⏭️ SKIP | Need specific page setup |++### 1.6 Tabs++| # | Scenario | Status | Notes |+|---|----------|--------|-------|+| TB1 | List tabs | ✅ PASS | Array of tab objects |+| TB2 | New tab | ✅ PASS | tabId returned |+| TB3 | Close tab | ✅ PASS | `{"closed":true}` — K2 fixed |+| TB4 | Close without tabId | ✅ PASS | Error: tabId required |+| TB5 | Bad action | ✅ PASS | Error: invalid action |+| TB6 | Max tabs | ⏭️ SKIP | Not tested |++### 1.7 Screenshots++| # | Scenario | Status | Notes |+|---|----------|--------|-------|+| SS1 | Basic screenshot | ✅ PASS | 21-113KB JPEG |+| SS2 | Raw screenshot | ✅ PASS | HTTP 200 |++### 1.8 Evaluate++| # | Scenario | Status | Notes |+|---|----------|--------|-------|+| E1 | Simple eval (1+1) | ✅ PASS | `{"result":"2"}` |+| E2 | DOM eval (title) | ✅ PASS | Returns page title |+| E3 | Missing expression | ✅ PASS | Error returned |+| E4 | Bad JSON | ✅ PASS | Parse error |++### 1.9 Cookies++| # | Scenario | Status | Notes |+|---|----------|--------|-------|+| C1 | Get cookies | ✅ PASS | Cookie array returned |+| C2 | Set cookies | ✅ PASS | `{"set":1,"total":1}` |+| C4 | Bad JSON | ✅ PASS | Error returned |++### 1.10 Stealth++| # | Scenario | Status | Notes |+|---|----------|--------|-------|+| ST1 | Stealth status | ✅ PASS | Score + level returned |+| ST2 | Webdriver hidden | ✅ PASS | `navigator.webdriver` = null/undefined |+| ST3 | Chrome runtime | ✅ PASS | `window.chrome` present |+| ST4 | Plugins present | ✅ PASS | 3-5 plugins |+| ST5 | Fingerprint rotate (windows) | ✅ PASS | Windows UA applied |+| ST6 | Fingerprint rotate (random) | ✅ PASS | Random fingerprint |+| ST8 | bot.sannysoft.com | ✅ PASS | Most checks green |++### Sections Not Tested++| Section | Reason |+|---------|--------|+| 2. Headed Mode | Requires non-headless instance |+| 3. Multi-Agent | Requires concurrent test harness |+| 5. Docker | Requires Docker build |+| 6. Config Extended | Requires multiple instances |+| 7. Error Handling | Chrome crash, large page, rapid nav |++---++## Speed Performance++### Endpoint Latency++| Endpoint | Avg (ms) | Range (ms) | Notes |+|----------|----------|------------|-------|+| GET /health | <1 | 0-28 | Instant |+| POST /navigate | ~300-900 | 70-967 | Dominated by page load |+| GET /snapshot | ~35 | 22-91 | Scales with node count |+| GET /text | ~23 | 22-27 | Constant regardless of page size |+| POST /action | ~28 | 20-42 | Fast |+| GET /screenshot | ~200 | — | JPEG encode |+| GET /tabs | ~21 | — | Fast |++### Navigation Latency by Site++| Site | Nav (ms) | Snap (ms) | Nodes |+|------|----------|-----------|-------|+| example.com | 298-354 | 32-46 | 8 |+| google.com | — | — | 87 |+| github.com | 899 | 91 | 445-1,482 |+| bbc.co.uk | 915 | — | 996 |+| news.ycombinator.com | 687 | 43 | 966 |+| stackoverflow.com | 967 | 84 | 764 |+| bot.sannysoft.com | 574 | — | — |++---++## Token Performance++### Tokens per Endpoint per Site++| Site | /snapshot | ?interactive | ?format=text | /text | /text raw | Nodes |+|------|----------|-------------|-------------|-------|-----------|-------|+| example.com | ~187 | ~36 | ~100 | ~47 | ~49 | 8 |+| google.com | ~1,938 | ~564 | ~1,292 | ~764 | ~407 | 87 |+| github.com | ~9,835 | ~2,160 | ~7,189 | ~1,249 | ~1,570 | 445 |+| bbc.co.uk | ~23,112 | ~4,848 | ~19,706 | ~3,118 | ~3,621 | 996 |+| wikipedia (Go) | ~142,154 | ~20,246 | ~97,637 | ~15,676 | ~15,058 | 7,090 |+| HN | ~18,643 | ~4,287 | ~12,062 | ~971 | ~1,076 | 966 |++### Reduction Ratios++| Filter | Avg Reduction vs Full Snapshot |+|--------|-------------------------------|+| `?filter=interactive` | **-77%** (range 71-86%) |+| `?format=text` | **-31%** (range 15-47%) |+| `/text` | **-85%** (range 61-95%) |++### Cost Estimates (Claude Sonnet, $3/M input)++| Site | Full snapshot | Interactive | /text |+|------|-------------|-------------|-------|+| example.com | $0.001 | $0.000 | $0.000 |+| github.com | $0.030 | $0.006 | $0.004 |+| bbc.co.uk | $0.069 | $0.015 | $0.009 |+| wikipedia | $0.427 | $0.061 | $0.047 |+| HN | $0.056 | $0.013 | $0.003 |++### v0.3.0 → v0.4.0 Comparison++| Site | v0.3.0 /snapshot | v0.4.0 /snapshot | Change |+|------|-----------------|-----------------|--------|+| google.com | ~848 | ~1,938 | +128% (more content loaded?) |+| github.com | ~9,835 | ~9,835 | Stable |+| bbc.co.uk | ~26,598 | ~23,112 | -13% |+| wikipedia | ~20,474 | ~142,154 | +594% (different article or full load) |+| HN | ~24,000 | ~18,643 | -22% |++---++## Known Issues++| # | Issue | Severity | Status | Notes |+|---|-------|----------|--------|-------|+| K1 | Active tab tracking unreliable | P0 | ✅ FIXED | Use explicit tabId |+| K2 | Tab close hangs | P0 | ✅ FIXED | Context cancel + CDP CloseTarget |+| K3 | SPA title empty (x.com) | P2 | 🔧 IMPROVED | `waitTitle` param added |+| K4 | Chrome flag warning | P2 | ✅ FIXED | Removed deprecated flag |+| K5 | Stealth PRNG weak | P1 | ✅ FIXED | Mulberry32 with Go seed |+| K6 | Chrome UA hardcoded | P1 | ✅ FIXED | Configurable via env |+| K7 | Fingerprint rotation JS-only | P2 | ✅ FIXED | CDP Emulation.SetUserAgentOverride |+| K8 | Timezone hardcoded | P2 | ✅ FIXED | CDP Emulation.setTimezoneOverride |+| K9 | Stealth status hardcoded | P2 | ✅ FIXED | Probes browser when tab available |+| K10 | Profile hang on stale locks | P1 | 🟡 OPEN | Stale SingletonLock/Socket/Cookie files + restored tabs cause Chrome hang. Workaround: `BRIDGE_NO_RESTORE=true` or fresh profile |+| K11 | File output ignores path param | P2 | 🟡 OPEN | S8: `?output=file&path=X` ignores path, writes to default location |+| NEW | Stealth not injected on new tabs | P1 | ✅ FIXED | Added `injectStealth()` on CreateTab + TabContext |+| NEW | CreateTab nil panic | P1 | ✅ FIXED | Nil pointer check added |++---++## Release Readiness (v1.0)++### P0 — Must Pass++| Criterion | Status |+|-----------|--------|+| All Section 1 pass (headless) | 🟡 39/40 (S8 file output) |+| All Section 1 pass (headed) | ❌ Not tested |+| K1 active tab tracking | ✅ FIXED |+| K2 tab close hangs | ✅ FIXED |+| Zero crashes | ✅ (with clean profile) |+| `go test ./...` 100% pass | ✅ 92/92 |+| `go test -tags integration` pass | ✅ ~100 pass, 1 skip |++### P1 — Should Pass++| Criterion | Status |+|-----------|--------|+| Multi-agent MA1-MA5 | ❌ Not tested |+| Stealth bot.sannysoft.com | ✅ PASS |+| Session persistence SP1-SP2 | ❌ Not tested |++### P2 — Nice to Have++| Criterion | Status |+|-----------|--------|+| Coverage > 30% | 🟡 28.9% |+| K3-K4 addressed | ✅ |+| Performance baselined | ✅ |++---++## New Features (v0.4.0)++- **Image blocking:** `BRIDGE_BLOCK_IMAGES=true` or per-request `{"blockImages": true}`+- **Media blocking:** `BRIDGE_BLOCK_MEDIA=true` — superset: images + fonts + CSS + video/audio+- **Stealth on all tabs:** Stealth script now injected on CreateTab and TabContext+- **K2 proper fix:** Context cancel + direct CDP executor (dual approach)+- **waitTitle param:** Navigate can wait for SPA titles+- **Config warnings:** Invalid JSON in config file now logged++---++## Action Items++1. **K10 — Profile hang (P1):** Add stale lock file cleanup on startup + Chrome connection timeout. Users will hit this on first real use.+2. **K11 — File output path (P2):** Honor the `path` parameter in `?output=file&path=X`.+3. **Coverage to 30%:** Add tests for cookie/stealth handler happy paths (~2% gap).+4. **Token optimization:** Implement `maxTokens` and `selector` params on `/snapshot` — Wikipedia at 142K tokens is unusable without truncation.+5. **Headed mode testing:** Run Section 2 tests to validate non-headless.+6. **Multi-agent testing:** Build concurrent test harness for Section 3 (MA1-MA5).+7. **Compact snapshot format:** Close the 3-4× gap with OpenClaw aria trees — biggest token cost win.+8. **`blockImages` on CreateTab:** Global `BRIDGE_BLOCK_IMAGES` not applied when creating tabs, only on `/navigate`.++---++*Consolidated from: mario-test-00, mario-test-07, mario-test-08, bosch-test-00, bosch-test-02, test-summary, test-summary-07, v0.3.0-performance-history, v0.4.0-token-performance*diff --git a/tests/v0.4.0-token-performance.md b/tests/v0.4.0-token-performance.mddeleted file mode 100644index 3b52ef51..00000000--- a/tests/v0.4.0-token-performance.md+++ /dev/null@@ -1,62 +0,0 @@-# Token Performance — v0.4.0 (autorun branch)--**Date:** 2026-02-17 08:52 UTC-**Run by:** Mario (manual)-**Instance:** headless, clean profile, BRIDGE_NO_RESTORE=true-------## Results--| Site | /snapshot | ?filter=interactive | ?format=text | /text | /text?mode=raw | Nodes |-|------|----------|---------------------|-------------|-------|----------------|-------|-| example.com | ~187 | ~36 | ~100 | ~47 | ~49 | 8 |-| google.com | ~1,938 | ~564 | ~1,292 | ~764 | ~407 | 87 |-| github.com | ~9,835 | ~2,160 | ~7,189 | ~1,249 | ~1,570 | 445 |-| bbc.co.uk | ~23,112 | ~4,848 | ~19,706 | ~3,118 | ~3,621 | 996 |-| wikipedia (Go) | ~142,154 | ~20,246 | ~97,637 | ~15,676 | ~15,058 | 7,090 |-| news.ycombinator.com | ~18,643 | ~4,287 | ~12,062 | ~971 | ~1,076 | 966 |--## Reduction Ratios--| Site | interactive vs full | text fmt vs full | /text vs full |-|------|-------------------|-----------------|--------------|-| example.com | -81% | -47% | -75% |-| google.com | -71% | -33% | -61% |-| github.com | -78% | -27% | -87% |-| bbc.co.uk | -79% | -15% | -87% |-| wikipedia | -86% | -31% | -89% |-| HN | -77% | -35% | -95% |--## Analysis--- **`?filter=interactive`** is the best option for agents that need to interact — 71-86% reduction across all sites-- **`/text`** is cheapest for content reading — 61-95% reduction, ideal for scraping/reading-- **`?format=text`** underperforms — only 15-47% reduction vs JSON, not worth the tradeoff-- **Wikipedia is an outlier** — 142K tokens / 7,090 nodes; needs `maxTokens` or `selector` to be usable-- **HN shows ideal `/text` efficiency** — 971 tokens for a full page of links--## Cost Estimates (Claude Sonnet, $3/M input)--| Site | Full snapshot | Interactive | /text |-|------|-------------|-------------|-------|-| example.com | $0.001 | $0.000 | $0.000 |-| google.com | $0.006 | $0.002 | $0.002 |-| github.com | $0.030 | $0.006 | $0.004 |-| bbc.co.uk | $0.069 | $0.015 | $0.009 |-| wikipedia | $0.427 | $0.061 | $0.047 |-| HN | $0.056 | $0.013 | $0.003 |--## Optimization Opportunities--1. **`maxTokens` param** — Truncate snapshot at N tokens. Biggest win for large pages.-2. **`selector` param** — Scope a11y tree to CSS selector (`#content`, `article`). Eliminates nav/footer noise.-3. **`exclude` patterns** — Auto-strip nav, footer, cookie banners. Sensible defaults.-4. **Compact JSON format** — Current nodes are verbose objects. A flat format could halve tokens.-5. **Viewport scoping** — Only return visible nodes. Below-fold content usually irrelevant.--## Methodology--- Tokens ≈ bytes / 4 (rough estimate for English text)-- Each site navigated fresh, 4s wait before measurement-- All endpoints measured sequentially on same page load