Promote commit to production
promote_commitMake a commit (by job_id) the project's canonical (production) deploy, optionally exposing it publicly. The previously-canonical commit keeps running but loses the production URL. Pass mode="guarded" to run an SLO canary against the current canonical first and block for a verdict before finalizing (see the mode field for details); omit it (or pass "manual") for the previous instant-flip behavior. Requires a read-write token.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | 'manual' (default) flips canonical immediately. 'guarded' runs an SLO canary first — paired synthetic probes vs the current canonical plus error-log rate plus I2 canonical-coherence, over a stability window — and blocks until a verdict: PASS finalizes the same as manual, FAIL restores the candidate and aborts (no data lost), INSUFFICIENT_SIGNAL parks the run for a human to resolve (no HTTP/MCP confirm tool yet — resolve from the dashboard). Returns run_id/state/verdict either way. | |
| expose | No | when true, also make the commit public | |
| job_id | Yes | the deployment job id to promote to canonical (from list_deployments) | |
| public | No | alias of expose, the name expose_commit uses; true also makes the commit public | |
| project_id | No | optional; when given it must be the project that owns job_id | |
| keep_old_canonical | No | opt-in flag for storage v2: keep the outgoing canonical commit running on a clone of main (default false) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| mode | No | ||
| state | No | ||
| run_id | No | ||
| status | No | present, and always "pending_approval", only when this call was parked instead of run immediately because the project's (or kad-back's own) plan-mode setting requires a human to approve it first | |
| message | Yes | ||
| plan_id | No | poll get_plan_status with this id for the eventual outcome | |
| verdict | No | ||
| approve_at | No | the kad.dev dashboard URL a human approves or rejects this plan from | |
| expires_in_s | No | the plan can no longer be approved after this many seconds | |
| candidate_job_id | No | ||
| prev_canonical_job_id | No |