fix(web): preserve batch contract on scheduler failures
This commit is contained in:
@@ -81,10 +81,12 @@ const stopOnFatal = (error, source) => {
|
||||
if (fatalHandled) return;
|
||||
fatalHandled = true;
|
||||
try {
|
||||
failureLedger.record({ task: currentTask()?.task ?? "UNKNOWN", phase: "supervisor", reason: source, detail: error?.message ?? String(error) });
|
||||
writeCheckpoint({ state: "blocked", iteration, reason: source, error: error?.message ?? String(error) });
|
||||
appendLog(`blocked reason=${source} error=${error?.message ?? String(error)}`);
|
||||
}
|
||||
finally {
|
||||
failureLedger.flush();
|
||||
releaseLock();
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user