{
  "schema_version": 1,
  "diagram_type": "sequence",
  "meta": {
    "title": "Rubric Rumble: keep failures, usage and the final report",
    "quality_profile": "showcase",
    "animation": "none",
    "column_fit": "spread",
    "viewBox": [
      1000,
      567
    ]
  },
  "participants": [
    {
      "id": "rr-evidence-calls",
      "type": "backend",
      "label": "Calls and outputs"
    },
    {
      "id": "rr-evidence-cost",
      "type": "backend",
      "label": "Cost estimator"
    },
    {
      "id": "rr-evidence-run",
      "type": "backend",
      "label": "Run finalization"
    },
    {
      "id": "rr-evidence-state",
      "type": "database",
      "label": "Result dictionary"
    },
    {
      "id": "rr-evidence-entry",
      "type": "frontend",
      "label": "Desktop / CLI"
    },
    {
      "id": "rr-evidence-files",
      "type": "database",
      "label": "Result files"
    }
  ],
  "messages": [
    {
      "id": "rr-05-evidence-1",
      "from": "rr-evidence-calls",
      "to": "rr-evidence-cost",
      "label": "Returned usage + explicit dated rates",
      "y": 160
    },
    {
      "id": "rr-05-evidence-2",
      "from": "rr-evidence-cost",
      "to": "rr-evidence-calls",
      "label": "Estimated amount OR unavailable with reason",
      "y": 189,
      "variant": "return"
    },
    {
      "id": "rr-05-evidence-3",
      "from": "rr-evidence-calls",
      "to": "rr-evidence-run",
      "label": "Completed and failed call records",
      "y": 218
    },
    {
      "id": "rr-05-evidence-4",
      "from": "rr-evidence-run",
      "to": "rr-evidence-state",
      "label": "Capture mode: completed / partial / failed",
      "y": 247
    },
    {
      "id": "rr-05-evidence-5",
      "from": "rr-evidence-run",
      "to": "rr-evidence-state",
      "label": "Judged mode: completed / no-ranked-candidates",
      "y": 276
    },
    {
      "id": "rr-05-evidence-6",
      "from": "rr-evidence-run",
      "to": "rr-evidence-state",
      "label": "Judge / outer exception: failed with safe error",
      "y": 305,
      "variant": "security"
    },
    {
      "id": "rr-05-evidence-7",
      "from": "rr-evidence-run",
      "to": "rr-evidence-state",
      "label": "Summarize candidates and attempted calls",
      "y": 334
    },
    {
      "id": "rr-05-evidence-8",
      "from": "rr-evidence-run",
      "to": "rr-evidence-state",
      "label": "Subtotal estimates by phase and currency",
      "y": 363
    },
    {
      "id": "rr-05-evidence-9",
      "from": "rr-evidence-run",
      "to": "rr-evidence-state",
      "label": "Count attempted calls missing an estimate",
      "y": 392
    },
    {
      "id": "rr-05-evidence-10",
      "from": "rr-evidence-run",
      "to": "rr-evidence-entry",
      "label": "Return one result dictionary",
      "y": 421,
      "variant": "return"
    },
    {
      "id": "rr-05-evidence-11",
      "from": "rr-evidence-entry",
      "to": "rr-evidence-files",
      "label": "Write result.json; escape text into report.html",
      "y": 450
    },
    {
      "id": "rr-05-evidence-12",
      "from": "rr-evidence-entry",
      "to": "rr-evidence-files",
      "label": "report command can render saved JSON only",
      "y": 479
    }
  ],
  "cards": [
    {
      "dot": "amber",
      "title": "Unknown cost is not zero",
      "items": [
        "Missing usage/rates, positive unpriced cached input, positive cache writes, or inconsistent counts leave cost unavailable. Zero cache counts are allowed."
      ]
    },
    {
      "dot": "cyan",
      "title": "What remains recoverable",
      "items": [
        "Call text, returned usage, captured outputs and valid decisions remain in failed-run evidence. If the core raises, its partial ladder is not returned; no intermediate ranking is invented."
      ]
    }
  ]
}
