fix(deploy): gate deploy->done on deployer verdict, not LLM exit code #19

Merged
admin merged 1 commits from fix/deploy-verdict-gate into main 2026-06-04 02:46:53 +03:00
Owner

BUG 8: deploy stage had qg=None, so a failed deploy advanced to done. exit_code in agent_runs is the LLM process code (always 0), so launcher.py:475 guard never fired.

Fix:

  • New QG check_deploy_status (mirrors check_reviewer_verdict): reads deploy_status from 14-deploy-log.md frontmatter. SUCCESS->True, FAILED/missing/no-file->False. Registered in QG_CHECKS.
  • stages.py: deploy qg None -> check_deploy_status (agent stays None).
  • stage_engine.advance_stage: deploy->done now runs the gate via the generic QG path; on FAILED verdict a new deployer branch in _handle_qg_failure_rollbacks rolls back to development + set_issue_blocked + notify_qg_failure + Plane comment + Telegram. launcher.py:475 block left intact.
  • Tests: +7 in test_qg.py (TestCheckDeployStatus), +3 in test_stage_engine.py (TestDeployVerdict). 227 passed (was 217) + 10 baseline off-limits failures unchanged.

Note: deployer prompt in enduro-trails (.openclaw/agents/deployer.md) needs a separate edit to emit deploy_status frontmatter.

Do NOT deploy/merge — assistant handles merge + prod run.

BUG 8: deploy stage had qg=None, so a failed deploy advanced to done. exit_code in agent_runs is the LLM process code (always 0), so launcher.py:475 guard never fired. Fix: - New QG check_deploy_status (mirrors check_reviewer_verdict): reads deploy_status from 14-deploy-log.md frontmatter. SUCCESS->True, FAILED/missing/no-file->False. Registered in QG_CHECKS. - stages.py: deploy qg None -> check_deploy_status (agent stays None). - stage_engine.advance_stage: deploy->done now runs the gate via the generic QG path; on FAILED verdict a new deployer branch in _handle_qg_failure_rollbacks rolls back to development + set_issue_blocked + notify_qg_failure + Plane comment + Telegram. launcher.py:475 block left intact. - Tests: +7 in test_qg.py (TestCheckDeployStatus), +3 in test_stage_engine.py (TestDeployVerdict). 227 passed (was 217) + 10 baseline off-limits failures unchanged. Note: deployer prompt in enduro-trails (.openclaw/agents/deployer.md) needs a separate edit to emit deploy_status frontmatter. Do NOT deploy/merge — assistant handles merge + prod run.
admin added 1 commit 2026-06-04 02:43:23 +03:00
admin merged commit 2629dffe1b into main 2026-06-04 02:46:53 +03:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/orchestrator#19