feat(tools): extend cancellation to browser, web, and process tools

This commit is contained in:
William Valentin
2026-02-15 22:12:03 -08:00
parent 7877a1bcc9
commit b4006e91ff
10 changed files with 228 additions and 32 deletions
@@ -16,7 +16,7 @@ Scope: Production-risk-first audit of bugs, code improvements, and feature oppor
- ✅ F-008 addressed: WhatsApp Chromium launch is now sandboxed by default; no-sandbox mode is behind explicit `whatsapp.no_sandbox: true` opt-in.
- ✅ F-014 addressed: `ModelRouter.setOnTierChange` now preserves existing listeners instead of replacing them, removing destructive listener-setter behavior.
- ✅ F-002 addressed: `config.patch` now supports durable persistence via atomic write + backup when daemon has a concrete config path, and response includes `persisted`/`persistError` so UI can distinguish runtime-only vs disk-persisted updates.
- ◑ F-003 partially addressed: tool execution now has an `AbortSignal` contract and executor triggers abort on timeout; host `shell.exec` and sandbox docker exec now respond to cancellation. Additional high-risk tools still need explicit cancellation coverage for full closure.
- ◑ F-003 partially addressed: tool execution now has an `AbortSignal` contract and executor triggers abort on timeout; host `shell.exec`, sandbox docker exec, `process.start`, browser tools (`browser.navigate/click/type/content/eval/screenshot`), and web tools (`web.fetch`, `web.search`) now respond to cancellation. Remaining closure work is timeout-side-effect regression coverage.
- ✅ F-015 addressed: retry defaults no longer classify timeout-style failures as non-retryable, improving resilience for transient timeout conditions.
## Executive Summary
@@ -24,7 +24,7 @@ Scope: Production-risk-first audit of bugs, code improvements, and feature oppor
Current health snapshot:
- `pnpm typecheck`: passing
- `pnpm build`: passing
- `pnpm test:run`: passing (`137/137` files, `1735/1735` tests)
- `pnpm test:run`: passing (`140/140` files, `1765/1765` tests)
- `pnpm lint`: failing (`148 errors`, `530 warnings`)
Top conclusions:
@@ -113,6 +113,10 @@ Non-goals:
- Timeout + cancellation conformance tests for cancellable tools.
- Regression tests verifying no post-timeout side effects.
Remediation update (2026-02-16):
- Abort propagation now covers executor -> context signal -> `process.start`, browser tools, and web fetch/search tools.
- Added aborted-signal regression tests for these tool paths.
### F-004 Medium: Lint quality gate is broken and concentrated in key runtime files
- Severity: Medium