Skip to content

openlogos deploy-done

After verify passes (Gate 3.6) and a human has confirmed the deployment, openlogos deploy-done records the completion in a controlled way. This closes Gate 3.7 (deployment done, deployment report present, deployment marker written). It re-checks that verify passed, that the proposal actually requires deployment, and that the [deploy] tasks and the deployment report exist — only then does it check off the deploy tasks, write the DEPLOY_DONE marker, and clear any stale smoke markers.

Terminal window
openlogos deploy-done [--env <name>] [--ref <git revision>] [--format json]

Must be run from the project root, with an active change proposal (guard file present).

deploy-done records a deployment that was carried out by someone else (a person, a CI pipeline, a tag-driven release). If the environment has a deploy configuration in logos/environments.yaml, prefer openlogos deploy: on the proposal channel it runs the deployment and records completion in one step.

OptionDescription
--env <name>Target environment recorded with the completion (for example staging). Without a registry this is a free-form label; when logos/environments.yaml exists it must be an environment id or alias and is required.
--ref <git revision>The version that was actually deployed (tag, branch or commit). It is resolved to a full 40-character commit and recorded in DEPLOY_DONE and the deployment ledger. Omitted → the version is recorded as unknown (null); HEAD at call time is never used as a substitute.
--format jsonOutput a structured JSON envelope for tools such as RunLogos.
  • Confirms verify passed — evaluated against the resolved verify node’s per-field predicate (marker VERIFY_PASS/VERIFY_FAIL, or a cmd:-gate), replacing a hard-coded marker check
  • Requires an active proposal whose deployment decision resolves to “deployment required” (fails on a decision conflict or when deployment is not required)
  • Requires a [deploy] task section in tasks.md and the deployment report at logos/resources/verify/deployment-report.md
  • Checks off every task in the [deploy] section of tasks.md
  • Writes the logos/changes/<slug>/DEPLOY_DONE marker
  • Clears any stale SMOKE_PASS / SMOKE_FAIL markers from a previous run
  • Reports next_step: ready-to-smoke (run openlogos smoke) or deploy-done (run openlogos archive)

This is a human-triggered, one-shot command — it fails loud on any missing precondition rather than partially recording completion.

Environment registry and deployment ledger

Section titled “Environment registry and deployment ledger”

When the project has a logos/environments.yaml registry (see Environment Registry):

  • --env is resolved against environment ids first, then aliases (case-insensitive); an unknown value fails with ENV_UNKNOWN, a missing one with ENV_REQUIRED. There is no “only one environment, so pick it” default.

  • DEPLOY_DONE is written as a single JSON line, rewritten on every run:

    {"deploy_id":"6f1c…","environment":"prod","ref":"<40-char commit>","ref_source":"explicit","recorded_at":"2026-10-14T08:00:00.000Z"}
  • A deploy record is appended to the local deployment ledger logos/.openlogos-runtime/deployments.jsonl (the same ledger used by smoke --env, deploy and env). The ledger is written first and DEPLOY_DONE last, so a marker on disk always has its ledger record; if any step fails, tasks, markers and the ledger line are restored and the command ends with DEPLOY_DONE_WRITE_FAILED.

  • --format json adds a deployment object (deploy_id, environment, ref, ref_source, observed_head, ledger_written).

  • Environments with promotion or approval gates (promote_from, or require_approval: true) cannot be recorded by hand: deploy-done --env refuses them with DEPLOY_DONE_GATED_ENV. Deploy those environments with openlogos deploy, which checks the gates first.

Without a registry, deploy-done behaves exactly as before: --env is stored as a plain label and no ledger is written.

Terminal window
openlogos deploy-done --env staging
OpenLogos deploy-done
Proposal: add-notify-webhook
Environment: staging
Marker: logos/changes/add-notify-webhook/DEPLOY_DONE
Deployment tasks: 3/3
Cleared stale smoke markers: -
Next: explicitly request `openlogos smoke --env staging`.

If the proposal does not need smoke, the last line suggests openlogos archive <slug> instead.

Error codeCauseFix
PROJECT_NOT_INITIALIZEDNot in the project rootcd to the project root
NO_ACTIVE_CHANGE / CHANGE_NOT_FOUNDNo active proposal, or its directory is missingRun only for an active proposal whose verify has passed
VERIFY_NOT_PASSEDVerify has not passed (or the cmd: verify gate failed)Run openlogos verify and resolve VERIFY_FAIL
DEPLOYMENT_DECISION_CONFLICTproposal.md and tasks.md disagree about deploymentFix the deployment decision
DEPLOYMENT_NOT_REQUIREDThe proposal does not require deploymentArchive after verify passes
DEPLOY_TASKS_MISSINGNo non-empty [deploy] section in tasks.mdAdd the deployment tasks
DEPLOYMENT_REPORT_MISSINGlogos/resources/verify/deployment-report.md is missingWrite the deployment report (deployment-executor)
ENV_REGISTRY_INVALIDlogos/environments.yaml exists but is invalidFix it; openlogos env check lists every problem
ENV_REQUIRED / ENV_UNKNOWNRegistry present but --env missing, or it matches no id / aliasPass a registered id or alias
ENV_REF_UNRESOLVED--ref does not resolve to a commitPass an existing tag, branch or commit
DEPLOY_DONE_GATED_ENVThe environment has promote_from or require_approval: trueUse openlogos deploy --env <id>
DEPLOY_DONE_WRITE_FAILEDA write step failed after the checks passedRead the message (it says what was restored) and re-run

No tasks are checked, no marker is written and nothing is added to the ledger when any check fails.

  • verify — Gate 3.6 acceptance (must pass first)
  • smoke — Post-deployment health check (Gate 3.8)
  • deploy — Run the configured deployment for an environment
  • env — See what each environment is running
  • archive — Archive the completed proposal

A successful record for a targeted initial module updates its module-prefixed deployment report alongside the shared deployment state. The report is written after the success records are complete; it does not enforce promotion or replace the deployment ledger.