{
  "name": "flows/refund-bypass.yaml",
  "flow": "refund",
  "typed": false,
  "errors": 1,
  "warnings": 0,
  "problems": [
    {
      "node": "charge_vip",
      "message": "assert[0] \"every path to charge_vip passes approval \u003e= 2 of 3\" is violated: a path reaches \"charge_vip\" without passing an approval gate of at least 2 of 3 (counterexample: validate -\u003e lookup -\u003e charge_vip)",
      "severity": "error"
    }
  ],
  "graph": {
    "nodes": [
      {
        "name": "validate",
        "kind": "block validate",
        "status": "declared",
        "title": "validate (block validate)\nread-only: no external effect. A resume after a crash re-runs it.",
        "risk": "read-only",
        "crash": "crash: re-runs",
        "cex": true
      },
      {
        "name": "lookup",
        "kind": "block lookup",
        "status": "declared",
        "title": "lookup (block lookup)\nsafety unknown: the block is not registered here and the config states no safety. Check with the plan.Registry (plan/planview), or state it in the config.",
        "risk": "safety unknown",
        "crash": "crash: unknown",
        "cex": true
      },
      {
        "name": "review",
        "kind": "block review",
        "status": "declared",
        "gate": "2 of 3: ops, finance, risk",
        "gate_line": "gated: 2 of 3",
        "gate_class": "gated",
        "title": "review (block review)\nread-only: no external effect. A resume after a crash re-runs it.",
        "risk": "read-only",
        "crash": "crash: re-runs"
      },
      {
        "name": "charge",
        "kind": "block charge",
        "status": "declared",
        "title": "charge (block charge)\nside effect: must not run twice. A crash mid-node halts the resume (*agent.OutcomeUnknown) until the outcome is recorded (agent.ResolveHalt).\nGated: every path to it passes an approval gate.",
        "risk": "side effect",
        "crash": "crash: halts, asks"
      },
      {
        "name": "charge_vip",
        "kind": "block charge",
        "status": "problem",
        "title": "charge_vip (block charge)\nside effect: must not run twice. A crash mid-node halts the resume (*agent.OutcomeUnknown) until the outcome is recorded (agent.ResolveHalt).\nUngated: a path reaches it without an approval gate.\nerror: assert[0] \"every path to charge_vip passes approval \u003e= 2 of 3\" is violated: a path reaches \"charge_vip\" without passing an approval gate of at least 2 of 3 (counterexample: validate -\u003e lookup -\u003e charge_vip)",
        "risk": "side effect",
        "crash": "crash: halts, asks",
        "cex": true
      },
      {
        "name": "credit",
        "kind": "block credit",
        "status": "declared",
        "title": "credit (block credit)\nidempotent: safe to repeat. A resume after a crash re-runs it.",
        "risk": "idempotent",
        "crash": "crash: re-runs"
      },
      {
        "name": "receipt",
        "kind": "block receipt",
        "status": "declared",
        "title": "receipt (block receipt)\nidempotent: safe to repeat. A resume after a crash re-runs it.",
        "risk": "idempotent",
        "crash": "crash: re-runs"
      }
    ],
    "edges": [
      {
        "from": "validate",
        "to": "lookup",
        "taken": false,
        "cex": true
      },
      {
        "from": "review",
        "to": "charge",
        "taken": false
      },
      {
        "from": "charge",
        "to": "receipt",
        "taken": false
      },
      {
        "from": "lookup",
        "to": "review",
        "label": "when large",
        "taken": false
      },
      {
        "from": "lookup",
        "to": "charge_vip",
        "label": "when vip",
        "taken": false,
        "cex": true
      },
      {
        "from": "lookup",
        "to": "credit",
        "label": "else",
        "taken": false
      }
    ],
    "mermaid": "flowchart TD\n  n0[\"validate\"]:::declared\n  n1[\"lookup\"]:::declared\n  n2[\"review | approval: 2 of 3: ops, finance, risk\"]:::declared\n  n3[\"charge\"]:::declared\n  n4[\"charge_vip\"]:::problem\n  n5[\"credit\"]:::declared\n  n6[\"receipt\"]:::declared\n  n0 -.-\u003e n1\n  n2 -.-\u003e n3\n  n3 -.-\u003e n6\n  n1 -.-\u003e|when large| n2\n  n1 -.-\u003e|when vip| n4\n  n1 -.-\u003e|else| n5\n  classDef done fill:#d8f0dd,stroke:#2f7d43\n  classDef halted fill:#fbe0dc,stroke:#b3261e\n  classDef attempted fill:#fff2cc,stroke:#9a6b00\n  classDef waiting fill:#e3ecfb,stroke:#2b5fb4\n  classDef notreached fill:#eee,stroke:#999,stroke-dasharray:4\n"
  },
  "approvals": [
    "review: 2 of 3: ops, finance, risk"
  ],
  "check": "structural check: types and registered blocks are checked when you embed the viewer with your plan.Registry",
  "risk": {
    "side_effects": 2,
    "gated": 1,
    "ungated": 1,
    "read_only": 2,
    "idempotent": 2,
    "unknown": 1,
    "line": "2 side-effect steps known, 1 gated, 1 ungated",
    "unknown_line": "1 node: safety unknown without the Registry (the config states none)"
  },
  "assertions": [
    {
      "text": "every path to charge_vip passes approval \u003e= 2 of 3",
      "holds": false,
      "path": [
        "validate",
        "lookup",
        "charge_vip"
      ],
      "message": "a path reaches \"charge_vip\" without passing an approval gate of at least 2 of 3"
    },
    {
      "text": "every path to charge passes approval \u003e= 2 of 3",
      "holds": true
    },
    {
      "text": "no side effect after charge",
      "holds": true
    },
    {
      "text": "every path to a terminal passes validate",
      "holds": true
    },
    {
      "text": "credit reachable",
      "holds": true
    }
  ],
  "taint": {
    "known": false,
    "line": "taint: not known without -blocks"
  }
}
