{
 "product": "SPEND GOVERNOR",
 "slug": "spend-governor",
 "base": "https://cainstudio.online",
 "page": "https://cainstudio.online/top25-spend-governor.html",
 "claims": [
  {
   "id": "C01",
   "kind": "control",
   "claim": "Small charge inside the budget -> Normal spend goes through.",
   "requests": [
    {
     "method": "POST",
     "url": "/governor-keystone/session",
     "body": {}
    },
    {
     "method": "POST",
     "url": "/governor-keystone/charge",
     "body": {
      "ns": "${0.ns}",
      "agent": "research-bot",
      "cents": 25,
      "tool": "llm.call"
     }
    }
   ],
   "path": "decision",
   "expect": [
    "ALLOW"
   ]
  },
  {
   "id": "C02",
   "kind": "attack",
   "claim": "Charge more than the agent has left -> No overspend, ever.",
   "requests": [
    {
     "method": "POST",
     "url": "/governor-keystone/session",
     "body": {}
    },
    {
     "method": "POST",
     "url": "/governor-keystone/charge",
     "body": {
      "ns": "${0.ns}",
      "agent": "research-bot",
      "cents": 999999,
      "tool": "llm.call"
     }
    }
   ],
   "path": "decision",
   "expect": [
    "DENY"
   ]
  },
  {
   "id": "C03",
   "kind": "attack",
   "claim": "Negative amount (refund yourself) -> Amounts must be > 0.",
   "requests": [
    {
     "method": "POST",
     "url": "/governor-keystone/session",
     "body": {}
    },
    {
     "method": "POST",
     "url": "/governor-keystone/charge",
     "body": {
      "ns": "${0.ns}",
      "agent": "research-bot",
      "cents": -500,
      "tool": "llm.call"
     }
    }
   ],
   "path": "decision",
   "expect": [
    "DENY"
   ]
  },
  {
   "id": "C04",
   "kind": "attack",
   "claim": "NaN amount -> NaN compares false with every limit.",
   "requests": [
    {
     "method": "POST",
     "url": "/governor-keystone/session",
     "body": {}
    },
    {
     "method": "POST",
     "url": "/governor-keystone/charge",
     "body": {
      "ns": "${0.ns}",
      "agent": "research-bot",
      "cents": "NaN",
      "tool": "llm.call"
     }
    }
   ],
   "path": "decision",
   "expect": [
    "DENY"
   ]
  },
  {
   "id": "C05",
   "kind": "attack",
   "claim": "Infinity -> Not a finite number.",
   "requests": [
    {
     "method": "POST",
     "url": "/governor-keystone/session",
     "body": {}
    },
    {
     "method": "POST",
     "url": "/governor-keystone/charge",
     "body": {
      "ns": "${0.ns}",
      "agent": "research-bot",
      "cents": "Infinity",
      "tool": "llm.call"
     }
    }
   ],
   "path": "decision",
   "expect": [
    "DENY"
   ]
  },
  {
   "id": "C06",
   "kind": "attack",
   "claim": "Amount as text '1e9' -> A huge number in disguise.",
   "requests": [
    {
     "method": "POST",
     "url": "/governor-keystone/session",
     "body": {}
    },
    {
     "method": "POST",
     "url": "/governor-keystone/charge",
     "body": {
      "ns": "${0.ns}",
      "agent": "research-bot",
      "cents": "1e9",
      "tool": "llm.call"
     }
    }
   ],
   "path": "decision",
   "expect": [
    "DENY"
   ]
  },
  {
   "id": "C07",
   "kind": "attack",
   "claim": "Unknown agent -> An agent with no budget has no budget.",
   "requests": [
    {
     "method": "POST",
     "url": "/governor-keystone/session",
     "body": {}
    },
    {
     "method": "POST",
     "url": "/governor-keystone/charge",
     "body": {
      "ns": "${0.ns}",
      "agent": "ghost-agent",
      "cents": 10,
      "tool": "llm.call"
     }
    }
   ],
   "path": "decision",
   "expect": [
    "DENY"
   ]
  },
  {
   "id": "C08",
   "kind": "attack",
   "claim": "Someone else's namespace -> A namespace you did not create is refused.",
   "requests": [
    {
     "method": "POST",
     "url": "/governor-keystone/charge",
     "body": {
      "ns": "demo_not-yours",
      "agent": "research-bot",
      "cents": 10
     }
    }
   ],
   "path": "",
   "expect": [],
   "expect_status": [
    400,
    403,
    404
   ]
  }
 ]
}