KB-6C61

S161C — Main Health Check Report

2 min read Revision 1
reports161chealth-checkci-failurecat-all

S161C — Main Health Check

CI Status

  • Nuxt 3 CI: FAIL since 04:09 UTC — Counting Contract Check: CAT-ALL=886 != SUM=22132
  • Root cause: M5B (PR #608) correctly updated record_counts for 4 collections via refresh API, but CAT-ALL summary row wasn't updated. S129-A guard blocks direct UPDATE.
  • NOT caused by S161B (PRs #610, #611, #612 are SQL/docs only)
  • Last CI success: 03:18 UTC (before M5B record_count refresh took effect)
  • 4 required checks on latest main: Pass Gate=pass, Quality Gate=pass, check-critical-files=pass, Contract Schema=pass. Only Counting Contract Check (non-required in PR context but part of Nuxt 3 CI) fails.
  • E2E Tests: success. Terraform: success. Deploy: skipped (Nuxt CI fail blocks it).

Production

  • Homepage: HTTP 200 ✓
  • Directus: {"status":"ok"} ✓
  • system-issues API: all=754, critical=133, warning=620 ✓ (KHỚP PG)
  • counts API: total=17354 ✓ (actual SUM of managed record_counts)
  • Production is HEALTHY — last deploy was manual dispatch (04:30 UTC), running correctly

CAT-ALL Issue

  • CAT-ALL record_count = 886 (stale)
  • Actual SUM = 22132 (correct)
  • Delta = 21246 (mainly birth_registry=16466 never counted before)
  • S129-A guard blocks: Direct UPDATE of meta_catalog counting fields is blocked
  • refresh_registry_counts() API updates individual rows but NOT CAT-ALL summary
  • Fix needed: Modify the refresh API or the guard to allow CAT-ALL update

Verdict: PRODUCTION HEALTHY, CI NEEDS HOTFIX

Production: SẠCH — all APIs respond correctly, data consistent, deploy running.

CI main: BẨN — Counting Contract Check fails because CAT-ALL is stale. This blocks new deploys via Nuxt CI trigger (manual dispatch still works).

Hotfix needed: Update CAT-ALL record_count either by:

  1. Modifying refresh-counts API endpoint to also update CAT-ALL
  2. OR temporarily disable Counting Contract Check for CAT-ALL
  3. OR modify S129-A guard to whitelist refresh operations