Layer Boundaries

This page is the English checklist for the architecture rule recorded in ADR-0001 Runtime Model And Layer Boundaries. The canonical project standard is Developer 指南.

Owner Layers

Layer

Owner paths

Owns

L0 Backend

unisim.backend

Physics backend abstraction, backend-owned scene materialization, backend capabilities.

L1 Env

src/unilab/envs/, src/unilab/base/torch_env.py

MDP semantics, observations, rewards, reset logic, backend-to-task adaptation.

L2 Config and Registry

src/unilab/conf/, src/unilab/structured_configs.py, src/unilab/base/registry.py, src/unilab/training/reward.py

Hydra composition, owner YAML identity, env/reward registration.

L3 Algo and IPC

src/unilab/rl/algos/, src/unilab/rl/runtime/ipc/

Learners, runners, collectors, replay and rollout buffers, weight sync.

L4 Scripts

scripts/

Entrypoint assembly only.

Rules

  • Fix behavior at the owner layer. A training script should not carry long-term env, backend, reward, or algorithm business rules.

  • Env code may depend on the declared SimBackend contract in unisim.backend.base; if shared env logic needs a new backend capability, add it to SimBackend before using it.

  • Config choices should stay in Hydra owner YAMLs under src/unilab/conf/, not in Python-side backend switches.

  • Asset, XML, and model metadata work belongs on init, materialization, or cache paths. Do not move asset parsing into step(), reset(), or runtime domain randomization loops.

Evidence In Repo