Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(workflow_runs): abort drive when admission revision is missing

Steven Enamakel1fce45cb8400
diff --git a/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/lifecycle.rs b/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/lifecycle.rs
index 3be9b547db..0939ef09fb 100644
--- a/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/lifecycle.rs
+++ b/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/lifecycle.rs
@@ -156,12 +156,19 @@ fn schedule_workflow_drive(
) else {
return;
};
+ let Some(admission_revision) = revision_slot.get().copied() else {
+ log::error!(
+ target: LOG_TARGET,
+ "[workflow_run_engine] drive missing admission revision run={run_id}"
+ );
+ return;
+ };
run_engine_loop(
&config,
&run_id,
definition,
handle,
- revision_slot.get().copied().unwrap_or_default(),
+ admission_revision,
cancel_token,
Some(parent),
)
diff --git a/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/lifecycle_tests.rs b/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/lifecycle_tests.rs
index 9d78f62037..fd9501da55 100644
--- a/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/lifecycle_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/lifecycle_tests.rs
@@ -88,7 +88,13 @@ async fn stale_workflow_generation_cannot_fail_its_replacement() {
assert!(!supervisor.is_current(&old));
assert!(supervisor.is_current(&current));
- record_failed_if_current(&config, &run_id, &old, "stale sentinel".into());
+ record_failed_if_current(
+ &config,
+ &run_id,
+ &old,
+ seeded.revision,
+ "stale sentinel".into(),
+ );
let unchanged = crate::storage::sessions::with_ledger(&config.workspace_dir, |ledger| {
let id = run_id.clone();
async move { ledger.get_workflow_run(&id).await }