zeroclaw-labs/zeroclaw · error · anyhow::Error

checkpoint edit and revise decisions must resolve through…

Error message

checkpoint edit and revise decisions must resolve through the approval broker

What it means

decide_checkpoint (or a sibling decision path) received an Amend/Revise decision that tried to bypass the approval broker. Checkpoint edit and revise decisions must be authenticated and authorized through the broker with a principal; direct calls are rejected at this boundary.

Solutions

  1. Route checkpoint edit/revise decisions through the approval broker instead of direct calls.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/zeroclaw-runtime/src/sop/engine.rs:3088 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23). Data as JSON: /api/errors/685b662a0ebcd3a0. Report an issue: GitHub.

Appendix: source

Thrown at crates/zeroclaw-runtime/src/sop/engine.rs:3088

    /// Resolve a checkpoint decision (`PausedCheckpoint`). `Approve` resumes the
    /// success path (records the checkpoint `Completed`, pipes forward down
    /// `routing.next`); `Deny` takes the failure path (records the checkpoint
    /// `Failed` and routes through the step's `on_failure`, exactly like a step
    /// that failed execution). This is the single entry point for both outcomes;
    /// callers never branch on status. `approve_step` is the `Approve`-only alias.
    pub fn decide_checkpoint(
        &mut self,
        run_id: &str,
        decision: super::approval::ApprovalDecision,
    ) -> Result<SopRunAction> {
        match decision {
            super::approval::ApprovalDecision::Approve => self.approve_step(run_id),
            super::approval::ApprovalDecision::Deny { reason } => {
                self.deny_checkpoint(run_id, reason)
            }
            super::approval::ApprovalDecision::Amend { .. }
            | super::approval::ApprovalDecision::Revise { .. } => {
                bail!(
                    "checkpoint edit and revise decisions must resolve through the approval broker"
                )
            }
        }
    }

    /// Apply a broker-authorized checkpoint decision and persist the resulting run
    /// state together with the approver audit row. The run store is the durable
    /// source of truth for both surfaces, so a failed combined write leaves the
    /// checkpoint parked with no false resolution event.
    fn decide_checkpoint_with_principal(
        &mut self,
        run_id: &str,
        decision: super::approval::ApprovalDecision,
        principal: super::approval::ApprovalPrincipal,
    ) -> Result<SopRunAction> {
        let prior_run = self
            .active_runs

View on GitHub (pinned to 88bb9c8533)