Make large G-code loading and execution robust

This commit is contained in:
2026-08-30 17:42:54 +08:00
parent 1a92d3b5b8
commit c015709d26
4 changed files with 19 additions and 6 deletions

View File

@@ -56,7 +56,13 @@ export class OperationLedger {
entry.phase = "verified";
entry.status = response?.payload?.status === "error" || response?.kind === "ERROR" ? "failed" : "verified";
entry.result_hash = fnv1a64(response?.payload ?? {});
entry.response = clone(response);
const payload = response?.payload;
// High-frequency fixed-tick responses are deltas. Keep only the compact
// operation evidence in the ledger; the full delta is already delivered
// to the client and retained by the frontend trace window.
entry.response = payload?.snapshot_mode === "motion_delta"
? { ...response, payload: { status: payload.status, snapshot_mode: payload.snapshot_mode, simulation_tick: response.simulation_tick ?? null, program: payload.program ? { current_line: payload.program.current_line, program_status: payload.program.program_status, state_hash: payload.program.state_hash } : null } }
: clone(response);
return clone(entry);
}