0.1.0-pre.004

This commit is contained in:
2026-07-23 18:25:10 +02:00
parent 0da75c1311
commit 149d4c6ef6
85 changed files with 25696 additions and 227 deletions

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/model/replay.rs
// version: 2
// version: 3
//! Source-neutral instruction replay input shared by decoders and stores.
@@ -123,4 +123,21 @@ impl CoreInstructionReplayInput {
}
return std::result::Result::Ok(());
}
/// Adds an optional stable surface hint after validation.
pub fn with_surface_code_hint(
mut self,
surface_code_hint: std::option::Option<std::string::String>,
) -> kb_core::Result<Self> {
if surface_code_hint
.as_deref()
.is_some_and(|surface| return surface.trim().is_empty())
{
return std::result::Result::Err(kb_core::Error::invalid_state(
"core replay input surface hint must not be empty when present",
));
}
self.surface_code_hint = surface_code_hint;
return std::result::Result::Ok(self);
}
}