Skip to content

Layer dependencies

drtml → contracts / storage.plan → db | storage → processing → telemetry | integration
Edge Meaning
drtml → storage.plan compile emits plans, does not I/O
storage → db transport only (PG/Qdrant)
processing → storage session/feed orchestration
processing → db glue only (poller / registry sync)
telemetry ← * DTO in → emit; SQL codegen is static
From To Why
storage processing, telemetry, integration I/O must not know runners/metrics
db processing, telemetry keep transport pure
telemetry processing emit must not pull orchestration
contracts heavy layers DTOs without I/O

Allowlist: db/postgres/connection.py and db/qdrant/connection.pyintegration.env (DSN).

Module DTO
saturation_slices.py saturation / homogeneity slices
dataset_metric_rows.py rows for metric evaluate
worker_metric_delta.py multi-worker metric merge

Storage/processing emit raw stats → DTO → telemetry emit.

Registry Where Why
Dataset write/read storage/dataset/backend_registry.py parquet/pg/qdrant/neo4j
Pattern / mode runners processing/dispatch.py no if-forest
Metric methods algorithms/dataset_metric_registry.py python + postgres_proc + qdrant
Terminal window
pytest drtoller/framework/dev/tests/test_layer_import_boundaries.py -q
pytest drtoller/framework/dev/tests/test_dataset_backend_adapter.py -q

Contract test: a fake in-memory backend registers and accepts session.write via the registry.