Use Checkpoint::load() instead of manual file read and parse

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Bryan Helmkamp 2026-03-04 01:48:59 -05:00
parent 0a0f47b218
commit c8a1693492

View file

@ -1031,11 +1031,7 @@ async fn run_from_branch(
/// Print the final stage output from the checkpoint, if available.
fn print_final_output(logs_dir: &std::path::Path, styles: &Styles) {
let checkpoint_path = logs_dir.join("checkpoint.json");
let Ok(data) = std::fs::read_to_string(&checkpoint_path) else {
return;
};
let Ok(checkpoint) = serde_json::from_str::<Checkpoint>(&data) else {
let Ok(checkpoint) = Checkpoint::load(&logs_dir.join("checkpoint.json")) else {
return;
};