fix(javascript): preserve failure provenance and cleanup ownership

This commit is contained in:
morluto committed 2026-10-23 00:25:26 +08:00
1 parent 957bcfa149
commit 566a9a1551
7 files changed
+175 -69

No files matched your search

@@ -227,7 +227,13 @@ export const reconstructJavaScriptArtifact = async (
const checkpointCompletedAnalysis = async (): Promise<void> => {
await setImmediate();
if (interruption == null && signal?.aborted === true)
interruption = new ArtifactOperationError(OPERATION, "cancelled");
interruption = new ArtifactOperationError(
OPERATION,
"cancelled",
undefined,
undefined,
{ cause: signal.reason },
);
};
const reportCompletedPhase = async (
phase: string,