0007 Inference Lifecycle And Ownership
Separate Inference Semantics, Execution, and Acceptance
Section titled “Separate Inference Semantics, Execution, and Acceptance”Status: accepted
Inference uses one deep runtime interface backed by four semantic lifecycle records: provider-independent requests, immutable model attempts, deterministic validation findings, and append-only acceptance decisions. Task contracts define what is requested; execution profiles define how a model is called; routes select the active contract/profile and dispatch policy. Dagster orchestrates meaningful cohorts and async completion runs, while Postgres stores row-level lifecycle state. Every provider-calling domain asset has an independent typed enabled=false gate and finite cohort cap; graph selection alone is never authorization to spend.
Direct structured output is the initial protocol. Only production results accepted under the active acceptance-policy hash are reusable or projectable; evaluation attempts, including repeated samples, never leak into production reuse. Transport retries remain inside an attempt rather than inventing a second role. Provider success, parse success, and schema validity are not acceptance. Model/provider settings and transport do not enter request identity; they enter attempt identity. Evidence projections retain the acceptance decision id and their own projection revision.
Considered Options
- Keep one mutable task matrix and one overloaded
llm_callscache/ledger table. - Model every model row as a Dagster asset partition and ingest async results inside the polling sensor.
- Default to agentic JSON editing, multi-model consensus, or a producer/verifier chain.
- Separate semantic request, execution attempt, validation finding, and acceptance decision while keeping advanced protocols eval-gated.
Consequences
Prompt/schema changes create immutable task-contract revisions. Provider/model retunes create profiles and new attempts without changing semantic request identity. Validator or decision-policy changes invalidate old-policy reuse. In-flight batches retain exact contract and profile snapshots, and an atomic local claim keyed to the Dagster run/asset survives op retries without collapsing deliberate re-executions. Sensors poll external state and launch deduplicated ingestion runs instead of hiding data writes. Generic ingestion owns lifecycle rows only; each slice owns immutable projection receipts separately from deterministic source claims, including receipts for accepted empty outputs. Consensus, repeated sampling, LLM verifiers, free-draft packaging, and agentic editing remain extension points that require representative evaluation evidence.