Delegate bridge interruption

This commit is contained in:
Meta Vens 2026-07-12 00:52:19 +01:00
commit a682f7acd7
6 changed files with 46 additions and 48 deletions

View file

@ -9,6 +9,13 @@ pub fn interrupt_coordinator_job(
state: &EpiphanyThreadState,
request: EpiphanyJobInterruptRequest,
) -> Result<EpiphanyJobInterruptResult> {
if let Some(persisted) = read_coordinator_state(store)?
&& persisted != *state
{
return Err(anyhow!(
"authoritative coordinator state changed before interrupt commit"
));
}
if request.binding_id.trim().is_empty() {
return Err(anyhow!(
"epiphany job interrupt binding_id must be non-empty"