Commit e88e2b9
feat(agent): eval timeouts, spawn concurrency limiter, PageWaitStrategy, panic hardening
- Add eval_with_timeout() helper wrapping page.evaluate() with tokio timeout
- Replace all `let _ = page.evaluate(...)` with eval_with_timeout + proper
error handling across engine loops (TTT, WAM, NEST, CIRCLE, WS) and
action handlers (Press, KeyDown, KeyUp, Scroll*, GoBack, GoForward,
Reload, Hover, Select, Focus, Blur, Evaluate)
- Add per-agent spawn concurrency via Semaphore on SpawnPageOptions
(DEFAULT_SPAWN_CONCURRENCY=5), wired into both run_spawn_pages_with_options
and run_spawn_pages_with_factory
- Add PageWaitStrategy enum (Load, NetworkIdle, NetworkAlmostIdle, Selector,
DomStable, Delay, None) replacing hard-coded sleeps in spawn page functions
- Cap InfiniteScroll to MAX_INFINITE_SCROLL_ITERATIONS (100)
- Cap WaitForWithTimeout to MAX_WAIT_FOR_TIMEOUT_MS (30s)
- Fix TempStorage::default() panic — fallback to std::env::temp_dir() on
initial failure instead of unconditional expect()
- Fix capture_profiles.last().expect() — use Default fallback for empty slice
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent e76b38b commit e88e2b9
File tree
10 files changed
+521
-86
lines changed- spider_agent_html
- spider_agent_types
- spider_agent
- src
- automation
- spider_cli
- spider_utils
- spider_worker
- spider
10 files changed
+521
-86
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
| 31 | + | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
0 commit comments