Layer dependencies
Canonical rules: Principles → Framework layers.
Ownership map, anti-leak rules, and “where to put new logic” live there.
drtml → contracts / storage.plan → db | storage → processing → telemetry | integrationReverse edges (storage → processing|telemetry, telemetry → processing, heavy imports from contracts/) are forbidden.
Connection modules read environment through runtime/env.py; db does not depend on integration.
contracts/ (examples)
Section titled “contracts/ (examples)”| Module | DTO |
|---|---|
saturation_slices.py |
saturation / homogeneity slices |
dataset_metric_rows.py |
rows for metric evaluate |
worker_metric_delta.py |
multi-worker metric merge |
mapping_build.py |
mapping build result and stats |
reduce_merge.py |
reduce/merge result and stats |
embed_train_stats.py |
embed-train runtime statistics + public dict |
embed_train_metric_catalog.py |
live/final embed-train gauge names |
observation_window.py |
bounded observation-window DTO |
dataset_metric_window.py |
dataset metric checkpoint window |
Registries
Section titled “Registries”| Registry | Where |
|---|---|
| Dataset write/read | storage/dataset/backend_registry.py |
| Pattern / mode runners | runtime/pattern_runners.py |
| Parallel transports | partition_loop/parallel/backend_registry.py |
| Metric methods | algorithms/dataset_metrics/registry.py |
# from DrToller.Framework repo rootpytest dev/tests/architecture/test_layer_import_boundaries.py -qpytest dev/tests/storage/test_dataset_backend_adapter.py -qSee also: Principles, Anti-patterns.