{
  "name": "flows/refund-v1.yaml",
  "flow": "refund",
  "typed": false,
  "errors": 0,
  "warnings": 0,
  "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"
      },
      {
        "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"
      },
      {
        "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": "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
      },
      {
        "from": "review",
        "to": "charge",
        "taken": false
      },
      {
        "from": "charge",
        "to": "receipt",
        "taken": false
      },
      {
        "from": "lookup",
        "to": "review",
        "label": "when large",
        "taken": false
      },
      {
        "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[\"credit\"]:::declared\n  n5[\"receipt\"]:::declared\n  n0 -.-\u003e n1\n  n2 -.-\u003e n3\n  n3 -.-\u003e n5\n  n1 -.-\u003e|when large| n2\n  n1 -.-\u003e|else| n4\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": 1,
    "gated": 1,
    "ungated": 0,
    "read_only": 2,
    "idempotent": 2,
    "unknown": 1,
    "line": "1 side-effect step known, 1 gated, 0 ungated",
    "unknown_line": "1 node: safety unknown without the Registry (the config states none)"
  },
  "assertions": [
    {
      "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"
  }
}
