Skip to content

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

chore: files changed crates/openhuman-core/src/cron/store.rs

Steven Enamakel0fd8ec5415a5
diff --git a/crates/openhuman-core/src/cron/store.rs b/crates/openhuman-core/src/cron/store.rs
index cb37ee7673..3afce2c194 100644
--- a/crates/openhuman-core/src/cron/store.rs
+++ b/crates/openhuman-core/src/cron/store.rs
@@ -226,7 +226,7 @@ pub(crate) fn update_job_with_origin(
fn validate_and_complete_route_patch(
config: &Config,
existing: &CronJob,
- patch: CronJobPatch,
+ mut patch: CronJobPatch,
trusted_origin: Option<&tinyflows_bus::schedule::types::JobOrigin>,
) -> Result<CronJobPatch> {
let delivery = patch
@@ -245,8 +245,10 @@ fn validate_and_complete_route_patch(
)
.map_err(anyhow::Error::msg)?;
- // Route fields are materialized once the test proves the partial-patch
- // interleaving described above.
+ // Persist exactly the pair that was validated. A stale write containing
+ // only one route field must not combine with a newer counterpart.
+ patch.delivery = Some(delivery);
+ patch.origin = Some(effective_origin);
Ok(patch)
}