Fix workflow_run trigger ignoring conclusion (#2841) - #2847
Fix workflow_run trigger ignoring conclusion (#2841)#2847vaishaldsouza wants to merge 3 commits into
Conversation
PR Summary by QodoPropagate workflow run conclusions to PR review tools
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1. Hard-coded target tool fallback
|
|
Code review by qodo was updated up to the latest commit 9c17bc8 |
|
Code review by qodo was updated up to the latest commit 4f39bd4 |
|
Thanks, and your malformed-config regression test is the best single test any of the three wrote. I am taking #2848 and adding you as a co-author on it. The hardening is correct, but it exists to cover a crash the refactor itself introduced, so it is 52 changed source lines solving a problem the issue did not have. #2848 leaves One thing I measured rather than the bot: the same test-state leak Qodo raised on #2843 is present here and unflagged, since |
Fixes #2841
What
The
workflow_runhandler readeventandpull_requestsfrom the payload but ignoredconclusion, so post-CI reviews looked identical whether CI passed, failed, or wascancelled.
Change
_inject_artifact_context()into a shared helper,_append_tool_context(text)._inject_ci_conclusion(conclusion), which uses it to tell the model how thetriggering workflow concluded and to flag when the change hasn't passed CI.
_inject_artifact_context()in theworkflow_runbranch only —the other two call sites are untouched.
Purely additive: no new config, no prompt changes, no control-flow changes. Reuses
ARTIFACTS.TARGET_TOOLS.Tests
test_workflow_run_injects_ci_conclusion_failure:conclusion="failure"→ CI statusblock appears in
pr_reviewer.extra_instructions.test_workflow_run_no_conclusion_does_not_inject: noconclusionkey → nothing appended.pytest -q tests/unittest/test_github_action_runner_core.py→ 19 passed. Full suite runwith 9 pre-existing, unrelated failures (Windows path handling / timing-sensitive tests).