{
  "artifact_type": "controlled_offline_test",
  "executed_at": "2026-09-17T00:16:12.906Z",
  "source_commit": "71dd3628af0e67554b39afb943359204bae85980",
  "source_function": "evaluateSpend",
  "extracted_typescript_sha256": "d5a41da09d28836384d70727166963f8ea8e22ec7d0c67e6a2cafa2d45c1385d",
  "description": "Actual extracted spending-decision function executed with synthetic balances. This is not a live purchase, HTTP response, ledger transaction or real top-up.",
  "limitations": "The pure function returns only a decision. HTTP status, provider-call prevention, and ledger effects are covered separately by dispatcher tests.",
  "cases": [
    {
      "name": "empty_available_credit",
      "fixture": {
        "balanceCents": 0,
        "creditLineCents": 0,
        "withCardLineCents": 0,
        "priceCents": 1,
        "creditsUrl": "https://vaaya.ai/balance"
      },
      "result": {
        "ok": false,
        "code": "credits_required",
        "message": "You're out of credits. Buy a credit pack ($10 / $30 / $100) at https://vaaya.ai/balance to keep going.",
        "creditsUrl": "https://vaaya.ai/balance"
      },
      "assertion": "passed"
    },
    {
      "name": "after_synthetic_one_cent_funding",
      "fixture": {
        "balanceCents": 1,
        "creditLineCents": 0,
        "withCardLineCents": 0,
        "priceCents": 1,
        "creditsUrl": "https://vaaya.ai/balance"
      },
      "result": {
        "ok": true
      },
      "assertion": "passed"
    }
  ]
}
