Keep bootstrap promotion non-actuating
This commit is contained in:
parent
c709777706
commit
b2330c7cb7
1 changed files with 14 additions and 1 deletions
|
|
@ -3929,6 +3929,9 @@ pub fn promote_autonomous_direction_options_for_modeling(
|
|||
receipt.admitted_revision == model.model_revision && receipt.admitted_hash == model_hash
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
if receipts.is_empty() {
|
||||
return Ok(Vec::new());
|
||||
}
|
||||
if receipts.len() != 1 {
|
||||
return Err(anyhow!(
|
||||
"autonomous proposal promotion requires one current model receipt"
|
||||
|
|
@ -9738,7 +9741,7 @@ pub(crate) mod tests {
|
|||
#[test]
|
||||
fn autonomous_direction_promotion_waits_for_admitted_model_without_mutation() -> Result<()> {
|
||||
let root = tempfile::tempdir()?;
|
||||
let store = root.path().join("thread-without-model.cc");
|
||||
let store = root.path().join("bootstrap-model-without-admission.cc");
|
||||
initialize_runtime_spine(
|
||||
&store,
|
||||
RuntimeSpineInitOptions {
|
||||
|
|
@ -9755,6 +9758,16 @@ pub(crate) mod tests {
|
|||
&epiphany_state_model::EpiphanyThreadState::default(),
|
||||
)?,
|
||||
)?;
|
||||
cache.put(
|
||||
crate::MEMORY_GRAPH_KEY,
|
||||
&crate::EpiphanyMemoryGraphEntry::from_snapshot(
|
||||
&crate::EpiphanyMemoryGraphSnapshot {
|
||||
schema_version: Some(crate::MEMORY_GRAPH_SCHEMA_VERSION.into()),
|
||||
graph_id: "bootstrap-model".into(),
|
||||
..Default::default()
|
||||
},
|
||||
)?,
|
||||
)?;
|
||||
let before = std::fs::read(&store)?;
|
||||
assert!(
|
||||
promote_autonomous_direction_options_for_modeling(
|
||||
|
|
|
|||
Reference in a new issue