fix: report provider admission failures as typed codes (#8066)

* fix: report provider admission failures as typed codes

* fix(evm): keep limiter path on admission diagnostics

* fix: assert WABT and CBOR admission codes

* fix: keep admission details on returned failures

* fix(evm): detect repeated CBOR keys in the decoder

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
This commit is contained in:
morlutoandCursor Agent authored and GitHub committed 2026-10-30 06:48:01 +08:00
1 parent 3b647132c6
commit 317bf3fe23
63 files changed
+1021 -432

No files matched your search

+3 -1
View File
@@ -1,3 +1,5 @@
import { ProcessAdmissionError } from "./ProcessAdmissionError.js";
/** Timeout and cancellation projections for one correlated operation. */
export type PendingOperationOptions<Value> = {
readonly signal?: AbortSignal;
@@ -36,7 +38,7 @@ export class PendingOperations<Key, Value> {
/** Register one unique operation key and await its reply or cancellation. */
wait(key: Key, options: PendingOperationOptions<Value>): Promise<Value> {
if (this.#pending.has(key))
throw new Error("Pending operation key is already registered");
throw new ProcessAdmissionError("duplicate_key");
if (options.signal?.aborted === true)
return Promise.resolve(options.cancelledValue());