Skip to content

ADR 0004: Project-Owned Contracts And Artifacts

This ADR preserves the shipped decision that OMEGA business payloads, runtime task graph truth, monitoring views, and persisted mission artifacts stay behind project-owned contracts and artifact services.

Context

The orchestrator, workers, worker-private MCP adapters, and operator-facing reads share mission, task, worker, planning, route, and artifact payloads. If those payloads drift into ad hoc dictionaries, copied docs schemas, SDK internals, or runbook examples, the system loses one source for runtime graph truth, artifact-backed reads, and cross-service validation.

The shipped system already separates wire mechanics from business truth. Project-owned Pydantic models define mission requests, task nodes, worker reports, planning diagnostics, monitoring views, route constants, public DTO projections, and persisted artifact wrappers. Orchestrator storage services write those wrappers as mission truth; MissionReadService reads canonical artifacts through the omega_orchestrator.services.mission_reads facade.

Decision

OMEGA preserves project-owned contracts and artifacts as the business authority. Network payloads, runtime TaskNode truth, worker reports, planner diagnostics, monitoring views, and persisted mission artifacts must be modeled through source-owned Pydantic contracts and orchestrator-owned artifact services.

Docs, SDK adapters, route handlers, and deploy examples may reference those contracts, but they must not become parallel schema or artifact authorities.

Status

Shipped decision record originally captured for an earlier public documentation baseline.

Shipped. This decision is active for the current OMEGA contract, artifact, storage, and monitoring-read baseline and must be preserved unless superseded by a later ADR.

Consequences

  • Cross-service payload changes start in packages/contracts/src/omega_contracts/ and owning source validation, then docs are refreshed as retrieval maps.
  • Persisted mission truth stays in orchestrator storage and read services backed by shared artifact wrappers.
  • SDK wire mechanics remain implementation support; they do not define long-lived OMEGA business state.
  • Future artifact evolution needs source, docs, and any migration decision to move together.

Preserved In

Surface Path
Component docs docs/components/contracts.md, docs/components/orchestrator.md
Reference docs docs/reference/contracts-index.md, docs/reference/artifacts-and-storage.md, docs/reference/routes.md
Contract source packages/contracts/src/omega_contracts/
Storage source apps/orchestrator/src/omega_orchestrator/services/mission_storage/, apps/orchestrator/src/omega_orchestrator/services/mission_reads/
Route source apps/orchestrator/src/omega_orchestrator/mission_api.py

Supersession Rule

Future work that changes this decision must add a superseding ADR and update the preserved source and docs references in the same change.

Do not silently drift source, docs, or runbooks away from this record.

Source Of Truth

Concern Source-owned truth
Shared contract models and route constants packages/contracts/src/omega_contracts/
Contract retrieval index docs/reference/contracts-index.md
Artifact and storage retrieval index docs/reference/artifacts-and-storage.md
Mission artifact wrappers and task-attempt ledgers packages/contracts/src/omega_contracts/mission_artifacts.py
Runtime task graph contract packages/contracts/src/omega_contracts/task_graph.py
Mission storage and read services apps/orchestrator/src/omega_orchestrator/services/mission_storage/, apps/orchestrator/src/omega_orchestrator/services/mission_reads/ with omega_orchestrator.services.mission_reads.MissionReadService as the stable facade
Storage exposure and private debug split StorageExposure in apps/orchestrator/src/omega_orchestrator/services/mission_storage/catalog.py; planning_trace is the only active PUBLIC_PROJECTED slot and planner_outputs/private_debug/raw_responses.json remains private debug

Out Of Scope

  • Copying contract field lists, generated schemas, artifact examples, or route payload bodies into docs as canonical truth.
  • Treating SDK internals, raw provider responses, or runbook examples as mission business authority.
  • Introducing database, remote object storage, dual-write persistence, or artifact schema migration behavior as shipped current truth.
  • Moving mission-level realtime transport contracts into the current artifact or monitoring-read baseline.