pub fn fire_before_triggers(
registry: &TriggerRegistry,
diff: TriggerDiff,
reader: &dyn GraphReader,
writer: &dyn GraphWriter,
procedures: &ProcedureRegistry,
) -> Result<()>Expand description
Fire every registered before-phase trigger against the pre-commit diff. Returns Ok if every trigger ran cleanly, Err with the offending message if one failed — propagated to abort the originator’s commit. Trigger writes are buffered into the supplied writer so the caller can merge them into the prepared command batch.
Unlike after-firing, before-firing stops at the first error: the user’s commit hasn’t happened yet, so a failing before- trigger cleanly aborts everything.