KB-600C rev 3

Registry Sync Report

5 min read Revision 3
registrysyncreportdirectusflows

Registry Sync Report

Date: 2026-03-06 Mission: REGISTRY-SYNC Status: COMPLETE

Summary

18 Directus Flows created to sync 6 registry collections from Directus -> Agent Data. All tests PASSED. Anti-loop safety CONFIRMED.

event_system.py Analysis

  • Location: agent_data/event_system.py + agent_data/directus_sync.py
  • Events fired for ALL document CRUD: document.created, document.updated, document.deleted
  • No prefix filtering in event_system.py itself
  • directus_sync.py line 44: _SYNC_PREFIXES = ("knowledge/",) -- only knowledge/* documents trigger reverse sync
  • registries/* prefix is SAFE -- no loop risk

Flows Created (18)

# Flow Name Collection Doc ID Pattern
1 [DOT-REG] Table Registry Create -> AD table_registry registries/table_registry/{table_id}
2 [DOT-REG] Table Registry Update -> AD table_registry registries/table_registry/{table_id}
3 [DOT-REG] Table Registry Delete -> AD table_registry registries/table_registry/tbl-{id}
4 [DOT-REG] Workflows Create -> AD workflows registries/workflows/wf-{id}
5 [DOT-REG] Workflows Update -> AD workflows registries/workflows/wf-{id}
6 [DOT-REG] Workflows Delete -> AD workflows registries/workflows/wf-{id}
7 [DOT-REG] Workflow Steps Create -> AD workflow_steps registries/workflow_steps/ws-{id}
8 [DOT-REG] Workflow Steps Update -> AD workflow_steps registries/workflow_steps/ws-{id}
9 [DOT-REG] Workflow Steps Delete -> AD workflow_steps registries/workflow_steps/ws-{id}
10 [DOT-REG] WCR Create -> AD workflow_change_requests registries/workflow_change_requests/wcr-{id}
11 [DOT-REG] WCR Update -> AD workflow_change_requests registries/workflow_change_requests/wcr-{id}
12 [DOT-REG] WCR Delete -> AD workflow_change_requests registries/workflow_change_requests/wcr-{id}
13 [DOT-REG] Workflow Categories Create -> AD workflow_categories registries/workflow_categories/wcat-{id}
14 [DOT-REG] Workflow Categories Update -> AD workflow_categories registries/workflow_categories/wcat-{id}
15 [DOT-REG] Workflow Categories Delete -> AD workflow_categories registries/workflow_categories/wcat-{id}
16 [DOT-REG] Step Relations Create -> AD workflow_step_relations registries/workflow_step_relations/wsr-{id}
17 [DOT-REG] Step Relations Update -> AD workflow_step_relations registries/workflow_step_relations/wsr-{id}
18 [DOT-REG] Step Relations Delete -> AD workflow_step_relations registries/workflow_step_relations/wsr-{id}

Test Results

Sync Tests (update Directus -> verify AD received)

Collection Record Result
table_registry #1 tbl_workflow_list PASS
workflows #1 WF-001 PASS
workflow_steps #6 task_submitted PASS
workflow_change_requests #1 PASS
workflow_categories #1 C1-GEN PASS
workflow_step_relations #5 PASS

Anti-Loop Test

  • Method: Updated Directus records -> AD received docs -> checked AD container logs
  • Result: PASS
  • Evidence: 0 reverse sync attempts for registries/* documents in AD logs
  • Reason: directus_sync.py _SYNC_PREFIXES = ("knowledge/",) filters out registries/*

Architecture

Sync direction: ONE-WAY (Directus -> Agent Data) Reverse blocked by: prefix isolation (registries/* not in _SYNC_PREFIXES)

Directus Collection Agent Data Path
table_registry registries/table_registry/{table_id}
workflows registries/workflows/wf-{id}
workflow_steps registries/workflow_steps/ws-{id}
workflow_change_requests registries/workflow_change_requests/wcr-{id}
workflow_categories registries/workflow_categories/wcat-{id}
workflow_step_relations registries/workflow_step_relations/wsr-{id}

DOT Tool

Script: dot/bin/dot-flow-setup-registry-sync

  • Idempotent (safe to re-run)
  • Supports --local, --cloud, --dry-run
  • Log-first pattern (no isolated-vm dependency)
  • Split create/update for trigger variable compatibility

Notes

  • modules collection not found in Directus (403) -- excluded from sync
  • All test markers removed after verification
  • No changes to event_system.py or directus_sync.py required