fix: status-only verdict — remove comment-based approve + fix bug 3 (echo self-hit) #12

Merged
admin merged 3 commits from fix/status-only-verdict into main 2026-06-03 22:20:46 +03:00
Owner

Status-only verdict model

Conveyor is driven SOLELY by Plane statuses; comments NEVER trigger transitions.

  • Approved status -> advance to next stage (no intermediate In Progress reset).
  • Rejected status -> rollback + reason from the latest comment.
  • Needs Input -> In Progress (Slava answers, then returns status) -> relaunch the stage agent.

Bug 3 (echo self-hit) fixed

The analyst posted its own waiting-for-approval comment; the old comment-based control caught its own comment and reverted In Review -> In Progress. The whole comment-control mechanism is removed.

Changes

  • handle_comment: pure logger, no side effects.
  • handle_status_start: relaunches stage agent on In Progress from Needs Input; busy-guard via has_active_job_for_task (no active job => idle => relaunch; active job => skip).
  • handle_verdict(approved): dropped redundant set_issue_in_progress.
  • handle_verdict(rejected): pulls reason from latest Plane comment (HTML stripped).

Tests

204 passed (+9 new) + 9 pre-existing test_webhooks signature failures (unchanged baseline). New: test_inreview_comment_does_not_revert, test_any_comment_no_pipeline_action, test_approved_status_advances_without_inprogress_reset, test_rejected_status_pulls_reason_from_comment, test_inprogress_from_needs_input_relaunches_analyst. Rewrote old comment-based tests under the status model.

Do NOT merge — pending live verification + boevoy progon by the assistant.

## Status-only verdict model Conveyor is driven SOLELY by Plane statuses; comments NEVER trigger transitions. - **Approved status** -> advance to next stage (no intermediate In Progress reset). - **Rejected status** -> rollback + reason from the latest comment. - **Needs Input -> In Progress** (Slava answers, then returns status) -> relaunch the stage agent. ### Bug 3 (echo self-hit) fixed The analyst posted its own waiting-for-approval comment; the old comment-based control caught its own comment and reverted In Review -> In Progress. The whole comment-control mechanism is removed. ### Changes - `handle_comment`: pure logger, no side effects. - `handle_status_start`: relaunches stage agent on In Progress from Needs Input; busy-guard via `has_active_job_for_task` (no active job => idle => relaunch; active job => skip). - `handle_verdict(approved)`: dropped redundant `set_issue_in_progress`. - `handle_verdict(rejected)`: pulls reason from latest Plane comment (HTML stripped). ### Tests 204 passed (+9 new) + 9 pre-existing test_webhooks signature failures (unchanged baseline). New: test_inreview_comment_does_not_revert, test_any_comment_no_pipeline_action, test_approved_status_advances_without_inprogress_reset, test_rejected_status_pulls_reason_from_comment, test_inprogress_from_needs_input_relaunches_analyst. Rewrote old comment-based tests under the status model. **Do NOT merge** — pending live verification + boevoy progon by the assistant.
admin added 3 commits 2026-06-03 22:19:12 +03:00
Status-only verdict model: comments NEVER drive the pipeline. Removed the
whole comment-based control mechanism from handle_comment (:approved: /
:rejected: / answer-to-questions) which caused bug 3 (echo self-hit): the
analyst posts its own "waiting for approval" comment, handle_comment catches
its own comment and reverts In Review -> In Progress. handle_comment is now a
pure logger with no side effects.

handle_status_start: a return to In Progress on an EXISTING task (Slava
answered the analyst questions in Needs Input) now RELAUNCHES the stage agent
instead of being a no-op. Distinguished from a duplicate In Progress webhook
via has_active_job_for_task() (new db helper): no active job => agent idle =>
relaunch; active job => busy => skip (no double launch).
handle_verdict(approved): removed set_issue_in_progress(work_item_id) before
_try_advance_stage. _try_advance_stage -> advance_stage -> plane_notify_stage
already PATCHes the issue to the NEXT stage status, so the reset only made the
board flicker In Progress before the next stage (part of bug 3).
handle_verdict(rejected): the reason is now pulled from the issue latest Plane
comment (_latest_comment_reason: GET comments, newest by created_at, HTML
stripped) instead of a fixed stub. Slava writes the reason in a comment before
flipping the status to Rejected. Falls back to a fixed note when there is no
comment / the API call fails.

tests: add test_status_only_verdict.py (test_inreview_comment_does_not_revert
[bug 3 root], test_any_comment_no_pipeline_action,
test_approved_status_advances_without_inprogress_reset,
test_rejected_status_pulls_reason_from_comment) and
test_inprogress_from_needs_input_relaunches_analyst in test_status_trigger.py.
Rewrote the comment-based tests (test_verdict_status, test_plane_approved/
rejected in test_webhooks) under the status-only model: comments are no-ops,
verdicts come from status changes.
admin merged commit 2d392b6fc7 into main 2026-06-03 22:20:46 +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#12