openlogos approve
openlogos approve records a human approval for deploying one exact commit to an environment that sets require_approval: true in logos/environments.yaml. openlogos deploy refuses to deploy such an environment with DEPLOY_APPROVAL_REQUIRED until a matching, unused approval exists.
Synopsis
Section titled “Synopsis”openlogos approve --env <id|alias> --ref <revision> [--note <text>] [--format json]Run from the project root. No active proposal is required.
Options
Section titled “Options”| Option | Description |
|---|---|
--env <id|alias> | Target environment (required). It must set require_approval: true. |
--ref <revision> | Commit to approve (required), resolved with git rev-parse <revision>^{commit} to a full 40-character commit. |
--note <text> | Optional note stored with the approval. |
--format json | Structured JSON envelope. |
What it does
Section titled “What it does”- Writes one
kind=approvalrecord to the local deployment ledgerlogos/.openlogos-runtime/deployments.jsonl, with a newapproval_id, the commit, the original--reftext, the approver (git config user.name <user.email>, display only — not authentication) and the note. - Idempotent: if the environment already has an unused approval for the same commit, it returns that approval with
created=falseand writes nothing. Concurrent runs write a single record. - An approval is bound to one exact commit and is used by the first successful deployment of that commit to that environment. Deploying the same commit again needs a new approval; an approval for another commit never unlocks this one. Failed or unknown deployments do not use it.
- There is no revoke or expiry.
openlogos env show <id> lists unused approvals under open_approvals.
Human-only
Section titled “Human-only”openlogos approve is a guard-restricted command. When an AI assistant tries to run it, the host shows its native approval prompt (and blocks it in unattended modes). Run it yourself in a terminal — for example ! openlogos approve --env prod --ref v1.2.0 in Claude Code — or from the RunLogos interface. Unattended --auto runs stop at environments that require approval and continue after you approve and re-drive them.
Example
Section titled “Example”openlogos approve --env prod --ref v1.2.0 --note "release checklist signed off"{ "command": "approve", "data": { "environment": "prod", "approval_id": "3b0c…", "created": true, "ref": "<40-character commit>", "ref_input": "v1.2.0" } }Running the same command again before the deployment returns the same approval_id with "created": false.
Errors
Section titled “Errors”| Error code | Cause |
|---|---|
ENV_REGISTRY_NOT_FOUND / ENV_REGISTRY_INVALID | No registry, or the registry is invalid |
ENV_REQUIRED / ENV_UNKNOWN | --env missing or not resolvable |
APPROVAL_NOT_REQUIRED | The environment does not set require_approval: true |
APPROVAL_REF_REQUIRED | --ref missing |
ENV_REF_UNRESOLVED | The revision does not resolve to a commit |
APPROVAL_WRITE_FAILED | Appending to the ledger failed (including lock timeout); the ledger is unchanged |
Related commands
Section titled “Related commands”deploy— Deployment with promotion and approval gatesenv—open_approvalsand the environment view- Environments —
require_approval,promote_fromand the ledger