{
  "schema": "ops-summary/v1",
  "generated_at": "2026-11-10T11:22:18Z",
  "source": "tools/ops/prod-health.sh",
  "host": "SEPO",
  "overall": "fail",
  "summary": {
    "ok": 48,
    "warn": 0,
    "fail": 4
  },
  "checks": [
    {
      "section": "Publiczne endpointy (Full Strict)",
      "status": "ok",
      "name": "sepo.mixbudkg.pl/healthz → 200 ×5/5",
      "unit": "sepo",
      "unit_via": "probe"
    },
    {
      "section": "Publiczne endpointy (Full Strict)",
      "status": "ok",
      "name": "sepo.mixbud.eu/healthz → 200 ×5/5",
      "unit": "sepo",
      "unit_via": "probe"
    },
    {
      "section": "Publiczne endpointy (Full Strict)",
      "status": "ok",
      "name": "customer.mixbudkg.pl/healthz → 200 ×5/5",
      "unit": "sepo",
      "unit_via": "probe"
    },
    {
      "section": "Publiczne endpointy (Full Strict)",
      "status": "ok",
      "name": "mixbud.eu/healthz → 200 ×5/5",
      "unit": "sepo",
      "unit_via": "probe"
    },
    {
      "section": "Aplikacje za Cloudflare Access (sonda tokenem usługowym sond)",
      "status": "ok",
      "name": "aplikacja sandbox.bygamex.pl/healthz → 200 ×5/5 (przez token sond Access)",
      "unit": "atlas",
      "unit_via": "probe"
    },
    {
      "section": "Aplikacje za Cloudflare Access (sonda tokenem usługowym sond)",
      "status": "ok",
      "name": "aplikacja explorer.bygamex.pl/ → 200 ×5/5 (przez token sond Access)",
      "unit": "registry-explorer",
      "unit_via": "probe"
    },
    {
      "section": "Aplikacje za Cloudflare Access (sonda tokenem usługowym sond)",
      "status": "ok",
      "name": "studio za Access → 302 ze znacznikiem Access (chronione)",
      "unit": "sepo",
      "unit_via": "declared"
    },
    {
      "section": "Tożsamość backendu Supabase: czy api-* trafia we WŁASNY Kong (R-02, INC-001)",
      "status": "ok",
      "name": "backend sepo: klucz anon z bundla (dł. 169) → api-sepo.mixbudkg.pl/auth/v1/health 200 ×5/5 (własny Kong)",
      "unit": "auth",
      "unit_via": "probe"
    },
    {
      "section": "Tożsamość backendu Supabase: czy api-* trafia we WŁASNY Kong (R-02, INC-001)",
      "status": "ok",
      "name": "backend sepo: klucz sepo odrzucony przez api-sandbox.bygamex.pl → 401 ×5/5 (trasy rozdzielone)",
      "unit": "auth",
      "unit_via": "probe"
    },
    {
      "section": "Tożsamość backendu Supabase: czy api-* trafia we WŁASNY Kong (R-02, INC-001)",
      "status": "fail",
      "name": "backend atlas: TOŻSAMOŚĆ — własny klucz anon → api-sandbox.bygamex.pl/auth/v1/health 200 tylko 0/5 (reszta: 503×5; 401 = trasa trafia w CUDZY Kong, scenariusz INC-001)",
      "unit": "auth",
      "unit_via": "probe"
    },
    {
      "section": "Tożsamość backendu Supabase: czy api-* trafia we WŁASNY Kong (R-02, INC-001)",
      "status": "ok",
      "name": "backend atlas: klucz atlas odrzucony przez api-sepo.mixbudkg.pl → 401 ×5/5 (trasy rozdzielone)",
      "unit": "auth",
      "unit_via": "probe"
    },
    {
      "section": "Sondy jednostek z rejestru (probes.yaml) — to, czego sekcje wyżej nie mierzą",
      "status": "ok",
      "name": "sonda auth: https://api-sepo.mixbudkg.pl/auth/v1/authorize → 400 (http_gotrue_open, proves: origin)",
      "unit": "auth",
      "unit_via": "probe"
    },
    {
      "section": "Sondy jednostek z rejestru (probes.yaml) — to, czego sekcje wyżej nie mierzą",
      "status": "fail",
      "name": "sonda auth: https://api-sandbox.bygamex.pl/auth/v1/authorize → 503, oczekiwano 400 + \"error_code\" (żywy GoTrue) (http_gotrue_open)",
      "unit": "auth",
      "unit_via": "probe"
    },
    {
      "section": "Sondy jednostek z rejestru (probes.yaml) — to, czego sekcje wyżej nie mierzą",
      "status": "ok",
      "name": "sonda bs-portal: https://bs.bygamex.pl/readyz → 200 (http_2xx, proves: origin)",
      "unit": "bs-portal",
      "unit_via": "probe"
    },
    {
      "section": "Sondy jednostek z rejestru (probes.yaml) — to, czego sekcje wyżej nie mierzą",
      "status": "ok",
      "name": "sonda bs-portal: https://files.bygamex.pl/ → 200 (http_2xx, proves: origin)",
      "unit": "bs-portal",
      "unit_via": "probe"
    },
    {
      "section": "Sondy jednostek z rejestru (probes.yaml) — to, czego sekcje wyżej nie mierzą",
      "status": "ok",
      "name": "sonda errors: https://errors.bygamex.pl/_health/ → 200 (http_2xx, proves: origin)",
      "unit": "errors",
      "unit_via": "probe"
    },
    {
      "section": "Sondy jednostek z rejestru (probes.yaml) — to, czego sekcje wyżej nie mierzą",
      "status": "ok",
      "name": "sonda gamex-id: https://id.bygamex.pl/realms/gamex/.well-known/openid-configuration → 200 (http_2xx, proves: origin)",
      "unit": "gamex-id",
      "unit_via": "probe"
    },
    {
      "section": "Sondy jednostek z rejestru (probes.yaml) — to, czego sekcje wyżej nie mierzą",
      "status": "ok",
      "name": "sonda ops: https://ops-health.bygamex.pl/health-snapshot.json → 200 (http_2xx, proves: origin)",
      "unit": "ops",
      "unit_via": "probe"
    },
    {
      "section": "Sondy jednostek z rejestru (probes.yaml) — to, czego sekcje wyżej nie mierzą",
      "status": "ok",
      "name": "sonda push: https://api-sandbox.bygamex.pl/functions/v1/ → 400 (http_edge_runtime, proves: origin)",
      "unit": "push",
      "unit_via": "probe"
    },
    {
      "section": "Sondy jednostek z rejestru (probes.yaml) — to, czego sekcje wyżej nie mierzą",
      "status": "ok",
      "name": "sonda sepo: https://customer.mixbud.eu/healthz → 200 (http_2xx, proves: origin)",
      "unit": "sepo",
      "unit_via": "probe"
    },
    {
      "section": "Sondy jednostek z rejestru (probes.yaml) — to, czego sekcje wyżej nie mierzą",
      "status": "ok",
      "name": "sonda sms: https://api-sepo.mixbudkg.pl/functions/v1/ → 400 (http_edge_runtime, proves: origin)",
      "unit": "sms",
      "unit_via": "probe"
    },
    {
      "section": "Sondy jednostek z rejestru (probes.yaml) — to, czego sekcje wyżej nie mierzą",
      "status": "ok",
      "name": "sonda storage: https://api-sepo.mixbudkg.pl/storage/v1/status → 200 (http_2xx, proves: origin)",
      "unit": "storage",
      "unit_via": "probe"
    },
    {
      "section": "Serwer (kontenery / porty / tunel)",
      "status": "ok",
      "name": "kontenery: 61 działają",
      "unit": null,
      "unit_reason": "infrastruktura hosta (wszystkie kontenery CT 104)",
      "unit_via": "declared"
    },
    {
      "section": "Serwer (kontenery / porty / tunel)",
      "status": "fail",
      "name": "restarting: 4 (coś się restartuje)",
      "unit": null,
      "unit_reason": "infrastruktura hosta (wszystkie kontenery CT 104)",
      "unit_via": "declared"
    },
    {
      "section": "Serwer (kontenery / porty / tunel)",
      "status": "fail",
      "name": "unhealthy: atlas-auth-1,atlas-storage-1,atlas-realtime-1,atlas-rest-1,atlas-db-1 (POGORSZENIE wobec bazy 'edge-fallback,sepo-landing')",
      "unit": null,
      "unit_reason": "infrastruktura hosta (wszystkie kontenery CT 104)",
      "unit_via": "declared"
    },
    {
      "section": "Serwer (kontenery / porty / tunel)",
      "status": "ok",
      "name": "porty na 0.0.0.0: 0 (§9 invariant)",
      "unit": null,
      "unit_reason": "infrastruktura hosta (wszystkie kontenery CT 104)",
      "unit_via": "declared"
    },
    {
      "section": "Serwer (kontenery / porty / tunel)",
      "status": "ok",
      "name": "cloudflared (tunel) Up: 1 kontener(y)",
      "unit": "edge",
      "unit_via": "scrape_job"
    },
    {
      "section": "Serwer (kontenery / porty / tunel)",
      "status": "ok",
      "name": "Prometheus: cele up=1 35/35 (wszystkie joby)",
      "unit": "observability",
      "unit_via": "scrape_job"
    },
    {
      "section": "Dane / migracje / backup",
      "status": "ok",
      "name": "dane: 2 org, 6 userów",
      "unit": "sepo",
      "unit_via": "declared"
    },
    {
      "section": "Dane / migracje / backup",
      "status": "ok",
      "name": "migracje: PENDING 0 (schemat aktualny)",
      "unit": "sepo",
      "unit_via": "declared"
    },
    {
      "section": "Dane / migracje / backup",
      "status": "ok",
      "name": "ostatni backup: 20261110T033001Z",
      "unit": "sepo",
      "unit_via": "declared"
    },
    {
      "section": "Cert origin (Full Strict)",
      "status": "ok",
      "name": "origin cert: CloudFlare Origin CA (Full Strict)",
      "unit": "edge",
      "unit_via": "scrape_job"
    },
    {
      "section": "Portale brzegu: ZADEKLAROWANE vs LIVE (blok C — mierz, nie deklaruj)",
      "status": "ok",
      "name": "portale brzegu: 10/10 LIVE (Access odpowiada + origin żyje z sieci tunelu)",
      "unit": null,
      "unit_reason": "agregat portali ops (*.ops.bygamex.pl, wiele jednostek)",
      "unit_via": "declared"
    },
    {
      "section": "Zdolność WDROŻENIA (nie tylko: czy działa)",
      "status": "ok",
      "name": "ostatni build sepo: OK  ([2026-10-29T03:32:14Z])",
      "unit": "sepo",
      "unit_via": "declared"
    },
    {
      "section": "Zdolność WDROŻENIA (nie tylko: czy działa)",
      "status": "ok",
      "name": "ostatni build atlas: OK  ([2026-10-24T02:02:21Z])",
      "unit": "atlas",
      "unit_via": "declared"
    },
    {
      "section": "Zdolność WDROŻENIA (nie tylko: czy działa)",
      "status": "ok",
      "name": "ostatni build registry-explorer: OK  ([2026-10-29T03:32:46Z])",
      "unit": "registry-explorer",
      "unit_via": "declared"
    },
    {
      "section": "Świeżość wdrożeń: commit KONTENERA vs origin/main (AU-41)",
      "status": "ok",
      "name": "sepo-web-prod: obraz @ 913e88f zawiera najnowsze wejścia appki (913e88f) — świeży",
      "unit": "sepo",
      "unit_via": "declared"
    },
    {
      "section": "Świeżość wdrożeń: commit KONTENERA vs origin/main (AU-41)",
      "status": "ok",
      "name": "atlas-web-prod: obraz @ 90e9781 świeży wobec wydania 0.16.0@90e9781 (main +451 commitów bez wydania — zgodnie z promote: release)",
      "unit": "atlas",
      "unit_via": "declared"
    },
    {
      "section": "Brzeg: tunel · runner · sieć (diagnostyka P-06)",
      "status": "ok",
      "name": "cloudflared poza dockerem: brak",
      "unit": "edge",
      "unit_via": "scrape_job"
    },
    {
      "section": "Brzeg: tunel · runner · sieć (diagnostyka P-06)",
      "status": "ok",
      "name": "kontener bs-cloudflared (cloudflare/cloudflared:2026.9.1) — Up 10 days — sieci: bs",
      "unit": "edge",
      "unit_via": "scrape_job"
    },
    {
      "section": "Brzeg: tunel · runner · sieć (diagnostyka P-06)",
      "status": "ok",
      "name": "kontener edge_cloudflared_v2 (cloudflare/cloudflared:2026.9.1) — Up 10 days — sieci: edge obs ops",
      "unit": "edge",
      "unit_via": "scrape_job"
    },
    {
      "section": "Brzeg: tunel · runner · sieć (diagnostyka P-06)",
      "status": "ok",
      "name": "host prod bez CI actions-runner-iso-1: actions-runner-iso-1.service nieaktywny — wycofany z hosta prod (TD-21/TD-30)",
      "unit": null,
      "unit_reason": "runner CI (infrastruktura CI, flota Grodzisk)",
      "unit_via": "declared"
    },
    {
      "section": "Brzeg: tunel · runner · sieć (diagnostyka P-06)",
      "status": "ok",
      "name": "host prod bez CI actions-runner-iso-2: actions-runner-iso-2.service nieaktywny — wycofany z hosta prod (TD-21/TD-30)",
      "unit": null,
      "unit_reason": "runner CI (infrastruktura CI, flota Grodzisk)",
      "unit_via": "declared"
    },
    {
      "section": "Brzeg: tunel · runner · sieć (diagnostyka P-06)",
      "status": "ok",
      "name": "host prod bez CI actions-runner-iso-3: actions-runner-iso-3.service nieaktywny — wycofany z hosta prod (TD-21/TD-30)",
      "unit": null,
      "unit_reason": "runner CI (infrastruktura CI, flota Grodzisk)",
      "unit_via": "declared"
    },
    {
      "section": "Brzeg: tunel · runner · sieć (diagnostyka P-06)",
      "status": "ok",
      "name": "host prod bez CI actions-runner-iso-4: actions-runner-iso-4.service nieaktywny — wycofany z hosta prod (TD-21/TD-30)",
      "unit": null,
      "unit_reason": "runner CI (infrastruktura CI, flota Grodzisk)",
      "unit_via": "declared"
    },
    {
      "section": "Brzeg: tunel · runner · sieć (diagnostyka P-06)",
      "status": "ok",
      "name": "host prod bez CI actions-runner-iso-5: actions-runner-iso-5.service nieaktywny — wycofany z hosta prod (TD-21/TD-30)",
      "unit": null,
      "unit_reason": "runner CI (infrastruktura CI, flota Grodzisk)",
      "unit_via": "declared"
    },
    {
      "section": "Brzeg: tunel · runner · sieć (diagnostyka P-06)",
      "status": "ok",
      "name": "host prod bez CI actions-runner-iso-6: actions-runner-iso-6.service nieaktywny — wycofany z hosta prod (TD-21/TD-30)",
      "unit": null,
      "unit_reason": "runner CI (infrastruktura CI, flota Grodzisk)",
      "unit_via": "declared"
    },
    {
      "section": "Brzeg: tunel · runner · sieć (diagnostyka P-06)",
      "status": "ok",
      "name": "host prod bez CI actions-runner-fed-1: actions-runner-fed-1.service nieaktywny — wycofany z hosta prod (TD-21/TD-30)",
      "unit": null,
      "unit_reason": "runner CI (infrastruktura CI, flota Grodzisk)",
      "unit_via": "declared"
    },
    {
      "section": "Brzeg: tunel · runner · sieć (diagnostyka P-06)",
      "status": "ok",
      "name": "host prod bez CI actions-runner-fed-2: actions-runner-fed-2.service nieaktywny — wycofany z hosta prod (TD-21/TD-30)",
      "unit": null,
      "unit_reason": "runner CI (infrastruktura CI, flota Grodzisk)",
      "unit_via": "declared"
    },
    {
      "section": "Brzeg: tunel · runner · sieć (diagnostyka P-06)",
      "status": "ok",
      "name": "host prod bez CI actions-runner-fed-3: actions-runner-fed-3.service nieaktywny — wycofany z hosta prod (TD-21/TD-30)",
      "unit": null,
      "unit_reason": "runner CI (infrastruktura CI, flota Grodzisk)",
      "unit_via": "declared"
    },
    {
      "section": "Brzeg: tunel · runner · sieć (diagnostyka P-06)",
      "status": "ok",
      "name": "linger: yes",
      "unit": null,
      "unit_reason": "infrastruktura hosta (CT 104)",
      "unit_via": "declared"
    },
    {
      "section": "Brzeg: tunel · runner · sieć (diagnostyka P-06)",
      "status": "ok",
      "name": "ZeroTier: nieobecny — oczekiwane (usunięty z CT 104, EDGE-10)",
      "unit": null,
      "unit_reason": "infrastruktura hosta (CT 104)",
      "unit_via": "declared"
    }
  ],
  "prometheus_targets": {
    "up": 35,
    "total": 35,
    "jobs": {
      "alertmanager": {
        "up": 1,
        "total": 1
      },
      "blackbox-http": {
        "up": 24,
        "total": 24
      },
      "cadvisor": {
        "up": 1,
        "total": 1
      },
      "cloudflared": {
        "up": 1,
        "total": 1
      },
      "container-dns": {
        "up": 1,
        "total": 1
      },
      "facts": {
        "up": 1,
        "total": 1
      },
      "guest-ports": {
        "up": 1,
        "total": 1
      },
      "hypervisor-capacity": {
        "up": 1,
        "total": 1
      },
      "node": {
        "up": 1,
        "total": 1
      },
      "pbs-backup": {
        "up": 1,
        "total": 1
      },
      "prometheus": {
        "up": 1,
        "total": 1
      },
      "traefik": {
        "up": 1,
        "total": 1
      }
    },
    "down_jobs": []
  },
  "releases_pending": [],
  "units": {
    "atlas": {
      "ok": 3,
      "warn": 0,
      "fail": 0,
      "status": "ok"
    },
    "auth": {
      "ok": 4,
      "warn": 0,
      "fail": 2,
      "status": "fail"
    },
    "bs-portal": {
      "ok": 2,
      "warn": 0,
      "fail": 0,
      "status": "ok"
    },
    "edge": {
      "ok": 5,
      "warn": 0,
      "fail": 0,
      "status": "ok"
    },
    "errors": {
      "ok": 1,
      "warn": 0,
      "fail": 0,
      "status": "ok"
    },
    "gamex-id": {
      "ok": 1,
      "warn": 0,
      "fail": 0,
      "status": "ok"
    },
    "observability": {
      "ok": 1,
      "warn": 0,
      "fail": 0,
      "status": "ok"
    },
    "ops": {
      "ok": 1,
      "warn": 0,
      "fail": 0,
      "status": "ok"
    },
    "push": {
      "ok": 1,
      "warn": 0,
      "fail": 0,
      "status": "ok"
    },
    "registry-explorer": {
      "ok": 2,
      "warn": 0,
      "fail": 0,
      "status": "ok"
    },
    "sepo": {
      "ok": 11,
      "warn": 0,
      "fail": 0,
      "status": "ok"
    },
    "sms": {
      "ok": 1,
      "warn": 0,
      "fail": 0,
      "status": "ok"
    },
    "storage": {
      "ok": 1,
      "warn": 0,
      "fail": 0,
      "status": "ok"
    }
  }
}
