tests(core): scope 2s timeout buffer to ro_unless_trusted write scenarios

This commit is contained in:
Ahmed Ibrahim
2026-03-12 16:20:30 -07:00
parent 3d81948c54
commit 1d713455e5

View File

@@ -124,7 +124,14 @@ impl ActionKind {
let (path, _) = target.resolve_for_patch(test);
let _ = fs::remove_file(&path);
let command = format!("printf {content:?} > {path:?} && cat {path:?}");
let event = shell_event(call_id, &command, 1_000, sandbox_permissions)?;
// This path is known to be flaky on loaded Linux CI when the write
// command runs under approval flow + read-only policy; keep the timeout
// tight, but allow a small buffer for process/sandbox startup jitter.
let timeout_ms = match target {
TargetPath::Workspace(name) if name.starts_with("ro_unless_trusted") => 2_000,
_ => 1_000,
};
let event = shell_event(call_id, &command, timeout_ms, sandbox_permissions)?;
Ok((event, Some(command)))
}
ActionKind::FetchUrl {