Pipeline Lock: Lock down your inference contract
Pipeline Lock guarantees that inference requests can't silently diverge from your expected input and preprocessing contract. Add it to your deployment config to enforce schema, feature names, ordering, and artifact checksums.
What it does
- **Request schema** — JSON shape validation (strict mode rejects extra fields)
- **Feature contract** — Names, count, ordering for tabular or text inputs
- **Artifact integrity** — Checksums verified at worker boot (prevents stale preprocessing)
- **Modes** — enforce (block), warn (allow + annotate), or off
Quick config
Add `pipeline_lock` to your deployment config (clean, declarative shape):
{
"pipeline_lock": {
"contract_version": "1.0",
"mode": "enforce",
"schema": {
"strict": true,
"input_schema": {
"type": "object",
"required": ["prompt"],
"properties": { "prompt": { "type": "string" } },
"additionalProperties": false
}
},
"features": { "type": "text" },
"policies": { "actions": { "on_violation": "block" } }
}
}Tabular inputs
For models with multiple features (e.g. age, income), use a tabular feature contract:
{
"features": {
"type": "tabular",
"features": [
{ "name": "age", "dtype": "number" },
{ "name": "income", "dtype": "number" }
],
"ordering": "strict",
"additional_features_policy": "reject"
}
}Object input `{"age": 30, "income": 50}` is canonicalized to feature order. Array input `[30, 50]` must match exactly (use `input_path: "data"` when the API wraps arrays).
Dashboard
The Pipeline Lock panel in your dashboard shows mode, blocked/warned counts, top violation codes, and schema diff. Check it when tuning your contract.