ADR-0007: Data handoff: execution units, inlining, intermediates¶
Architecture: Section 8, ADR-0007
Context¶
With boundary: task, each unit runs in its own process or orchestrator task, so no in-memory or temporary-view handoff is possible (lesson L7).
Options¶
- Persisted intermediates everywhere. Simple, but costs IO.
- Inlining everywhere. No extra IO, but recomputes shared work.
- A hybrid, decided at compile time.
Decision¶
The hybrid.
ephemeralmodels are inlined. Their bodies run inside each consuming unit. Underboundary: processthe result is memoized per run, so it is computed once.intermediatemodels are persisted to<artifacts.root>/runs/<run_id>/intermediate/<model>(or a scratch schema the catalog provides). Finalize deletes them afterintermediate_ttl.viewcreates a catalog view where the engine supports it, never a session view.
Consequences¶
- The same plan runs in one process or many.
- PLP406 warns when an ephemeral model fans out to more than
ephemeral_fanout_warn(default 3) units and suggestsintermediate.
Status¶
Accepted
Date¶
2026-10-29