fix(engine): limit the number of snapshots returned when getting latest snapshots since (#2550)

This commit is contained in:
Eric Allam
2025-09-25 11:53:35 +01:00
committed by James Ritchie
parent a6458502e8
commit ff5037d9cf
@@ -216,10 +216,11 @@ export async function getExecutionSnapshotsSince(
completedWaitpoints: true,
checkpoint: true,
},
orderBy: { createdAt: "asc" },
orderBy: { createdAt: "desc" },
take: 50,
});
return snapshots.map(enhanceExecutionSnapshot);
return snapshots.reverse().map(enhanceExecutionSnapshot);
}
export class ExecutionSnapshotSystem {