--- title: "CIP execution" slug: "build-ai-ready-systems-publish-certify-cip-execution" description: "Certify CIP runtime execution — testPayload, CLI ladder, failure diagnosis, and how CIP relates to Operational Trust and governed capabilities." tags: ["Integration", "Cip", "Developer", "Integrator"] updated: 2026-11-30T18:45:07Z published: 2026-11-30T18:45:07Z canonical: "docs.aifabrix.ai/build-ai-ready-systems-publish-certify-cip-execution" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.aifabrix.ai/llms.txt > Use this file to discover all available pages before exploring further. # CIP execution **CIP (Composable Integration Pipeline)** runs governed Business Entity operations at runtime — `list`, `get`, `create`, `update`, `upsert`, `delete`, and custom capability keys — with the caller's identity, RBAC/ABAC, and audit context applied before any vendor API call. Author pipelines on [Configure data flow](/docs/build-ai-ready-systems-business-entities-configure-data-flow). This page is the **runtime + certification** companion: mental model, generated vs extended CIP, **`testPayload`**, and the CLI proof ladder. ## Why it matters Role Assistants do not call vendor APIs directly. They request **compiled capability keys**. CIP is the execution layer that honors those keys: Operational Trust checks first, then ordered steps, then normalized records for sync, evidence hooks, and agent metadata. Without a valid **`execution`** block on each exposed Business Entity, certification and live capability requests fail even when OpenAPI import succeeded. **CIP is not** Runtime continuation (Decision Engine, Ask/Approval, Review Workspace). Those consume CIP results; they do not replace `execution.cip`. ## Prerequisites - Business Entity JSON with root **`capabilities[]`** and **`exposed`** aligned to **`resourceType`** - Schema-valid **`execution`** per [Configure data flow](/docs/build-ai-ready-systems-business-entities-configure-data-flow) - [Governed capabilities](/docs/build-ai-ready-systems-publish-certify-capabilities) understood - Green **`aifabrix validate <systemKey>`** before integration or E2E tests ## Where it lives | Layer | Location | | --- | --- | | CIP operations and steps | `<datasourceKey>.json` → **`execution.cip.operations`** | | OpenAPI step bindings | Same file → **`openapi.operations`** | | Test fixtures for E2E | Same file → **`testPayload`** | | UI editing | Business Entity **Data Flow** tab (`?tab=cip`) | CIP is **per Business Entity**, not on the Connected System manifest. ## How to set 1. **Start from generated execution** — OpenAPI import usually produces default CIP for standard operations. Extend only for pagination, `map`/`filter`, `http` fetches, or multi-datasource orchestration. Step reference: [CIP step catalog](/docs/build-ai-ready-systems-build-reference-cip-step-catalog). 2. **Keep binding law intact** after edits — capability key = CIP operation key; `fetch.openapiRef` = `openapi.operations` key when `source: openapi`. 3. **Declare `shape: "upsert"` only when CIP should resolve create versus update.** An upsert operation composes exactly one `create` half and one `update` half for the same datasource. CIP resolves existence once, checks permission for the selected action, and fails closed rather than falling back to the other action. Use separate create and update operations when the caller already knows which action applies. For a custom read, declare `shape: "list"` when it returns several records or `shape: "get"` when it returns one record. Core `list`, `search`, and `get` operations already carry those shapes. A different custom read with no read shape returns one result and is invoked by its own operation name. When an operation `input` property holds a system key, declare it with `x-aifabrix-refersTo`: `existingSystem` for a system the caller can see, `newSystemKey` for the key of a system the operation creates. Publish accepts the keyword only on `type: string` input properties. See [Configure CIP argument keys](/docs/build-ai-ready-systems-business-entities-configure-cip-argument-keys). 4. **Add production-grade `testPayload`** — E2E and integration tests merge CLI flags with manifest fixtures. Without **`testPayload`**, capacity/CRUD paths may fail at the config step. Mapping vs row gold, `listWindow`, and write `input` shape: [Configure validation and test payload](/docs/build-ai-ready-systems-business-entities-configure-validation-test-payload). ``` { "testPayload": { "mode": "live", "primaryKey": { "externalId": "e2e-fixture-001" }, "useCopyForMutations": true, "payloadTemplate": { "externalId": "e2e-fixture-001", "name": "E2E Customer", "country": "Finland" }, "expectedResult": { "externalId": "e2e-fixture-001", "name": "E2E Customer", "country": "Finland" }, "scenarios": [ { "operation": "list", "enabled": true }, { "operation": "get", "enabled": true }, { "operation": "create", "enabled": true, "input": { "name": "E2E Customer" } }, { "operation": "update", "enabled": true, "input": { "country": "Sweden" } }, { "operation": "delete", "enabled": true } ] } } ``` | `testPayload` field | Production practice | | --- | --- | | **`primaryKey`** | Concrete values for list/get/mutations; use **`primaryKey.search`** when resolving a row via list | | **`payloadTemplate` / `expectedResult`** | Mapping: one-record **shape** after fieldMappings — not SUM/COUNT | | **`scenarios`** | Ordered operation evidence; disable destructive steps in shared tenants with **`enabled: false`** | | **`expectedRows` + `identityKey`** | Capacity gold for list, get, and named viewpoint answers | | **`listWindow`** | List **probe** (`page` / `pageSize`); does not change live `paginate.maxPages` | | **`useCopyForMutations`** | Default **true** when create runs — merges returned ids into later get/update/delete | | **`mode`** | **`live`** for certification; **`mock`** for offline unit tests only | 1. **Re-validate after execution edits**: ``` aifabrix validate aifabrix test ``` 1. **Run integration then E2E** (test credentials and isolated tenants): ``` aifabrix test-integration aifabrix datasource test-e2e --app ``` Use **`--primary-key-value @pk.json`** when reusing an existing vendor record. Prefer **`--verify-audit`** when governance audit proof is required. 1. **Certify operations** — green E2E with enabled write scenarios when capabilities mutate external data, including an isolated upsert fixture when exposed, then **`verify-operations`**. ## Defaults and examples | Guideline | Reason | | --- | --- | | Prefer generated CIP first | Matches OpenAPI; easier to validate | | Keep pipelines entity-scoped | Clear ownership and certification boundaries | | Operation keys match capability keys | Including custom keys with the same naming pattern | | Upsert is explicit | `shape: upsert` composes the datasource's standard create and update operations; it is never inferred from step names | | Author `testPayload` before first E2E | Avoids config-step failures | | Re-upload after execution changes | Online drift breaks **`verify-operations`** | Root identity required before execution compiles: | Field | CIP impact | | --- | --- | | **`key`** | Pipeline ownership | | **`systemKey`** | Auth and connection context | | **`entityType`** | Sync/normalization path | | **`resourceType`** | Capability and RBAC prefix | | **`primaryKey`** | CRUD identity and **`testPayload.primaryKey`** | For a keyed document operation, test `get` with `--primary-key-value <key>` and `--strict-capability-scope`. Retain the execution ID and sanitized file metadata; verify persistence and allowed/denied visibility. Simulation or an unexecuted `get` is not proof. Follow [Build a document storage entity](/docs/build-ai-ready-systems-business-entities-guides-build-document-storage-entity) for the binary/documents configuration. ## Validate ``` aifabrix validate aifabrix test-integration aifabrix verify-operations aifabrix datasource test-e2e --app ``` Bypassing capabilities to call vendor APIs directly from agents breaks Operational Trust — route through compiled capability keys and CIP. ### Failure diagnosis | Symptom | Likely cause | Fix | | --- | --- | --- | | Validate fails on steps | Invented step key or missing required property | [Step catalog](/docs/build-ai-ready-systems-build-reference-cip-step-catalog) + schema | | Runtime fetch errors | `openapiRef` mismatch | Align with **`openapi.operations`** | | Capability not executable | CIP `enabled: false` or missing operation | Enable matching operation + capability | | Wrong engine | `python`/`datasource` without entrypoint or chain | Prefer **`engine: cip`** unless intentional | | Legacy shape | `pipeline` instead of `cip.operations` | Migrate to **`execution.cip`** | ## Common mistakes | Mistake | Impact | Fix | | --- | --- | --- | | Missing **`testPayload`** | E2E config step fails | Add **`primaryKey`**, template, and scenarios | | Treating mapping `expectedResult` as totals | Wrong proof | Author `scenarios[].expectedRows` | | Custom CIP without E2E | Operations cert fails on live API | **`datasource test-e2e`** | | Wrong execution shape | Validate errors | **`execution.engine: cip`** + **`execution.cip.operations`** | | OpenAPI ref mismatch | Runtime fetch errors | Align **`openapiRef`** | | Bypassing capabilities | Ungoverned AI access | Route through compiled capabilities | | Editing CIP without re-upload | Online drift | **`upload`** + **`show --online`** | ## Limits Authoring depth lives on [Configure data flow](/docs/build-ai-ready-systems-business-entities-configure-data-flow) and the [CIP step catalog](/docs/build-ai-ready-systems-build-reference-cip-step-catalog). This page does not list every step property. Complex multi-entity orchestration belongs in separate Business Entities linked by **`foreignKeys[]`**. Keep custom steps idempotent when write scenarios run. ## Related - [Configure data flow (CIP execution)](/build-ai-ready-systems-business-entities-configure-data-flow.md) - [CIP step catalog](/build-ai-ready-systems-build-reference-cip-step-catalog.md) - [Governed capabilities](/operational-trust-governed-capabilities.md) - [CLI workflow reference](/build-ai-ready-systems-validate-test-cli-workflow.md) - [Configure agent metadata and trust](/build-ai-ready-systems-publish-certify-configure-agent-metadata-trust.md) - [Configure CIP argument keys](/build-ai-ready-systems-business-entities-configure-cip-argument-keys.md) - [Configure validation and test payload](/build-ai-ready-systems-business-entities-configure-validation-test-payload.md)