KB-445E

S136D Quick Wins Report

2 min read Revision 1
reports136drules-engine

S136D Quick Wins Report

Session: S136D | Date: 2026-03-19 | Status: COMPLETE

Assembly Gate

Cau 0: YES — Fix data = PG level. Health Check = bash script.

Rule 1 Identity (7 -> 0)

Root cause: 6 virtual/aggregate entities (CAT-ALL, CAT-BLD, etc.) with identity_class=virtual were being checked. 1 managed entity (CMT) had non-standard but valid code format. Fix: Updated fn_rule_identity_violations to only check managed entities + relaxed regex to accept PREFIX-style codes.

Rule 6 Birth Control (6 -> 0)

Root cause:

  • meta_catalog id=1 (CAT-000): First catalog entry, predates DOT system. No _dot_origin.
  • dot_tools 109-112: Migration entries from S127D. Had _dot_origin but NULL date_created.
  • task_comments 1556: Created via Directus flow. Flows dont set _dot_origin. Fix: Set _dot_origin=MIGRATION-S136D|agent|2026-03-19 for legacy entries. Set date_created for DOT-109 to 112.

Rule 10 Traceability (1 -> 0)

Root cause: Same as Rule 6 - meta_catalog id=1 missing _dot_origin. Fix: Resolved by Rule 6 fix.

Health Check Integration (CHECK 11)

Added CHECK 11 Universal Rules Engine to Health Check workflow:

  • Reads latest fn_run_all_rules() results from Directus API
  • Shows per-rule violation counts with blocking/warning status
  • INFO mode only (does not fail check) during Phase 2 transition
  • Fixed bash glob issue with URL-encoded filter brackets

Verification

# Check Result
1 Rule 1 violations = 0 PASS
2 Rule 6 violations = 0 PASS
3 Rule 10 violations = 0 PASS
4 Root cause documented PASS
5 fn_run_all_rules delta = -14 PASS (1673 -> 1659)
6 Health Check CHECK 11 PASS (GREEN with rules output)
7 Smoke test 17/17 PASS
8 verify_counts 0 mismatch PASS (19/19 OK)

PRs

  • PR #546: Add CHECK 11 + fix Rule 1/6/10
  • PR #547: Fix CHECK 11 bash glob issue