mirror of
https://github.com/Tencent/BrowserSkill.git
synced 2026-09-10 13:01:23 +08:00
requestBorrowConfirmation returned `true` (approve the borrow) when `chrome.tabs.get(tabId)` threw. That fail-open was not one of the documented fail-open cases in the function's own doc comment (no candidate window; abort signal; timeout), and the tab was already fetched successfully moments earlier by the borrow pipeline (validateBorrowTarget), so a failure here is a transient SW/page hiccup — not a missing tab. Silently approving a borrow with no confirmation UI shown defeats the entire human-in-the-loop gate for seizing a user's logged-in tab. On a tabs.get failure, fall back to a generic title (the numeric tab id) and still run the overlay + OS-notification confirmation flow so the user gets a real chance to approve or deny. Adds two regression tests (both fail on the unpatched code). Full extension suite green (361 tests). Co-Authored-By: Claude <noreply@anthropic.com>