Post error comments regardless of trigger - #843
Conversation
|
/agentic_review |
Code Review by Qodo
1.
|
958ca5c to
83303dd
Compare
Users on the forum channel regularly ask about failed issues because the only visible signal was an errored label with no explanation. Error comments were previously gated on user_triggered, meaning automatic runs failed silently. This makes error feedback unconditional: - Crash-based errors (exceptions): a new post_terminal_error_comment() function bypasses the trigger gate and is called from each agent's final-retry path, which already only runs after retries are exhausted. - Workflow ERROR resolutions (triage): added to the unbidden no-MR list in _should_update_jira(), so the result comment is posted immediately like not-affected or postponed — there is no retry for these. - Mid-workflow errors (e.g. consolidation failures inside run_workflow) remain trigger-gated in comment_in_jira() since they are intermediate, not terminal. The comment_in_jira / _post_jira_comment split keeps the trace-link logic in one place while giving callers a clear choice: comment_in_jira for workflow results (trigger-gated on errors), post_terminal_error_comment for terminal failures (always posts). Assisted-by: Claude Opus 4.6
Resolution.ERROR from run_workflow() is dispatched to retry(), so posting the comment inside the workflow would duplicate it on every attempt. Suppress ERROR in _should_update_jira() and instead have retry() post a single terminal comment after retries are exhausted. Also use concise error messages (e.explain() / str(e)) for Jira comments instead of the full traceback, matching the pattern in the other agents. The full traceback stays in ErrorData.details and the trace viewer. Assisted-by: Claude Opus 4.6
83303dd to
d4ef8cc
Compare
Users on the forum channel regularly ask about failed issues because the only visible signal was an errored label with no explanation.
Error comments were previously gated on user_triggered, meaning automatic runs failed silently. This makes error feedback unconditional:
The comment_in_jira / _post_jira_comment split keeps the trace-link logic in one place while giving callers a clear choice: comment_in_jira for workflow results (trigger-gated on errors), post_terminal_error_comment for terminal failures (always posts).
Assisted-by: Claude Opus 4.6
TODO:
packit/packit.dev.RELEASE NOTES BEGIN
Ymir now comments on errors even for issues that are autoprocessed (not triggered via
ymir_todo).RELEASE NOTES END