{
  "$comment": "Generated by scripts/build-coverage-report.mjs from a real run of the backend suite. Do not edit: scripts/build-coverage-report.mjs check re-derives the gates, the badge, the log digest and the source digest, and fails the build on any disagreement.",
  "generatedAt": "2026-08-06T00:33:14.265Z",
  "runner": "node v22.22.0 --test --experimental-test-coverage",
  "command": "npm --prefix backend run test:coverage",
  "commandDefinition": "node --test --experimental-test-module-mocks --experimental-test-coverage --test-coverage-exclude=\"test/**\" --test-coverage-lines=90 --test-coverage-branches=80 --test-coverage-functions=90 --import tsx test/cpq-engine.test.ts test/error-handler.test.ts test/webhook-dispatcher.test.ts test/route-manifest.test.ts test/api-integration.test.ts test/integrations.test.ts test/adapters.test.ts",
  "modules": [
    "cpq-engine.test.ts",
    "error-handler.test.ts",
    "webhook-dispatcher.test.ts",
    "route-manifest.test.ts",
    "api-integration.test.ts",
    "integrations.test.ts",
    "adapters.test.ts"
  ],
  "gates": {
    "lines": 90,
    "branches": 80,
    "functions": 90
  },
  "achieved": {
    "lines": 97.96,
    "branches": 87.87,
    "functions": 94.4
  },
  "counts": {
    "tests": 409,
    "suites": 50,
    "pass": 409,
    "fail": 0,
    "cancelled": 0,
    "skipped": 0,
    "todo": 0,
    "durationMs": 9103
  },
  "source": {
    "digest": "48bd6a881dcb7ce9048f3c3edfbe43e0db4962a62fab3729eb5dc36f3772ca10",
    "fileCount": 66,
    "describes": "backend/src, backend/test and backend/package.json at the moment of the run"
  },
  "log": {
    "path": "/test-run.txt",
    "bytes": 93256,
    "lines": 2892,
    "sha256": "76d17f633a80abb34346033172f4dcab5191bb5ce4efe27840f1fc8693d7cdc9"
  },
  "badge": {
    "path": "/coverage.svg",
    "shows": "lines"
  },
  "files": [
    {
      "path": "src/app.ts",
      "kind": "file",
      "lines": 99.32,
      "branches": 92.31,
      "functions": 85.71,
      "uncoveredLines": "38"
    },
    {
      "path": "src/config/env.ts",
      "kind": "file",
      "lines": 94.41,
      "branches": 57.14,
      "functions": 60,
      "uncoveredLines": "41-45 49-51 55"
    },
    {
      "path": "src/controllers/auth.controller.ts",
      "kind": "file",
      "lines": 99.35,
      "branches": 92.31,
      "functions": 80,
      "uncoveredLines": "36"
    },
    {
      "path": "src/controllers/integrations.controller.ts",
      "kind": "file",
      "lines": 93.79,
      "branches": 80.21,
      "functions": 100,
      "uncoveredLines": "46-48 55-56 85-91 93-106 116-117 157-160 163"
    },
    {
      "path": "src/controllers/quotes.controller.ts",
      "kind": "file",
      "lines": 93.07,
      "branches": 76.32,
      "functions": 89.66,
      "uncoveredLines": "108-113 135 137-152 154-162 166-170 177-178 180-197 202-203 218 225-228 324-327"
    },
    {
      "path": "src/controllers/work-orders.controller.ts",
      "kind": "file",
      "lines": 99.66,
      "branches": 94.44,
      "functions": 88.89,
      "uncoveredLines": "55"
    },
    {
      "path": "src/db/tenant.ts",
      "kind": "file",
      "lines": 97.44,
      "branches": 77.78,
      "functions": 100,
      "uncoveredLines": "9-11"
    },
    {
      "path": "src/integrations/connection-store.ts",
      "kind": "file",
      "lines": 100,
      "branches": 100,
      "functions": 100,
      "uncoveredLines": ""
    },
    {
      "path": "src/integrations/crypto.ts",
      "kind": "file",
      "lines": 97.75,
      "branches": 88,
      "functions": 77.78,
      "uncoveredLines": "13-14 17-18"
    },
    {
      "path": "src/integrations/fan-out.ts",
      "kind": "file",
      "lines": 87.83,
      "branches": 90,
      "functions": 75,
      "uncoveredLines": "20-33"
    },
    {
      "path": "src/integrations/http.ts",
      "kind": "file",
      "lines": 100,
      "branches": 97.37,
      "functions": 100,
      "uncoveredLines": ""
    },
    {
      "path": "src/integrations/oauth-state.ts",
      "kind": "file",
      "lines": 98.15,
      "branches": 95.24,
      "functions": 100,
      "uncoveredLines": "38-39"
    },
    {
      "path": "src/integrations/quickbooks/adapter.ts",
      "kind": "file",
      "lines": 96.99,
      "branches": 86.36,
      "functions": 100,
      "uncoveredLines": "161-162 168-170 174-179"
    },
    {
      "path": "src/integrations/quickbooks/oauth.ts",
      "kind": "file",
      "lines": 100,
      "branches": 71.43,
      "functions": 100,
      "uncoveredLines": ""
    },
    {
      "path": "src/integrations/registry.ts",
      "kind": "file",
      "lines": 90.11,
      "branches": 90,
      "functions": 75,
      "uncoveredLines": "11 28-35"
    },
    {
      "path": "src/integrations/salesforce/adapter.ts",
      "kind": "file",
      "lines": 98.86,
      "branches": 85.71,
      "functions": 100,
      "uncoveredLines": "104 112 132"
    },
    {
      "path": "src/integrations/salesforce/oauth.ts",
      "kind": "file",
      "lines": 100,
      "branches": 63.16,
      "functions": 100,
      "uncoveredLines": ""
    },
    {
      "path": "src/integrations/stripe/adapter.ts",
      "kind": "file",
      "lines": 99.71,
      "branches": 92.5,
      "functions": 100,
      "uncoveredLines": "78"
    },
    {
      "path": "src/integrations/stripe/checkout.ts",
      "kind": "file",
      "lines": 99.72,
      "branches": 83.78,
      "functions": 94.74,
      "uncoveredLines": "21"
    },
    {
      "path": "src/integrations/stripe/invoice.ts",
      "kind": "file",
      "lines": 100,
      "branches": 91.67,
      "functions": 100,
      "uncoveredLines": ""
    },
    {
      "path": "src/integrations/stripe/signature.ts",
      "kind": "file",
      "lines": 100,
      "branches": 89.66,
      "functions": 100,
      "uncoveredLines": ""
    },
    {
      "path": "src/integrations/sync-store.ts",
      "kind": "file",
      "lines": 100,
      "branches": 100,
      "functions": 100,
      "uncoveredLines": ""
    },
    {
      "path": "src/integrations/tax.ts",
      "kind": "file",
      "lines": 96.25,
      "branches": 60,
      "functions": 66.67,
      "uncoveredLines": "8 12-13"
    },
    {
      "path": "src/integrations/types.ts",
      "kind": "file",
      "lines": 100,
      "branches": 100,
      "functions": 100,
      "uncoveredLines": ""
    },
    {
      "path": "src/lib/build-info.ts",
      "kind": "file",
      "lines": 100,
      "branches": 75,
      "functions": 100,
      "uncoveredLines": ""
    },
    {
      "path": "src/lib/errors.ts",
      "kind": "file",
      "lines": 100,
      "branches": 100,
      "functions": 100,
      "uncoveredLines": ""
    },
    {
      "path": "src/lib/jwt.ts",
      "kind": "file",
      "lines": 97.17,
      "branches": 87.5,
      "functions": 100,
      "uncoveredLines": "31-33"
    },
    {
      "path": "src/lib/logger.ts",
      "kind": "file",
      "lines": 100,
      "branches": 50,
      "functions": 100,
      "uncoveredLines": ""
    },
    {
      "path": "src/lib/password.ts",
      "kind": "file",
      "lines": 100,
      "branches": 83.33,
      "functions": 100,
      "uncoveredLines": ""
    },
    {
      "path": "src/middlewares/error-handler.ts",
      "kind": "file",
      "lines": 100,
      "branches": 93.1,
      "functions": 100,
      "uncoveredLines": ""
    },
    {
      "path": "src/middlewares/require-auth.ts",
      "kind": "file",
      "lines": 97.96,
      "branches": 94.12,
      "functions": 100,
      "uncoveredLines": "29-30"
    },
    {
      "path": "src/middlewares/require-role.ts",
      "kind": "file",
      "lines": 100,
      "branches": 100,
      "functions": 100,
      "uncoveredLines": ""
    },
    {
      "path": "src/middlewares/validate.ts",
      "kind": "file",
      "lines": 100,
      "branches": 100,
      "functions": 100,
      "uncoveredLines": ""
    },
    {
      "path": "src/models/sku.repository.ts",
      "kind": "file",
      "lines": 93.81,
      "branches": 90.91,
      "functions": 83.33,
      "uncoveredLines": "23-28"
    },
    {
      "path": "src/routes/auth.routes.ts",
      "kind": "file",
      "lines": 100,
      "branches": 80,
      "functions": 100,
      "uncoveredLines": ""
    },
    {
      "path": "src/routes/index.ts",
      "kind": "file",
      "lines": 98.92,
      "branches": 92.31,
      "functions": 87.5,
      "uncoveredLines": "36 53"
    },
    {
      "path": "src/routes/integrations.routes.ts",
      "kind": "file",
      "lines": 100,
      "branches": 100,
      "functions": 100,
      "uncoveredLines": ""
    },
    {
      "path": "src/routes/manifest.ts",
      "kind": "file",
      "lines": 100,
      "branches": 96.97,
      "functions": 100,
      "uncoveredLines": ""
    },
    {
      "path": "src/routes/quotes.routes.ts",
      "kind": "file",
      "lines": 100,
      "branches": 100,
      "functions": 100,
      "uncoveredLines": ""
    },
    {
      "path": "src/routes/work-orders.routes.ts",
      "kind": "file",
      "lines": 100,
      "branches": 100,
      "functions": 100,
      "uncoveredLines": ""
    },
    {
      "path": "src/schemas/auth.schema.ts",
      "kind": "file",
      "lines": 100,
      "branches": 100,
      "functions": 100,
      "uncoveredLines": ""
    },
    {
      "path": "src/schemas/common.schema.ts",
      "kind": "file",
      "lines": 100,
      "branches": 100,
      "functions": 100,
      "uncoveredLines": ""
    },
    {
      "path": "src/schemas/integrations.schema.ts",
      "kind": "file",
      "lines": 100,
      "branches": 100,
      "functions": 100,
      "uncoveredLines": ""
    },
    {
      "path": "src/schemas/quotes.schema.ts",
      "kind": "file",
      "lines": 100,
      "branches": 100,
      "functions": 100,
      "uncoveredLines": ""
    },
    {
      "path": "src/schemas/work-orders.schema.ts",
      "kind": "file",
      "lines": 100,
      "branches": 100,
      "functions": 100,
      "uncoveredLines": ""
    },
    {
      "path": "src/services/cpq-engine.ts",
      "kind": "file",
      "lines": 99.27,
      "branches": 93.18,
      "functions": 100,
      "uncoveredLines": "44-47"
    },
    {
      "path": "src/services/money.ts",
      "kind": "file",
      "lines": 97.73,
      "branches": 87.5,
      "functions": 85.71,
      "uncoveredLines": "11-12"
    },
    {
      "path": "src/services/webhook-dispatcher.ts",
      "kind": "file",
      "lines": 98.63,
      "branches": 89.41,
      "functions": 95.65,
      "uncoveredLines": "29-31 98-101"
    }
  ]
}
