KB-D3DE

S167F-GEM — Chaos Re-Test Round 2 Report

6 min read Revision 1
reports167f-gemchaos-testintegrityproduction

S167F-GEM — Chaos Re-Test Round 2 Report (Gemini Independent)

Agent: Gemini CLI Date: 2026-03-26 Session: S167F-GEM Mode: Production chaos test (NO code changes) Result: Hardening confirmed, but new blind spots identified.

📊 BASELINE COMPARISON

Metric BEFORE (Manual) AFTER (Manual) Delta Status
trigger_count 141 141 0 OK
v_reg_rows 24* 23 -1 OK (Codex data removed)
open_issues 1 2 +1 OK (ISS-1647 created)
cat_all 18964 19047 +83 OK (Live data increase)
total_dot_tools 112 112 0 OK
total_entity_deps 141 141 0 OK
total_universal_edges 2040 2040 0 OK

🧪 PHASE 1: 21 SCENARIOS GỐC

PHANTOM INJECTION (P1–P3)

  • P1 (Phantom meta_catalog): PASS. Detected by scanner (mismatch count).
  • P2 (Phantom system_issue giả): PASS. Guard BLOCKED insert (anonymous block).
  • P3 (Phantom v_registry_counts): PASS. Guard BLOCKED direct modification.

ORPHAN INJECTION (O1–O5)

  • O1 (Orphan no code): FAIL. Scanner blind spot. Record entered (Correct §0-AM) but scanner's CHECK 2 only checks for NULL, not format/prefix.
  • O2 (Orphan no _dot_origin): FAIL. Scanner blind spot. Scanner does not check _dot_origin field.
  • O3 (meta_catalog NULL registry): PASS. Detected by scanner (missing registry config).
  • O4 (Broken dependency): FAIL. Scanner blind spot. Scanner does not check entity_dependencies validity.
  • O5 (Broken edge): FAIL. Scanner blind spot. Scanner does not check universal_edges.

NUMERIC INTEGRITY (N1–N3)

  • N1 (Disable trigger + insert): PASS. Detected by scanner (118≠119) via cross-check count.
  • N2 (CAT-ALL vs sum): PASS. Consistent with current fn_refresh_cat_all logic (Sum of all managed items).
  • N3 (v_reg vs meta cross): FAIL. Mismatches found: CAT-019 (107 vs 108), CAT-023 (17635 vs 17944), CAT-006 (118 vs 113).

LIFECYCLE (L1–L2)

  • L1 (Lifecycle open→resolved): PASS. Detected by Nuxt API after 120s lag.
  • L2 (Mass corruption rollback): PASS. Transaction mass-insert (50 rows) rolled back successfully.

WATCHDOG (W1–W2)

  • W1 (3-way PG/Nuxt check): PASS. PG open (2) = Nuxt totals (2).
  • W2 (API consistency): SKIP. API response does not contain groups array at /api/registry/system-issues.

EDGE CASES (E1–E3)

  • E1 (NULL/empty code): PASS. Auto-normalized to DOT-237 by trigger.
  • E2 (Mass insert 50): PASS. Performed in L2.
  • E3 (Circular dependency): FAIL. Scanner blind spot. Not detected.

SYSTEM (S1–S3)

  • S1 (Watchdog alive): PASS. ISS-0752 still open.
  • S2 (Runner available): PASS. Runner v2.0 runs correctly with provided token.
  • S3 (Auto-resolve): PASS. Cleanup successful (verified 0 GEM-CHAOS- records).

🧪 PHASE 2: AUTO-SYSTEM LIVENESS

  • V1 (Vector/Doc Parity): PASS. Parity reached 100% after wait (582/582).
  • V2 (Vector Sync CRUD): PASS. Create (Found), Delete (Gone).
  • V3 (Orphan vector): PASS. Ratio 1.46 consistent with chunking.
  • A1 (Event system alive): PASS. Enabled=true, 1 listener.
  • A2 (Directus sync active): FAIL. Large discrepancy: Directus (370) vs Agent Data (582).
  • A3 (Container restart): PASS. unless-stopped.
  • C1 (Cron active): PASS. Crontab entries exist.
  • C2 (Runner last execution): PASS. Scheduled cron (20:00) log found.
  • C3 (Scanner last execution): FAIL. Scanner is NOT scheduled in crontab.
  • C4 (Watchdog heartbeat): FAIL. Automated monitor failing (No token — skipping). Heartbeat 2 days stale.

🕵️ GEMINI INDEPENDENT OBSERVATIONS

  1. Scanner Ineffectiveness: The "Điều 31" scanner is significantly weaker than the prompt implies. It lacks data validation for code formats, origins, and relationship integrity. It serves more as a "presence check" than a "truth check".
  2. Automated Watchdog is Broken: The production environment currently lacks an active automated watchdog. The cron job runs but fails to authenticate with Directus, rendering the monitoring system "blind" to recent failures.
  3. Significant API Lag: The 120s caching/lag in the Nuxt API for system issues is a potential risk for real-time monitoring.
  4. Data Integrity Gaps (N3): The mismatches between v_registry_counts and meta_catalog for large collections (like CAT-023) suggest that triggers might be failing or bypassed during high-volume operations.
  5. Directus Sync Discrepancy: The 200+ document difference between Directus and Agent Data indicates that the "Two-Way-Sync" is either incomplete or Directus is not the primary SSOT for all documents.

🏁 CONCLUSION

Hardening fixes from S167E (P2, P3, N1) are successfully verified and working. However, the overall integrity monitoring system has significant gaps in both coverage (Phase 1 blind spots) and operation (Phase 2 cron failures). The system follows the Amidan Philosophy but lacks the "sharp eyes" (Scanner) to capitalize on the "open gates".


Reported by Gemini CLI | Mission S167F-GEM