{
  "project": "beauty",
  "implementation_fingerprint": "179d1c06719e61b286a1d8a367c4988f9f7b7e5d017a543d1efef32ce1d4fc12",
  "passed": true,
  "environment": {
    "python": "3.12.14",
    "backend": "SQLite",
    "cloud_verified": false
  },
  "method": "Ten sequential fresh-workspace runs per case. Timing includes workspace creation and scenario execution; nearest-rank p95 is the maximum of ten. Local synthetic measurement only.",
  "scenarios": [
    {
      "scenario": "reconciliation",
      "runs": 10,
      "passed": true,
      "p50_ms": 6.142,
      "p95_ms": 7.118,
      "output": {
        "scenario": "clean",
        "publish_version": 1,
        "source_hash": "e6755df59326966fbebc919b5513718c4e132d88edc117de20628d32c602148c",
        "quality": [],
        "bronze_batches": 1,
        "trace": {
          "request_id": "7b5a56b425884b89b2ab8509faf48b96",
          "stages": [
            {
              "component": "bronze",
              "label": "Receive SAP-shaped synthetic batch",
              "duration_ms": 0.488
            },
            {
              "component": "quality",
              "label": "Validate keys, currency and ledger reconciliation",
              "duration_ms": 0.483
            },
            {
              "component": "gold",
              "label": "Publish reconciled Silver and Gold snapshot atomically",
              "duration_ms": 0.943
            }
          ],
          "total_ms": 2.517
        },
        "run_id": "cd791bb4c35f411a921dd7c3c205bbc2",
        "revision": 2,
        "role": "finance",
        "markets": [
          "US",
          "GB",
          "CA"
        ],
        "metrics": [
          {
            "metric": "net_revenue",
            "value": 29757.01,
            "unit": "USD",
            "definition": "Net invoiced sales after returns and discounts",
            "markets": [
              "US",
              "GB",
              "CA"
            ],
            "rows": 120,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT SUM(net_cents) AS value,COUNT(*) AS rows FROM rgm WHERE market IN (?,?,?)",
            "parameters": [
              "US",
              "GB",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          },
          {
            "metric": "margin_pct",
            "value": 53.043,
            "unit": "%",
            "definition": "100 \u00d7 total profit / total net revenue",
            "markets": [
              "US",
              "GB",
              "CA"
            ],
            "rows": 120,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT 100.0*SUM(profit_cents)/NULLIF(SUM(net_cents),0) AS value,COUNT(*) AS rows FROM rgm WHERE market IN (?,?,?)",
            "parameters": [
              "US",
              "GB",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          },
          {
            "metric": "discount_pct",
            "value": 6.2093,
            "unit": "%",
            "definition": "100 \u00d7 total discounts / gross sales after returns",
            "markets": [
              "US",
              "GB",
              "CA"
            ],
            "rows": 120,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT 100.0*SUM(discount_cents)/NULLIF(SUM(gross_cents),0) AS value,COUNT(*) AS rows FROM rgm WHERE market IN (?,?,?)",
            "parameters": [
              "US",
              "GB",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          },
          {
            "metric": "cash_collected",
            "value": 14941.68,
            "unit": "USD",
            "definition": "Actual receipts applied to invoices as of the demo clock",
            "markets": [
              "US",
              "GB",
              "CA"
            ],
            "rows": 60,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT SUM(paid_cents) AS value,COUNT(*) AS rows FROM cashflow WHERE market IN (?,?,?)",
            "parameters": [
              "US",
              "GB",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          },
          {
            "metric": "receivables",
            "value": 14815.33,
            "unit": "USD",
            "definition": "Invoice balance minus applied receipts",
            "markets": [
              "US",
              "GB",
              "CA"
            ],
            "rows": 60,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT SUM(outstanding_cents) AS value,COUNT(*) AS rows FROM cashflow WHERE market IN (?,?,?)",
            "parameters": [
              "US",
              "GB",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          },
          {
            "metric": "overdue",
            "value": 5995.37,
            "unit": "USD",
            "definition": "Outstanding balances with due date before the demo clock",
            "markets": [
              "US",
              "GB",
              "CA"
            ],
            "rows": 60,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT SUM(overdue_cents) AS value,COUNT(*) AS rows FROM cashflow WHERE market IN (?,?,?)",
            "parameters": [
              "US",
              "GB",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          }
        ],
        "synthetic": true,
        "as_of": "2026-10-12",
        "counts": {
          "invoice_lines": 120,
          "invoices": 60,
          "documents": 4
        },
        "retrieval_mode": "Local lexical count vectors; cloud semantic embeddings are a reference"
      }
    },
    {
      "scenario": "ratios",
      "runs": 10,
      "passed": true,
      "p50_ms": 5.683,
      "p95_ms": 6.608,
      "output": {
        "scenario": "clean",
        "publish_version": 1,
        "source_hash": "e6755df59326966fbebc919b5513718c4e132d88edc117de20628d32c602148c",
        "quality": [],
        "bronze_batches": 1,
        "trace": {
          "request_id": "e2f9554cd8cb413e8a5949d3a92c93c8",
          "stages": [
            {
              "component": "bronze",
              "label": "Receive SAP-shaped synthetic batch",
              "duration_ms": 0.426
            },
            {
              "component": "quality",
              "label": "Validate keys, currency and ledger reconciliation",
              "duration_ms": 0.419
            },
            {
              "component": "gold",
              "label": "Publish reconciled Silver and Gold snapshot atomically",
              "duration_ms": 0.781
            }
          ],
          "total_ms": 2.267
        },
        "run_id": "e1936214d36947bfa7788c803984c980",
        "revision": 2,
        "role": "finance",
        "markets": [
          "US",
          "GB",
          "CA"
        ],
        "metrics": [
          {
            "metric": "net_revenue",
            "value": 29757.01,
            "unit": "USD",
            "definition": "Net invoiced sales after returns and discounts",
            "markets": [
              "US",
              "GB",
              "CA"
            ],
            "rows": 120,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT SUM(net_cents) AS value,COUNT(*) AS rows FROM rgm WHERE market IN (?,?,?)",
            "parameters": [
              "US",
              "GB",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          },
          {
            "metric": "margin_pct",
            "value": 53.043,
            "unit": "%",
            "definition": "100 \u00d7 total profit / total net revenue",
            "markets": [
              "US",
              "GB",
              "CA"
            ],
            "rows": 120,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT 100.0*SUM(profit_cents)/NULLIF(SUM(net_cents),0) AS value,COUNT(*) AS rows FROM rgm WHERE market IN (?,?,?)",
            "parameters": [
              "US",
              "GB",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          },
          {
            "metric": "discount_pct",
            "value": 6.2093,
            "unit": "%",
            "definition": "100 \u00d7 total discounts / gross sales after returns",
            "markets": [
              "US",
              "GB",
              "CA"
            ],
            "rows": 120,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT 100.0*SUM(discount_cents)/NULLIF(SUM(gross_cents),0) AS value,COUNT(*) AS rows FROM rgm WHERE market IN (?,?,?)",
            "parameters": [
              "US",
              "GB",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          },
          {
            "metric": "cash_collected",
            "value": 14941.68,
            "unit": "USD",
            "definition": "Actual receipts applied to invoices as of the demo clock",
            "markets": [
              "US",
              "GB",
              "CA"
            ],
            "rows": 60,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT SUM(paid_cents) AS value,COUNT(*) AS rows FROM cashflow WHERE market IN (?,?,?)",
            "parameters": [
              "US",
              "GB",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          },
          {
            "metric": "receivables",
            "value": 14815.33,
            "unit": "USD",
            "definition": "Invoice balance minus applied receipts",
            "markets": [
              "US",
              "GB",
              "CA"
            ],
            "rows": 60,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT SUM(outstanding_cents) AS value,COUNT(*) AS rows FROM cashflow WHERE market IN (?,?,?)",
            "parameters": [
              "US",
              "GB",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          },
          {
            "metric": "overdue",
            "value": 5995.37,
            "unit": "USD",
            "definition": "Outstanding balances with due date before the demo clock",
            "markets": [
              "US",
              "GB",
              "CA"
            ],
            "rows": 60,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT SUM(overdue_cents) AS value,COUNT(*) AS rows FROM cashflow WHERE market IN (?,?,?)",
            "parameters": [
              "US",
              "GB",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          }
        ],
        "synthetic": true,
        "as_of": "2026-10-12",
        "counts": {
          "invoice_lines": 120,
          "invoices": 60,
          "documents": 4
        },
        "retrieval_mode": "Local lexical count vectors; cloud semantic embeddings are a reference"
      }
    },
    {
      "scenario": "bad_batch",
      "runs": 10,
      "passed": true,
      "p50_ms": 7.601,
      "p95_ms": 8.618,
      "output": {
        "scenario": "bad_batch",
        "publish_version": 1,
        "source_hash": "e6755df59326966fbebc919b5513718c4e132d88edc117de20628d32c602148c",
        "quality": [
          "Invoice/line reconciliation failed"
        ],
        "bronze_batches": 2,
        "trace": {
          "request_id": "c1250c3d83544aeea23aa5786e87714a",
          "stages": [
            {
              "component": "bronze",
              "label": "Receive SAP-shaped synthetic batch",
              "duration_ms": 0.423
            },
            {
              "component": "quality",
              "label": "Validate keys, currency and ledger reconciliation",
              "duration_ms": 0.42
            }
          ],
          "total_ms": 1.315
        },
        "run_id": "bbc92c6330a7448c91379c387e5d8816",
        "revision": 3,
        "role": "finance",
        "markets": [
          "US",
          "GB",
          "CA"
        ],
        "metrics": [
          {
            "metric": "net_revenue",
            "value": 29757.01,
            "unit": "USD",
            "definition": "Net invoiced sales after returns and discounts",
            "markets": [
              "US",
              "GB",
              "CA"
            ],
            "rows": 120,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT SUM(net_cents) AS value,COUNT(*) AS rows FROM rgm WHERE market IN (?,?,?)",
            "parameters": [
              "US",
              "GB",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          },
          {
            "metric": "margin_pct",
            "value": 53.043,
            "unit": "%",
            "definition": "100 \u00d7 total profit / total net revenue",
            "markets": [
              "US",
              "GB",
              "CA"
            ],
            "rows": 120,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT 100.0*SUM(profit_cents)/NULLIF(SUM(net_cents),0) AS value,COUNT(*) AS rows FROM rgm WHERE market IN (?,?,?)",
            "parameters": [
              "US",
              "GB",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          },
          {
            "metric": "discount_pct",
            "value": 6.2093,
            "unit": "%",
            "definition": "100 \u00d7 total discounts / gross sales after returns",
            "markets": [
              "US",
              "GB",
              "CA"
            ],
            "rows": 120,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT 100.0*SUM(discount_cents)/NULLIF(SUM(gross_cents),0) AS value,COUNT(*) AS rows FROM rgm WHERE market IN (?,?,?)",
            "parameters": [
              "US",
              "GB",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          },
          {
            "metric": "cash_collected",
            "value": 14941.68,
            "unit": "USD",
            "definition": "Actual receipts applied to invoices as of the demo clock",
            "markets": [
              "US",
              "GB",
              "CA"
            ],
            "rows": 60,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT SUM(paid_cents) AS value,COUNT(*) AS rows FROM cashflow WHERE market IN (?,?,?)",
            "parameters": [
              "US",
              "GB",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          },
          {
            "metric": "receivables",
            "value": 14815.33,
            "unit": "USD",
            "definition": "Invoice balance minus applied receipts",
            "markets": [
              "US",
              "GB",
              "CA"
            ],
            "rows": 60,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT SUM(outstanding_cents) AS value,COUNT(*) AS rows FROM cashflow WHERE market IN (?,?,?)",
            "parameters": [
              "US",
              "GB",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          },
          {
            "metric": "overdue",
            "value": 5995.37,
            "unit": "USD",
            "definition": "Outstanding balances with due date before the demo clock",
            "markets": [
              "US",
              "GB",
              "CA"
            ],
            "rows": 60,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT SUM(overdue_cents) AS value,COUNT(*) AS rows FROM cashflow WHERE market IN (?,?,?)",
            "parameters": [
              "US",
              "GB",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          }
        ],
        "synthetic": true,
        "as_of": "2026-10-12",
        "counts": {
          "invoice_lines": 120,
          "invoices": 60,
          "documents": 4
        },
        "retrieval_mode": "Local lexical count vectors; cloud semantic embeddings are a reference"
      }
    },
    {
      "scenario": "duplicate",
      "runs": 10,
      "passed": true,
      "p50_ms": 7.114,
      "p95_ms": 8.251,
      "output": {
        "scenario": "duplicate",
        "publish_version": 1,
        "source_hash": "e6755df59326966fbebc919b5513718c4e132d88edc117de20628d32c602148c",
        "quality": [
          "Duplicate lines key",
          "Invoice/line reconciliation failed"
        ],
        "bronze_batches": 2,
        "trace": {
          "request_id": "0ff126965bea4b4ea3df6b4f64462593",
          "stages": [
            {
              "component": "bronze",
              "label": "Receive SAP-shaped synthetic batch",
              "duration_ms": 0.473
            },
            {
              "component": "quality",
              "label": "Validate keys, currency and ledger reconciliation",
              "duration_ms": 0.421
            }
          ],
          "total_ms": 1.384
        },
        "run_id": "d4dd7be7948943d8a7e8a9675b22a065",
        "revision": 3,
        "role": "finance",
        "markets": [
          "US",
          "GB",
          "CA"
        ],
        "metrics": [
          {
            "metric": "net_revenue",
            "value": 29757.01,
            "unit": "USD",
            "definition": "Net invoiced sales after returns and discounts",
            "markets": [
              "US",
              "GB",
              "CA"
            ],
            "rows": 120,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT SUM(net_cents) AS value,COUNT(*) AS rows FROM rgm WHERE market IN (?,?,?)",
            "parameters": [
              "US",
              "GB",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          },
          {
            "metric": "margin_pct",
            "value": 53.043,
            "unit": "%",
            "definition": "100 \u00d7 total profit / total net revenue",
            "markets": [
              "US",
              "GB",
              "CA"
            ],
            "rows": 120,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT 100.0*SUM(profit_cents)/NULLIF(SUM(net_cents),0) AS value,COUNT(*) AS rows FROM rgm WHERE market IN (?,?,?)",
            "parameters": [
              "US",
              "GB",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          },
          {
            "metric": "discount_pct",
            "value": 6.2093,
            "unit": "%",
            "definition": "100 \u00d7 total discounts / gross sales after returns",
            "markets": [
              "US",
              "GB",
              "CA"
            ],
            "rows": 120,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT 100.0*SUM(discount_cents)/NULLIF(SUM(gross_cents),0) AS value,COUNT(*) AS rows FROM rgm WHERE market IN (?,?,?)",
            "parameters": [
              "US",
              "GB",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          },
          {
            "metric": "cash_collected",
            "value": 14941.68,
            "unit": "USD",
            "definition": "Actual receipts applied to invoices as of the demo clock",
            "markets": [
              "US",
              "GB",
              "CA"
            ],
            "rows": 60,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT SUM(paid_cents) AS value,COUNT(*) AS rows FROM cashflow WHERE market IN (?,?,?)",
            "parameters": [
              "US",
              "GB",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          },
          {
            "metric": "receivables",
            "value": 14815.33,
            "unit": "USD",
            "definition": "Invoice balance minus applied receipts",
            "markets": [
              "US",
              "GB",
              "CA"
            ],
            "rows": 60,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT SUM(outstanding_cents) AS value,COUNT(*) AS rows FROM cashflow WHERE market IN (?,?,?)",
            "parameters": [
              "US",
              "GB",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          },
          {
            "metric": "overdue",
            "value": 5995.37,
            "unit": "USD",
            "definition": "Outstanding balances with due date before the demo clock",
            "markets": [
              "US",
              "GB",
              "CA"
            ],
            "rows": 60,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT SUM(overdue_cents) AS value,COUNT(*) AS rows FROM cashflow WHERE market IN (?,?,?)",
            "parameters": [
              "US",
              "GB",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          }
        ],
        "synthetic": true,
        "as_of": "2026-10-12",
        "counts": {
          "invoice_lines": 120,
          "invoices": 60,
          "documents": 4
        },
        "retrieval_mode": "Local lexical count vectors; cloud semantic embeddings are a reference"
      }
    },
    {
      "scenario": "currency",
      "runs": 10,
      "passed": true,
      "p50_ms": 7.27,
      "p95_ms": 7.571,
      "output": {
        "scenario": "currency",
        "publish_version": 1,
        "source_hash": "e6755df59326966fbebc919b5513718c4e132d88edc117de20628d32c602148c",
        "quality": [
          "Currency contract requires USD; no implicit FX conversion"
        ],
        "bronze_batches": 2,
        "trace": {
          "request_id": "52b3b074209b4330927660149cfa05b5",
          "stages": [
            {
              "component": "bronze",
              "label": "Receive SAP-shaped synthetic batch",
              "duration_ms": 0.479
            },
            {
              "component": "quality",
              "label": "Validate keys, currency and ledger reconciliation",
              "duration_ms": 0.447
            }
          ],
          "total_ms": 1.524
        },
        "run_id": "ea5c481385fb457ab80c4d3e6516ae1a",
        "revision": 3,
        "role": "finance",
        "markets": [
          "US",
          "GB",
          "CA"
        ],
        "metrics": [
          {
            "metric": "net_revenue",
            "value": 29757.01,
            "unit": "USD",
            "definition": "Net invoiced sales after returns and discounts",
            "markets": [
              "US",
              "GB",
              "CA"
            ],
            "rows": 120,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT SUM(net_cents) AS value,COUNT(*) AS rows FROM rgm WHERE market IN (?,?,?)",
            "parameters": [
              "US",
              "GB",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          },
          {
            "metric": "margin_pct",
            "value": 53.043,
            "unit": "%",
            "definition": "100 \u00d7 total profit / total net revenue",
            "markets": [
              "US",
              "GB",
              "CA"
            ],
            "rows": 120,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT 100.0*SUM(profit_cents)/NULLIF(SUM(net_cents),0) AS value,COUNT(*) AS rows FROM rgm WHERE market IN (?,?,?)",
            "parameters": [
              "US",
              "GB",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          },
          {
            "metric": "discount_pct",
            "value": 6.2093,
            "unit": "%",
            "definition": "100 \u00d7 total discounts / gross sales after returns",
            "markets": [
              "US",
              "GB",
              "CA"
            ],
            "rows": 120,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT 100.0*SUM(discount_cents)/NULLIF(SUM(gross_cents),0) AS value,COUNT(*) AS rows FROM rgm WHERE market IN (?,?,?)",
            "parameters": [
              "US",
              "GB",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          },
          {
            "metric": "cash_collected",
            "value": 14941.68,
            "unit": "USD",
            "definition": "Actual receipts applied to invoices as of the demo clock",
            "markets": [
              "US",
              "GB",
              "CA"
            ],
            "rows": 60,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT SUM(paid_cents) AS value,COUNT(*) AS rows FROM cashflow WHERE market IN (?,?,?)",
            "parameters": [
              "US",
              "GB",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          },
          {
            "metric": "receivables",
            "value": 14815.33,
            "unit": "USD",
            "definition": "Invoice balance minus applied receipts",
            "markets": [
              "US",
              "GB",
              "CA"
            ],
            "rows": 60,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT SUM(outstanding_cents) AS value,COUNT(*) AS rows FROM cashflow WHERE market IN (?,?,?)",
            "parameters": [
              "US",
              "GB",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          },
          {
            "metric": "overdue",
            "value": 5995.37,
            "unit": "USD",
            "definition": "Outstanding balances with due date before the demo clock",
            "markets": [
              "US",
              "GB",
              "CA"
            ],
            "rows": 60,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT SUM(overdue_cents) AS value,COUNT(*) AS rows FROM cashflow WHERE market IN (?,?,?)",
            "parameters": [
              "US",
              "GB",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          }
        ],
        "synthetic": true,
        "as_of": "2026-10-12",
        "counts": {
          "invoice_lines": 120,
          "invoices": 60,
          "documents": 4
        },
        "retrieval_mode": "Local lexical count vectors; cloud semantic embeddings are a reference"
      }
    },
    {
      "scenario": "authorization",
      "runs": 10,
      "passed": true,
      "p50_ms": 5.271,
      "p95_ms": 7.81,
      "output": {
        "scenario": "clean",
        "publish_version": 1,
        "source_hash": "e6755df59326966fbebc919b5513718c4e132d88edc117de20628d32c602148c",
        "quality": [],
        "bronze_batches": 1,
        "trace": {
          "request_id": "9b5bbd0c26e84950b23e22d08e3c1d1d",
          "stages": [
            {
              "component": "bronze",
              "label": "Receive SAP-shaped synthetic batch",
              "duration_ms": 0.501
            },
            {
              "component": "quality",
              "label": "Validate keys, currency and ledger reconciliation",
              "duration_ms": 0.463
            },
            {
              "component": "gold",
              "label": "Publish reconciled Silver and Gold snapshot atomically",
              "duration_ms": 0.849
            }
          ],
          "total_ms": 2.427
        },
        "run_id": "951074d927044e8689cd935cd25f9786",
        "revision": 2,
        "role": "commercial",
        "markets": [
          "US",
          "CA"
        ],
        "metrics": [
          {
            "metric": "net_revenue",
            "value": 20013.1,
            "unit": "USD",
            "definition": "Net invoiced sales after returns and discounts",
            "markets": [
              "US",
              "CA"
            ],
            "rows": 80,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT SUM(net_cents) AS value,COUNT(*) AS rows FROM rgm WHERE market IN (?,?)",
            "parameters": [
              "US",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          },
          {
            "metric": "margin_pct",
            "value": 52.9558,
            "unit": "%",
            "definition": "100 \u00d7 total profit / total net revenue",
            "markets": [
              "US",
              "CA"
            ],
            "rows": 80,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT 100.0*SUM(profit_cents)/NULLIF(SUM(net_cents),0) AS value,COUNT(*) AS rows FROM rgm WHERE market IN (?,?)",
            "parameters": [
              "US",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          },
          {
            "metric": "discount_pct",
            "value": 6.4094,
            "unit": "%",
            "definition": "100 \u00d7 total discounts / gross sales after returns",
            "markets": [
              "US",
              "CA"
            ],
            "rows": 80,
            "publish_version": 1,
            "semantic_version": "metrics-1.0",
            "sql": "SELECT 100.0*SUM(discount_cents)/NULLIF(SUM(gross_cents),0) AS value,COUNT(*) AS rows FROM rgm WHERE market IN (?,?)",
            "parameters": [
              "US",
              "CA"
            ],
            "currency": "USD",
            "as_of": "2026-10-12"
          }
        ],
        "synthetic": true,
        "as_of": "2026-10-12",
        "counts": {
          "invoice_lines": 120,
          "invoices": 60,
          "documents": 4
        },
        "retrieval_mode": "Local lexical count vectors; cloud semantic embeddings are a reference"
      }
    },
    {
      "scenario": "retrieval_acl",
      "runs": 10,
      "passed": true,
      "p50_ms": 5.393,
      "p95_ms": 7.452,
      "output": {
        "answer": "Promotion evaluation compares net revenue after returns and discounts with product cost. Margin is a ratio of aggregate profit to aggregate revenue. Discount efficiency must be reviewed with returns and net units.",
        "evidence": null,
        "citations": [
          {
            "document_id": "D01",
            "chunk_id": "D01-01",
            "title": "Promotion evaluation",
            "text": "Promotion evaluation compares net revenue after returns and discounts with product cost. Margin is a ratio of aggregate profit to aggregate revenue. Discount efficiency must be reviewed with returns and net units.",
            "similarity": 0.0925
          }
        ],
        "trace": {
          "request_id": "2d981d5cf49b4c64b9632c5c460aab7a",
          "stages": [
            {
              "component": "tools",
              "label": "Authorize identity and resolve allowlisted tool",
              "duration_ms": 0.017
            },
            {
              "component": "metrics",
              "label": "Calculate a governed metric using parameterized SQL",
              "duration_ms": 0.0
            },
            {
              "component": "index",
              "label": "Filter document permissions before lexical-vector scoring",
              "duration_ms": 0.034
            },
            {
              "component": "agent",
              "label": "Render a factual answer from authorized evidence",
              "duration_ms": 0.0
            }
          ],
          "total_ms": 0.064
        },
        "mode": "Deterministic tool router and factual templates; no local LLM"
      }
    },
    {
      "scenario": "clarification",
      "runs": 10,
      "passed": true,
      "p50_ms": 5.172,
      "p95_ms": 7.344,
      "output": {
        "clarification": "Choose one supported aggregate metric and market. Time/grouping/currency conversions are not implemented; results use USD/% at the displayed as-of date.",
        "evidence": null,
        "citations": [],
        "trace": {
          "request_id": "ea8460b5cf284d899b9aea0ce979c36a",
          "stages": [
            {
              "component": "tools",
              "label": "Authorize identity and resolve allowlisted tool",
              "duration_ms": 0.019
            }
          ],
          "total_ms": 0.028
        }
      }
    }
  ]
}
