Reuse verified native suffixes after settled output routines

This commit is contained in:
gloamxun committed 2026-11-29 07:51:37 +08:00
1 parent f387b1db61
commit 0117449023
30 files changed
+791 -77

No files matched your search

+17
View File
@@ -120,6 +120,23 @@ impl<'a> RecordingHost<'a> {
.filter(|read| read.path == version.path).count() == source_reads + size_reads
}
pub(super) fn files(&self) -> &Files {
self.files
}
pub(super) fn replay_suffix(&mut self, calls: &[Call], cancellation: &Cancellation) -> Result<(), String> {
let recorded = self.calls.as_mut().ok_or("host calls are unavailable")?;
if recorded.len() + calls.len() >= MAX_REPLAY_CALLS {
return Err("completed suffix exceeds the host recording budget".into());
}
for call in calls {
check(cancellation).map_err(|error| error.to_string())?;
call.replay(self.files, None)?;
}
recorded.extend_from_slice(calls);
Ok(())
}
pub(super) fn generated_outputs(&self) -> &BTreeSet<PathBuf> {
self.files.generated_outputs()
}