{
  "status": "ok",
  "app": "SKRONVA API runtime foundation 017J",
  "phase": "017J",
  "contractVersion": "017J.1",
  "environment": "staging",
  "authMode": "local",
  "strictAuthReady": false,
  "dataStore": {
    "mode": "json-file-foundation",
    "path": ".skronva-runtime-data/runtime-state.json",
    "schemaLedger": ".skronva-runtime-data/database-schema-ledger.json",
    "schemaVersion": "017G.1",
    "tenants": 1,
    "users": 1,
    "auditEvents": 0
  },
  "database": {
    "phase": "017G",
    "schemaVersion": "017G.1",
    "mode": "json-file",
    "adapterStatus": "fallback-ready",
    "engine": "json-file-fallback",
    "serverDsnPresent": false,
    "strictAuthReady": false,
    "tables": [
      {
        "name": "skronva_tenants",
        "authority": "tenant",
        "primaryKey": "tenant_id",
        "preservesBaseline": true
      },
      {
        "name": "skronva_workspaces",
        "authority": "tenant",
        "primaryKey": "workspace_id",
        "preservesBaseline": true
      },
      {
        "name": "skronva_users",
        "authority": "identity",
        "primaryKey": "user_id",
        "preservesBaseline": true
      },
      {
        "name": "skronva_memberships",
        "authority": "identity",
        "primaryKey": "membership_id",
        "preservesBaseline": true
      },
      {
        "name": "skronva_projects",
        "authority": "project",
        "primaryKey": "project_id",
        "preservesBaseline": true
      },
      {
        "name": "skronva_project_baselines",
        "authority": "project-control",
        "primaryKey": "baseline_id",
        "preservesBaseline": true
      },
      {
        "name": "skronva_trial_usage",
        "authority": "commercial",
        "primaryKey": "usage_id",
        "preservesBaseline": true
      },
      {
        "name": "skronva_entitlement_snapshots",
        "authority": "commercial",
        "primaryKey": "entitlement_id",
        "preservesBaseline": true
      },
      {
        "name": "skronva_storage_reservations",
        "authority": "storage",
        "primaryKey": "reservation_id",
        "preservesBaseline": true
      },
      {
        "name": "skronva_ocr_jobs",
        "authority": "document-intake",
        "primaryKey": "ocr_job_id",
        "preservesBaseline": true
      },
      {
        "name": "skronva_audit_events",
        "authority": "audit",
        "primaryKey": "audit_id",
        "preservesBaseline": true
      }
    ],
    "migrations": [
      {
        "id": "017G_001_create_identity_tenant_schema",
        "order": 1,
        "blocking": true,
        "tables": [
          "skronva_tenants",
          "skronva_workspaces",
          "skronva_users",
          "skronva_memberships"
        ]
      },
      {
        "id": "017G_002_create_project_baseline_schema",
        "order": 2,
        "blocking": true,
        "tables": [
          "skronva_projects",
          "skronva_project_baselines"
        ]
      },
      {
        "id": "017G_003_create_trial_entitlement_schema",
        "order": 3,
        "blocking": true,
        "tables": [
          "skronva_trial_usage",
          "skronva_entitlement_snapshots"
        ]
      },
      {
        "id": "017G_004_create_storage_ocr_audit_schema",
        "order": 4,
        "blocking": true,
        "tables": [
          "skronva_storage_reservations",
          "skronva_ocr_jobs",
          "skronva_audit_events"
        ]
      }
    ],
    "baselinePolicy": "preserve-baseline-write-actual-forecast-candidate",
    "noFrontendSecrets": true
  },
  "auth0StrictStaging": {
    "phase": "017G",
    "version": "017G.auth0.1",
    "mode": "local-or-contract",
    "required": false,
    "status": "ready",
    "issuerConfigured": false,
    "audienceConfigured": false,
    "jwksConfigured": false,
    "organizationConfigured": false,
    "algorithms": [
      "RS256"
    ],
    "expectedClaims": [
      "iss",
      "sub",
      "aud",
      "exp",
      "iat",
      "email",
      "email_verified"
    ],
    "missing": [],
    "publicSafety": {
      "noClientSecretInFrontend": true,
      "tokenExchangeServerSideOnly": true,
      "jwksUsesPublicKeys": true
    }
  },
  "stripeBillingAdapter": {
    "phase": "017H",
    "contractVersion": "017H.stripe.1",
    "mode": "adapter-ready",
    "status": "ready",
    "provider": "stripe",
    "serverSideOnly": true,
    "executeHttp": false,
    "secretKeyPresent": false,
    "webhookSecretPresent": false,
    "configuredPriceCount": 0,
    "supportedPlans": [
      "starter_project",
      "project_professional",
      "portfolio_control"
    ],
    "checkoutPath": "/v1/billing/checkout",
    "portalPath": "/v1/billing/portal",
    "webhookPath": "/v1/webhooks/stripe",
    "noFrontendSecrets": true,
    "frontendMustNeverHold": [
      "STRIPE_SECRET_KEY",
      "STRIPE_WEBHOOK_SECRET",
      "Stripe restricted keys",
      "raw webhook signing material"
    ],
    "warnings": []
  },
  "storageAdapter": {
    "phase": "017H",
    "contractVersion": "017H.storage.1",
    "mode": "adapter-ready",
    "status": "ready",
    "provider": "aws-s3",
    "serverSideOnly": true,
    "executeSigning": false,
    "bucketConfigured": false,
    "region": "us-east-1",
    "accessKeyPresent": false,
    "secretKeyPresent": false,
    "sessionTokenPresent": false,
    "signUploadPath": "/v1/storage/sign-upload",
    "adminStatusPath": "/v1/admin/adapters/status",
    "noFrontendSecrets": true,
    "reportPhotoPolicies": {
      "starter_project": {
        "daily": {
          "maxFiles": 5,
          "maxMbPerFile": 8
        },
        "weekly": {
          "maxFiles": 10,
          "maxMbPerFile": 8
        },
        "monthly": {
          "maxFiles": 15,
          "maxMbPerFile": 8
        }
      },
      "project_professional": {
        "daily": {
          "maxFiles": 20,
          "maxMbPerFile": 12
        },
        "weekly": {
          "maxFiles": 30,
          "maxMbPerFile": 12
        },
        "monthly": {
          "maxFiles": 40,
          "maxMbPerFile": 12
        }
      },
      "portfolio_control": {
        "daily": {
          "maxFiles": 30,
          "maxMbPerFile": 20
        },
        "weekly": {
          "maxFiles": 40,
          "maxMbPerFile": 20
        },
        "monthly": {
          "maxFiles": 50,
          "maxMbPerFile": 20
        }
      }
    },
    "warnings": []
  },
  "stagingRealProviderE2E": {
    "phase": "017J",
    "contractVersion": "017J.1",
    "baseline": "199A",
    "expectedNextBaseline": "200",
    "status": "pending",
    "providerMode": "staging-ready",
    "canRunRealProviderE2E": false,
    "realProviderCallsEnabled": false,
    "productionLocked": true,
    "noFrontendSecrets": true,
    "serverSideOnly": true,
    "providerEnvSpec": {
      "auth0": [
        "SKRONVA_API_AUTH_MODE=strict",
        "SKRONVA_API_AUTH0_ISSUER",
        "SKRONVA_API_AUTH0_AUDIENCE",
        "SKRONVA_API_AUTH0_JWKS_URI",
        "SKRONVA_API_AUTH0_ORGANIZATION"
      ],
      "stripe": [
        "SKRONVA_API_STRIPE_MODE=test",
        "SKRONVA_API_STRIPE_EXECUTE_HTTP=true",
        "SKRONVA_API_STRIPE_SECRET_KEY",
        "SKRONVA_API_STRIPE_WEBHOOK_SECRET",
        "SKRONVA_API_STRIPE_PRICE_STARTER_PROJECT",
        "SKRONVA_API_STRIPE_PRICE_PROJECT_PROFESSIONAL",
        "SKRONVA_API_STRIPE_PRICE_PORTFOLIO_CONTROL"
      ],
      "awsS3": [
        "SKRONVA_API_STORAGE_MODE=aws-s3",
        "SKRONVA_API_AWS_S3_SIGNING_ENABLED=true",
        "SKRONVA_API_AWS_REGION",
        "SKRONVA_API_AWS_S3_BUCKET",
        "SKRONVA_API_AWS_S3_PREFIX",
        "SKRONVA_API_AWS_ACCESS_KEY_ID",
        "SKRONVA_API_AWS_SECRET_ACCESS_KEY"
      ],
      "database": [
        "SKRONVA_API_DATABASE_MODE=postgres",
        "SKRONVA_API_DB_DSN"
      ]
    },
    "providerEnvPresence": {
      "auth0": {
        "SKRONVA_API_AUTH_MODE": false,
        "SKRONVA_API_AUTH0_ISSUER": false,
        "SKRONVA_API_AUTH0_AUDIENCE": false,
        "SKRONVA_API_AUTH0_JWKS_URI": false,
        "SKRONVA_API_AUTH0_ORGANIZATION": false
      },
      "stripe": {
        "SKRONVA_API_STRIPE_MODE": false,
        "SKRONVA_API_STRIPE_EXECUTE_HTTP": false,
        "SKRONVA_API_STRIPE_SECRET_KEY": false,
        "SKRONVA_API_STRIPE_WEBHOOK_SECRET": false,
        "SKRONVA_API_STRIPE_PRICE_STARTER_PROJECT": false,
        "SKRONVA_API_STRIPE_PRICE_PROJECT_PROFESSIONAL": false,
        "SKRONVA_API_STRIPE_PRICE_PORTFOLIO_CONTROL": false
      },
      "awsS3": {
        "SKRONVA_API_STORAGE_MODE": false,
        "SKRONVA_API_AWS_S3_SIGNING_ENABLED": false,
        "SKRONVA_API_AWS_REGION": false,
        "SKRONVA_API_AWS_S3_BUCKET": false,
        "SKRONVA_API_AWS_S3_PREFIX": false,
        "SKRONVA_API_AWS_ACCESS_KEY_ID": false,
        "SKRONVA_API_AWS_SECRET_ACCESS_KEY": false
      },
      "database": {
        "SKRONVA_API_DATABASE_MODE": false,
        "SKRONVA_API_DB_DSN": false
      }
    },
    "gates": {
      "auth0": [
        {
          "id": "auth0.strict-mode",
          "status": "ready",
          "required": true,
          "details": "status=ready"
        },
        {
          "id": "auth0.issuer",
          "status": "pending",
          "required": true,
          "details": "server-side issuer configured"
        },
        {
          "id": "auth0.audience",
          "status": "pending",
          "required": true,
          "details": "server-side audience configured"
        },
        {
          "id": "auth0.jwks",
          "status": "pending",
          "required": true,
          "details": "JWKS URI configured"
        }
      ],
      "stripe": [
        {
          "id": "stripe.mode-test",
          "status": "ready",
          "required": true,
          "details": "mode=adapter-ready"
        },
        {
          "id": "stripe.secret",
          "status": "pending",
          "required": true,
          "details": "secret key present only in backend"
        },
        {
          "id": "stripe.webhook-secret",
          "status": "pending",
          "required": true,
          "details": "webhook signing secret present only in backend"
        },
        {
          "id": "stripe.price-ids",
          "status": "pending",
          "required": true,
          "details": "configuredPriceCount=0"
        },
        {
          "id": "stripe.explicit-execute-flag",
          "status": "pending",
          "required": true,
          "details": "SKRONVA_API_STRIPE_EXECUTE_HTTP must be explicit for live calls"
        }
      ],
      "awsS3": [
        {
          "id": "s3.mode",
          "status": "ready",
          "required": true,
          "details": "mode=adapter-ready"
        },
        {
          "id": "s3.bucket",
          "status": "pending",
          "required": true,
          "details": "bucket configured only in backend"
        },
        {
          "id": "s3.region",
          "status": "pending",
          "required": true,
          "details": "region configured"
        },
        {
          "id": "s3.access-key",
          "status": "pending",
          "required": true,
          "details": "access key id present only in backend"
        },
        {
          "id": "s3.secret-key",
          "status": "pending",
          "required": true,
          "details": "secret key present only in backend"
        },
        {
          "id": "s3.explicit-signing-flag",
          "status": "pending",
          "required": true,
          "details": "SKRONVA_API_AWS_S3_SIGNING_ENABLED must be explicit for real presign"
        }
      ],
      "database": [
        {
          "id": "database.persistence",
          "status": "pending",
          "required": true,
          "details": "status=fallback-ready"
        },
        {
          "id": "database.dsn",
          "status": "pending",
          "required": true,
          "details": "database DSN present only in backend"
        }
      ],
      "safety": [
        {
          "id": "frontend.no-secrets",
          "status": "ready",
          "required": true,
          "details": "frontend contract carries no secret material"
        },
        {
          "id": "production.locked",
          "status": "ready",
          "required": true,
          "details": "production remains closed until staging evidence is approved"
        },
        {
          "id": "real-provider-calls-explicit",
          "status": "pending",
          "required": false,
          "details": "live Auth0/Stripe/AWS calls are disabled unless explicitly enabled"
        }
      ]
    },
    "endpoints": [
      {
        "id": "staging.provider-config",
        "method": "GET",
        "path": "/v1/admin/staging/provider-config"
      },
      {
        "id": "staging.e2e.qa",
        "method": "POST",
        "path": "/v1/admin/staging/e2e-qa"
      },
      {
        "id": "auth.session.validate",
        "method": "POST",
        "path": "/v1/auth/session/validate"
      },
      {
        "id": "billing.checkout.create",
        "method": "POST",
        "path": "/v1/billing/checkout"
      },
      {
        "id": "billing.portal.create",
        "method": "POST",
        "path": "/v1/billing/portal"
      },
      {
        "id": "stripe.webhook.receive",
        "method": "POST",
        "path": "/v1/webhooks/stripe"
      },
      {
        "id": "storage.sign-upload",
        "method": "POST",
        "path": "/v1/storage/sign-upload"
      },
      {
        "id": "ocr.pdf.extract",
        "method": "POST",
        "path": "/v1/ocr/pdf/extract"
      },
      {
        "id": "audit.event.ingest",
        "method": "POST",
        "path": "/v1/audit/events"
      }
    ],
    "qaPolicy": {
      "defaultMode": "configuration-and-safe-runtime-e2e",
      "realProviderModeRequires": [
        "backend env variables configured in vault/hosting",
        "SKRONVA_API_STAGING_ALLOW_REAL_PROVIDER_CALLS=true",
        "Auth0 strict tenant with RS256 JWKS",
        "Stripe test secret, price IDs and webhook secret",
        "AWS S3 test bucket with restricted credentials",
        "production lock remains enabled"
      ],
      "noSimulatedRealPass": true
    }
  },
  "adminControlCenter": {
    "phase": "017J2",
    "status": "ready",
    "adminOnly": true,
    "noFrontendSecrets": true
  },
  "realStagingCredentialEvidence": {
    "phase": "017J3",
    "status": "pending-real-staging-credentials",
    "productionLocked": true,
    "noFrontendSecrets": true
  },
  "appDomainDeploymentGate": {
    "phase": "017J4",
    "status": "pending-domain-staging-configuration",
    "productionLocked": true,
    "productionOpen": false,
    "noFrontendSecrets": true
  },
  "mandatoryProductGovernance": {
    "phase": "017J6A",
    "status": "mandatory-product-gate-ready",
    "autosave": {
      "localDrafts": true,
      "serverDraftSync": true,
      "draftDoesNotEqualCommit": true,
      "recoveryAfterBrowserClose": true,
      "officialCommitControlled": true,
      "draftEndpoint": "/v1/drafts/autosave"
    },
    "nativeAI": {
      "required": true,
      "backgroundInferenceRequired": true,
      "userReadsConclusions": true,
      "externalModelsOptional": true,
      "externalModelKeysBackendOnly": true,
      "providerDispatchFromFrontend": false
    },
    "visibility": {
      "frontendHides": true,
      "backendBlocks": true,
      "databaseFiltersTenantProject": true,
      "auditRegisters": true,
      "roles": [
        "skronva_admin",
        "support_admin",
        "billing_admin",
        "tenant_admin",
        "project_manager",
        "field_user",
        "viewer",
        "trial_user"
      ],
      "adminRoutes": [
        "/v1/admin/control-center/summary",
        "/v1/admin/observability/events",
        "/v1/admin/staging/evidence-readiness",
        "/v1/admin/staging/evidence/run",
        "/v1/admin/deployment/domain-readiness",
        "/v1/admin/deployment/real-domain-hosting/readiness",
        "/v1/admin/product-governance/summary",
        "/v1/admin/product-governance/authorize"
      ],
      "runtimeAdminEndpoints": [
        "/v1/admin/database/status",
        "/v1/admin/database/migrate/check",
        "/v1/admin/adapters/status",
        "/v1/admin/staging/provider-config",
        "/v1/admin/staging/e2e-qa",
        "/v1/admin/control-center/summary",
        "/v1/admin/observability/events",
        "/v1/admin/staging/evidence-readiness",
        "/v1/admin/staging/evidence/run",
        "/v1/admin/staging/evidence/latest",
        "/v1/admin/deployment/domain-readiness",
        "/v1/admin/deployment/domain-gate/run",
        "/v1/admin/deployment/domain-gate/latest",
        "/v1/admin/deployment/real-domain-hosting/readiness",
        "/v1/admin/deployment/real-domain-hosting/run",
        "/v1/admin/deployment/real-domain-hosting/latest",
        "/v1/admin/product-governance/summary",
        "/v1/admin/product-governance/authorize",
        "/v1/admin/deployment/render-backend/readiness"
      ]
    },
    "noFrontendSecrets": true
  },
  "renderBackendReadiness": {
    "phase": "017J6B",
    "status": "render-staging-ready-with-pending-provider-credentials",
    "serviceName": "skronva-api-staging",
    "customDomain": "api-staging.skronva.com",
    "host": "0.0.0.0",
    "port": "10000",
    "noFrontendSecrets": true
  },
  "startedAt": "2026-06-18T23:04:08.173Z",
  "uptimeSeconds": 4189,
  "endpoints": [
    {
      "id": "runtime.health",
      "method": "GET",
      "path": "/healthz"
    },
    {
      "id": "runtime.health.render",
      "method": "GET",
      "path": "/health"
    },
    {
      "id": "auth.session.validate",
      "method": "POST",
      "path": "/v1/auth/session/validate"
    },
    {
      "id": "tenant.bootstrap",
      "method": "POST",
      "path": "/v1/tenants/bootstrap"
    },
    {
      "id": "tenant.current.resolve",
      "method": "GET",
      "path": "/v1/tenants/current"
    },
    {
      "id": "trial.consume.output",
      "method": "POST",
      "path": "/v1/trials/consume-output"
    },
    {
      "id": "entitlements.resolve",
      "method": "GET",
      "path": "/v1/entitlements/resolve"
    },
    {
      "id": "billing.checkout.create",
      "method": "POST",
      "path": "/v1/billing/checkout"
    },
    {
      "id": "billing.portal.create",
      "method": "POST",
      "path": "/v1/billing/portal"
    },
    {
      "id": "stripe.webhook.receive",
      "method": "POST",
      "path": "/v1/webhooks/stripe"
    },
    {
      "id": "storage.sign-upload",
      "method": "POST",
      "path": "/v1/storage/sign-upload"
    },
    {
      "id": "audit.event.ingest",
      "method": "POST",
      "path": "/v1/audit/events"
    },
    {
      "id": "ocr.pdf.extract",
      "method": "POST",
      "path": "/v1/ocr/pdf/extract"
    },
    {
      "id": "database.status",
      "method": "GET",
      "path": "/v1/admin/database/status"
    },
    {
      "id": "database.migration.check",
      "method": "POST",
      "path": "/v1/admin/database/migrate/check"
    },
    {
      "id": "auth0.strict.config",
      "method": "GET",
      "path": "/v1/auth/strict/config"
    },
    {
      "id": "adapter.status",
      "method": "GET",
      "path": "/v1/admin/adapters/status"
    },
    {
      "id": "staging.provider-config",
      "method": "GET",
      "path": "/v1/admin/staging/provider-config"
    },
    {
      "id": "staging.e2e.qa",
      "method": "POST",
      "path": "/v1/admin/staging/e2e-qa"
    },
    {
      "id": "admin.control-center.summary",
      "method": "GET",
      "path": "/v1/admin/control-center/summary"
    },
    {
      "id": "admin.observability.events",
      "method": "GET",
      "path": "/v1/admin/observability/events"
    },
    {
      "id": "staging.credentials.evidence.readiness",
      "method": "GET",
      "path": "/v1/admin/staging/evidence-readiness"
    },
    {
      "id": "staging.credentials.evidence.run",
      "method": "POST",
      "path": "/v1/admin/staging/evidence/run"
    },
    {
      "id": "staging.credentials.evidence.latest",
      "method": "GET",
      "path": "/v1/admin/staging/evidence/latest"
    },
    {
      "id": "deployment.domain.readiness",
      "method": "GET",
      "path": "/v1/admin/deployment/domain-readiness"
    },
    {
      "id": "deployment.domain.gate.run",
      "method": "POST",
      "path": "/v1/admin/deployment/domain-gate/run"
    },
    {
      "id": "deployment.domain.gate.latest",
      "method": "GET",
      "path": "/v1/admin/deployment/domain-gate/latest"
    },
    {
      "id": "deployment.real-domain-hosting.readiness",
      "method": "GET",
      "path": "/v1/admin/deployment/real-domain-hosting/readiness"
    },
    {
      "id": "deployment.real-domain-hosting.run",
      "method": "POST",
      "path": "/v1/admin/deployment/real-domain-hosting/run"
    },
    {
      "id": "deployment.real-domain-hosting.latest",
      "method": "GET",
      "path": "/v1/admin/deployment/real-domain-hosting/latest"
    },
    {
      "id": "admin.product-governance.summary",
      "method": "GET",
      "path": "/v1/admin/product-governance/summary"
    },
    {
      "id": "admin.product-governance.authorize",
      "method": "POST",
      "path": "/v1/admin/product-governance/authorize"
    },
    {
      "id": "drafts.autosave",
      "method": "POST",
      "path": "/v1/drafts/autosave"
    },
    {
      "id": "deployment.render-backend.readiness",
      "method": "GET",
      "path": "/v1/admin/deployment/render-backend/readiness"
    }
  ],
  "noFrontendSecrets": true,
  "runtime": {
    "phase": "017J",
    "contractVersion": "017J.1",
    "authority": "backend-runtime-foundation",
    "authMode": "local",
    "generatedAt": "2026-06-19T00:13:56.956Z"
  }
}