Read the resume action off the unified restore log line

The Docker recovery scenarios scraped the worker log for "sandbox
workspace brought to its durable snapshot"; since the host and sandbox
restores share one path, the line reads "workspace brought to its
durable snapshot" with the site as a field.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Bryan Helmkamp 2026-09-20 15:31:39 -04:00
parent f471676802
commit e010563ad5
No known key found for this signature in database

View file

@ -281,7 +281,7 @@ fn futures_lite_block_on<T>(future: impl std::future::Future<Output = T>) -> T {
fn restore_actions(server: &RunningServer, run_id: &str) -> Vec<String> {
let log = std::fs::read_to_string(server.worker_log(run_id)).unwrap_or_default();
log.lines()
.filter(|line| line.contains("sandbox workspace brought to its durable snapshot"))
.filter(|line| line.contains("workspace brought to its durable snapshot"))
.filter_map(|line| {
line.split_whitespace()
.find_map(|word| word.strip_prefix("action=").map(str::to_owned))