Function materialize
pub fn materialize(
base_toml: &str,
overlay: &BTreeMap<String, String>,
seed: u64,
run_root: &str,
timestamp: &str,
slug: &str,
) -> Result<String>Expand description
Builds one trial’s RunConfig TOML.
Starts from base_toml (the text of oniro_cli default-config, or a
user-supplied base), overrides each overlay entry at its dotted key with a
value coerced to the base’s type there, and sets the trial’s seed and run
directory (run.root/run.timestamp/run.slug). The timestamp and
slug together must make root/<timestamp>-<slug> unique across concurrent
trials and a trial’s replicates (the caller derives them from the trial
number and the replicate seed).
§Errors
SpikeError::Materialize if the base config is not a TOML table, if a
dotted key is empty or traverses a non-table, if a value cannot be coerced
to the base’s type at its key, or if the merged config cannot be
re-serialized.