mirror of
https://github.com/morluto/rea.git
synced 2026-11-16 03:33:25 +00:00
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:
1 parent
3b647132c6
commit
317bf3fe23
63 files changed
+1021
-432
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { ProcessAdmissionError } from "../ProcessAdmissionError.js";
|
||||
import type { IPty } from "@lydell/node-pty";
|
||||
import type { ProcessCapture } from "../../domain/process/processCaptureParsing.js";
|
||||
import type { ProcessScenario } from "../../domain/process/processScenario.js";
|
||||
@@ -846,9 +847,7 @@ const runProcessScenario = async (
|
||||
};
|
||||
if (exit.reason === "cancelled")
|
||||
throw processCaptureCancelled(signal?.reason);
|
||||
throw new Error(
|
||||
"The captured process exit was not observed because the finalization SIGKILL could not be delivered.",
|
||||
);
|
||||
throw new ProcessAdmissionError("finalization_unobserved");
|
||||
}
|
||||
if (exit.finalization !== undefined)
|
||||
observations.finalization = {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { ProcessAdmissionError } from "../ProcessAdmissionError.js";
|
||||
import { AnalysisError } from "../../domain/analysisErrorBase.js";
|
||||
import { AnalysisResourceConstraintError } from "../../domain/analysisErrorCore.js";
|
||||
import { err, ok, type Result } from "../../domain/result.js";
|
||||
@@ -134,7 +135,7 @@ export class ProcessSensitiveOutput {
|
||||
#prefix(index: number): Prefix {
|
||||
const value = this.prefixes[index];
|
||||
if (value === undefined)
|
||||
throw new Error("Sensitive output matcher lost its prefix identity");
|
||||
throw new ProcessAdmissionError("prefix_identity_lost");
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -342,7 +343,7 @@ export const createProcessSensitiveOutput = (
|
||||
const read = (index: number): Prefix => {
|
||||
const node = prefixes[index];
|
||||
if (node === undefined)
|
||||
throw new Error("Sensitive output prefix is unavailable");
|
||||
throw new ProcessAdmissionError("prefix_unavailable");
|
||||
return node;
|
||||
};
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user