rdt-model-compile
rdt-model-compile is the pipeline orchestrator. It spawns all rdt-model-* module binaries
in the correct phase order, captures their JSON result envelopes, and aggregates results.
No generators, templates, or schemas live here — those belong in the module that owns each artifact.
| Property | Value |
|---|---|
| Binary | rdt-model-compile |
| Pipeline phase | Orchestrator (invokes all phases) |
| Depends on | All module binaries available on $PATH |
| Network | None (delegates to child modules) |
| Threading | Pattern A (async — spawns child processes in parallel within each phase) |
Subcommands
Section titled “Subcommands”| Subcommand | Description |
|---|---|
run | Execute the full 6-phase pipeline for an entity |
run --phase <name> | Execute a single phase only |
run --workspace <path> | Run with workspace isolation (modules write to workspace, not repo) |
promote --workspace <path> | Copy artifacts from workspace to final repo paths after a successful run |
status | Show pipeline status for an entity (not yet implemented) |
Execution semantics
Section titled “Execution semantics”- Phases run sequentially: Ingest → Enrich → Prepare → Deploy → Register → Support
- Modules within the same phase run in parallel (
futures::join_all) - If ALL required modules in a phase fail → pipeline stops (status: Error)
- Optional module failures (profile, infer) never block the pipeline
--dry-run→ logs planned invocations, returns synthetic Skipped results--json→ emitsPipelineResultto stdout
Dry-run the full pipeline
Section titled “Dry-run the full pipeline”cargo run -p rdt-model-compile -- --target dev --entity waste-tracking --dry-run runRun a single phase
Section titled “Run a single phase”cargo run -p rdt-model-compile -- --target dev --entity waste-tracking run --phase deployRun with workspace isolation
Section titled “Run with workspace isolation”cargo run -p rdt-model-compile -- --target dev --entity waste-tracking \ run --workspace /tmp/rdt-waste-tracking-testModules write to the workspace instead of directly to repo paths. Combine with promote for atomic deployments.
Promote artifacts to repo
Section titled “Promote artifacts to repo”cargo run -p rdt-model-compile -- --target dev --entity waste-tracking \ promote --workspace /tmp/rdt-waste-tracking-testCopies workspace artifacts to their canonical repo paths. Only promotes files that exist — optional modules that didn’t run are skipped.
JSON output for automation
Section titled “JSON output for automation”cargo run -p rdt-model-compile -- --target dev --entity waste-tracking --json run --dry-runReturns a PipelineResult JSON envelope with per-phase and per-module status.
Global flags
Section titled “Global flags”| Flag | Short | Env | Description |
|---|---|---|---|
--target | -t | RDT_TARGET | Required. dev, test, or prod |
--entity | -e | — | Entity slug (required) |
--workspace | — | — | Enable workspace isolation mode |
--run-id | — | RDT_RUN_ID | Pipeline correlation ID (auto-generated if omitted) |
--dry-run | -n | — | Skip all side-effects |
--json | — | — | Emit structured PipelineResult to stdout |
--quiet | -q | — | Suppress informational output |
Pipeline phases
Section titled “Pipeline phases”| # | Phase | Modules | Optional |
|---|---|---|---|
| 1 | Ingest | pull, profile | profile |
| 2 | Enrich | govern, infer | infer |
| 3 | Prepare | validate | — |
| 4 | Deploy | store, policy, api, mcp, sdk, contract | — |
| 5 | Register | register, snowflake-horizon, rdm, gupri, search | — |
| 6 | Support | docs, cidb, event | — |
Error handling
Section titled “Error handling”The orchestrator captures errors from child modules and reports them in the result envelope.
A phase-level failure (all required modules fail) halts the pipeline immediately.
Individual module failures within a phase produce a Partial status but allow the pipeline
to continue if at least one required module succeeds.
Multi-entity orchestration
Section titled “Multi-entity orchestration”For running multiple entities in parallel via CI, see:
- Running Multi-Entity Pipelines — practical guide
- Pipeline Configuration — entity list, manifest schema, environment variables