mirror of
https://github.com/morluto/rea.git
synced 2026-11-21 06:04:03 +00:00
refactor(errors): give caller aborts a typed reason at the adapters (#10633)
* refactor(errors): give caller aborts a typed reason at the adapters Squashes 908813551f, 87858de4dc (fix(mcp): preserve cancellation reasons in handlers) and fa151dc3f6 (test(server): race handler-entry gates against the triggering tool call) onto main without #10566's pre-squash commits. * refactor(errors): give owner-initiated aborts a typed reason outside the browser adapters (#10692) * refactor(errors): give owner-initiated aborts a typed reason outside the browser adapters * refactor(verify): keep the abort-reason scan receiver-independent Playwright's route.abort takes a network error code; the one call site now names its default code instead of the guard exempting a variable name. * refactor(browser): give owner-initiated CDP aborts typed reasons (#10706) * refactor(browser): give owner-initiated CDP aborts typed reasons * fix(browser): give the page-side request fetch page-native abort reasons The request callback runs in the page through page.evaluate and cannot reach REA's modules. Define its deadline and cleanup reasons as DOMExceptions inside the callback, and make the test fake evaluate the callback from its source so module imports are unavailable, as in a page. * test(process): expect the reader close's typed owner reason Closing the Darwin run-token reader aborts its compilation with OwnerCancellation.ownerClosed since the owner-abort change in this PR; the boundary test still expected the default DOMException. * fix(server): report HTTP session replacement and shutdown to pending tools as an owner close
This commit is contained in:
1 parent
df0bdd9f58
commit
b655645608
56 files changed
+758
-159
No files matched your search
@@ -21,6 +21,7 @@ import {
|
||||
AnalysisCancelledError,
|
||||
AnalysisCapabilityUnavailableError,
|
||||
AnalysisOutputError,
|
||||
OwnerCancellation,
|
||||
} from "../../domain/analysisErrorCore.js";
|
||||
import {
|
||||
AnalysisError,
|
||||
@@ -1752,7 +1753,7 @@ export class BinarySession
|
||||
): Promise<T> {
|
||||
if (options.abortPrompts !== false)
|
||||
for (const controller of this.#promptCompletionControllers)
|
||||
controller.abort();
|
||||
controller.abort(OwnerCancellation.noLongerNeeded);
|
||||
this.#transitionPending += 1;
|
||||
// Later calls wait for this transition and must not be included in its drain.
|
||||
const admittedThrough = this.#transitionGeneration++;
|
||||
|
||||
Reference in new issue
Block a user