fix: retain discriminated Electron action outcomes in projection
This commit is contained in:
1 parent
ec0259de89
commit
44efd920c6
2 files changed
+6
-3
No files matched your search
@@ -151,14 +151,17 @@ export const runElectronActions = async (
|
||||
stoppedBy = options.signal?.aborted ? "cancelled" : "failed";
|
||||
actionError = safeActionErrorMessage(cause);
|
||||
}
|
||||
const outcome =
|
||||
actionError === null
|
||||
? { status: "completed" as const, error: null }
|
||||
: { status: stoppedBy ?? "failed", error: actionError };
|
||||
actions.push({
|
||||
step_id: action.step_id,
|
||||
kind: action.kind,
|
||||
window_index: windowIndex,
|
||||
target,
|
||||
status: stoppedBy ?? "completed",
|
||||
...outcome,
|
||||
elapsed_ms: Math.max(0, Math.round(performance.now() - actionStartedAt)),
|
||||
error: actionError,
|
||||
});
|
||||
if (handleOwner !== undefined) {
|
||||
cleanupError = await releaseActionWindow(
|
||||
|
||||
@@ -74,7 +74,7 @@ it("returns detached terminal observations", async () => {
|
||||
const utf8Bytes = Buffer.byteLength(value);
|
||||
return utf8Bytes <= maxBytes
|
||||
? { state: "normalized", value, utf8Bytes }
|
||||
: { state: "over_budget" };
|
||||
: { state: "over_budget", reason: "retention" };
|
||||
},
|
||||
recordEvent: (collection, index) =>
|
||||
observed.push(`${collection}:${String(index)}`),
|
||||
|
||||
Reference in new issue
Block a user