mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-05 03:51:54 +01:00
10 lines
634 B
TypeScript
10 lines
634 B
TypeScript
import type { RunnerE2EResult } from "./types.js";
|
|
|
|
/** Evidence failure must retain the original startup/work verdict. A generated
|
|
* fallback remains a failed harness result, never proof that a browser ran. */
|
|
export function abnormalFinalizationResult(original: RunnerE2EResult, error: unknown): RunnerE2EResult {
|
|
const detail = error instanceof Error ? error.message : String(error);
|
|
return { ...original, status: "failed", failureClass: original.status === "failed" ? original.failureClass : "permanent_infrastructure",
|
|
error: `${original.error ? `${original.error}; ` : ""}Abnormal attempt finalization: ${detail}` };
|
|
}
|