feat(deploy): dedicated "Confirm Deploy" status triggers prod deploy (ORCH-059) #68
Closed
admin
wants to merge 0 commits from
feature/ORCH-059-approve-confirm-deploy-approve into main
pull from: feature/ORCH-059-approve-confirm-deploy-approve
merge into: admin:main
admin:main
admin:feature/ORCH-104-eae59ef5
admin:feature/ORCH-105-
admin:feature/ORCH-106-fix-onboard-project-py-add-col
admin:feature/ORCH-011-
admin:feature/ORCH-103-orch-10b-bundled-bootstrap
admin:feature/ORCH-102-orch-10a-lite-watchdog
admin:feature/ORCH-101-orch-10-common-smoke
admin:feature/ORCH-009-turnkey-plane
admin:docs/ORCH-009-staging-log
admin:feature/ORCH-098-fnd
admin:feature/ORCH-100-fnd-f1b-sidecar-watchdog
admin:feature/ORCH-019-
admin:feature/ORCH-057-bug-follow-up-orch-040-normali
admin:feature/ORCH-099-fnd-f1a-metrics-agent-liveness
admin:feature/ORCH-027-code-coverage
admin:docs/ORCH-057-staging-log
admin:feature/ORCH-095-bug-html-1-render-task-tracker
admin:feature/ORCH-094-bug-done-deploy-plane-awaiting
admin:feature/ORCH-093-bug-merge-gitea-405-5xx-hold-p
admin:feature/ORCH-091-bug-to-analyse-stage-deploy-st
admin:feature/ORCH-090-stop-plane
admin:chore/ORCH-090-staging-log
admin:feature/ORCH-062-infra-prune-docker-build-cache
admin:feature/ORCH-063-infra-mva154-85
admin:feature/ORCH-092-6-escalation
admin:feature/ORCH-079-orch-52f-readme-reviewer
admin:feature/ORCH-078-orch-52e-orch-nnn
admin:feature/ORCH-077-orch-52d-6-anthropic
admin:feature/ORCH-076-orch-52c-handoff-frontmatter-w
admin:feature/ORCH-075-orch-52b-docs-templates-adr-na
admin:feature/ORCH-089-autoapprove-brd-autodeploy
admin:feature/ORCH-088-orch-88-10-20
admin:feature/ORCH-087-orch-87-to-analyse-bump
admin:feature/ORCH-086-orch-86-reconciler-telegram-et
admin:feature/ORCH-080-orch-52g-telegram-link-preview
admin:feature/ORCH-082-orch-81-pr-merge-verify-hold
admin:docs/ORCH-082-staging-log
admin:feature/ORCH-081-orch-52h-env-config
admin:docs/ORCH-081-staging-log
admin:feature/ORCH-074-orch-52a-frontmatter-routing-e
admin:feature/ORCH-026-b-a
admin:feature/ORCH-073-crit-main-orch-067-069
admin:feature/ORCH-069-qg-0-title-orch-qg0-title-max-
admin:restore/orch-6769-2026-06-08
admin:feature/ORCH-067-telegram-tracker-bump-plane
admin:docs/ORCH-069-staging-log
admin:feature/ORCH-071-crit-bug-merge-main
admin:integ/restore-main-2026-06-08
admin:feature/ORCH-068-bug-reconciler-livelock-unbloc
admin:feature/ORCH-066-plane
admin:feature/ORCH-022-security-secret-scanning
admin:feature/ORCH-065-bug-zombie-jobs-merge-lease-ru
admin:feature/ORCH-021-post-deploy-rollback
admin:feature/ORCH-061-bug-deploy-staging-development
admin:docs/ORCH-061-staging-log
admin:feature/ORCH-060-reconciler-escalated-max-retri
admin:deployer/ORCH-058-staging-verdict-v3
admin:deployer/ORCH-058-staging-verdict
admin:feature/ORCH-058-self-deploy-retag-staging
admin:feature/ORCH-036-orch-36-deploy-b
admin:feature/ORCH-053-sweeper-webhook-stuck-task
admin:deploy-log/ORCH-053-20260606T210404
admin:feature/ORCH-043-merge-gate-auto-rebase-re-test
admin:feature/ORCH-040-root-git
admin:feature/ORCH-042-telegram-live-tracker-bump
admin:feature/ORCH-044-preflight-auth-effort
admin:staging-log/ORCH-044-20260606T084247
admin:docs/lessons-orch-048
admin:deploy-log/ORCH-048-20260606T071157
admin:feature/ORCH-048-staging-b6-check-reads-registr
admin:staging-log/ORCH-048-20260606T053413
admin:feature/ORCH-046-stage-engine-pass-reviewer-tes
admin:staging-log/ORCH-046-20260606T044841
admin:docs/lessons-2026-06-05
admin:feature/ORCH-047-check-tests-passed-gate-must-r
admin:feature/ORCH-045-ci-poll-retry
admin:docs/lessons-orch-017
admin:feature/ORCH-017-brd-plane-telegram
admin:feat/ORCH-41-agent-models
admin:fix/ORCH-39-webhook-tests
admin:feature/ORCH-016-plane
admin:feature/ORCH-10-per-project-states
admin:docs/ORCH-9-canon
admin:feature/ORCH-35-staging-gate
admin:feature/ORCH-34-deploy-hook
admin:feature/ORCH-33-staging-testsuite
admin:feature/ORCH-31-staging-infra
admin:fix/isolate-webhook-tests-from-plane
admin:ci/add-gitea-workflow
admin:docs/product-vision
admin:fix/tests-machine-verdict
admin:fix/deploy-gate-log-path
admin:fix/tracker-edit-not-modified
admin:feat/telegram-live-tracker
admin:fix/observability-and-merge-gate
admin:fix/deploy-verdict-gate
admin:fix/ci-fail-retry-developer
admin:fix/drop-local-tests-qg
admin:fix/qg-pytest-no-make
admin:fix/approved-advances-stage
admin:fix/gitea-public-url
admin:fix/taskmd-description
admin:fix/status-only-verdict
admin:fix/pipeline-start-bugs
admin:feature/pipeline-ux
admin:feature/plane-per-agent-author
admin:feature/ORCH-M6-plane-sequence
admin:feature/ORCH-cleanup-L1L2L3
admin:feature/ORCH-5-webhook-dedup
admin:feature/ORCH-4-stage-engine
admin:feature/ORCH-7-hardening
admin:feature/ORCH-1-job-queue
admin:feature/ORCH-6-multirepo
admin:feature/ORCH-2-worktree
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "feature/ORCH-059-approve-confirm-deploy-approve"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Approvedstatus: it was BOTH the human BRD gate onanalysisAND the silent Phase B prod-deploy trigger ondeploy(ORCH-036), so a routine approve could launch a self-hosting prod restart serving all projects.confirm_deploy("Confirm Deploy") that triggers only Phase B ondeploy;Approvedstays purely a pipeline gate (no-op ondeploy).confirm_deployis absent from_DEFAULT_STATES, so environments without the status resolveNonevia.get— noKeyError, no blind deploy.Changes
src/plane_sync.py:"Confirm Deploy" -> "confirm_deploy"in_PLANE_NAME_TO_KEY(not in_DEFAULT_STATES).src/webhooks/plane.py:handle_issue_updatedroutes "Confirm Deploy" to newhandle_confirm_deploy(guarded tostage=="deploy") ->_try_advance_stage(confirm_deploy=True).src/stage_engine.py:advance_stagegains keyword-onlyconfirm_deploy=False; Phase B initiates only whenTrue, else a plainApprovedis a deterministic no-op returning beforecheck_deploy_status(no false BUG-8 rollback). Phase A CTA asks for "Confirm Deploy".CLAUDE.md,docs/architecture/README.md,CHANGELOG.md.Invariants (unchanged)
STAGE_TRANSITIONS,QG_CHECKS,check_deploy_status, hook exit codes (0/1/2), Phases A/C, merge-gate, terminal-sync, DB schema. Conditional like ORCH-35/36 (self-hosting only).Ops precondition
Create the "Confirm Deploy" board status in the Plane ORCH project (exact name/case) + reset state cache — see
docs/work-items/ORCH-059/07-infra-requirements.md.Test plan
Split the overloaded `Approved` Plane status: it served BOTH as the human BRD gate on `analysis` AND as the silent Phase B prod-deploy trigger on `deploy` (ORCH-036), so a routine approve could launch a self-hosting prod restart. ORCH-059 introduces a dedicated logical status `confirm_deploy` ("Confirm Deploy") that triggers ONLY Phase B on `deploy`; `Approved` stays purely a pipeline gate. - plane_sync: map "Confirm Deploy" -> "confirm_deploy" in _PLANE_NAME_TO_KEY; intentionally absent from _DEFAULT_STATES => fail-closed (no UUID -> .get yields None, no KeyError, no blind deploy). - webhooks/plane: handle_issue_updated routes "Confirm Deploy" (fail-closed .get) to new handle_confirm_deploy (guarded to stage=="deploy") -> _try_advance_stage(confirm_deploy=True). - stage_engine: advance_stage gains keyword-only confirm_deploy=False; Phase B block returns early for deploy+finished_agent is None but only initiates the deploy when confirm_deploy=True; a plain Approved is a deterministic no-op (returns before check_deploy_status -> no false БАГ-8 rollback). - Phase A CTA now asks the operator for "Confirm Deploy", not "Approved". Contracts unchanged: STAGE_TRANSITIONS, QG_CHECKS, check_deploy_status, hook exit codes, Phases A/C, merge-gate, DB schema. Conditional like ORCH-35/36 (self-hosting only). Docs updated (CLAUDE.md, architecture/README.md, CHANGELOG). Refs: ORCH-059 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>8b9c604b53toca41d9210bSuperseded by #71 (restore-main 2026-06-08): ORCH-059 code restored to main after phantom-merge.
Pull request closed