Add heuristic fallback for skill selection when pr-triage sub-agent fails - #52708
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
PR Triage\n\n- Category: bug\n- Risk: low\n- Priority: medium\n- Score: 52/100 (impact 35 + urgency 10 + quality 7)\n- Recommended action:
|
🎯 Excellent Resilience FixThanks for addressing the Matt Pocock Skills Reviewer reliability regression! This PR adds smart fallback logic when the What I liked:
Coverage: The changes are tightly focused—updates to Step 3 wording and the lock file reflect the new logic without sprawl. A solid, targeted fix that should restore reliability without introducing new risk. 🚀 This looks ready for merge!
|
PR Triage
Automated triage by PR Triage Agent.
|
PR TriageCategory: Score breakdown
Recommended action:
|
|
@copilot resolve the merge conflicts on this branch. |
There was a problem hiding this comment.
Pull request overview
Adds a local heuristic fallback so triage failures no longer abort skills-based PR reviews.
Changes:
- Adds fallback skill selection and high-impact file ranking.
- Generalizes Step 4 to consume either triage or fallback results.
- Recompiles workflow metadata.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/mattpocock-skills-reviewer.md |
Defines fallback triage behavior and heuristics. |
.github/workflows/mattpocock-skills-reviewer.lock.yml |
Updates the generated body hash. |
Review details
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Balanced
|
|
||
| **Fallback — never fail the review because of triage.** If the `pr-triage` call errors, times out, returns empty output, or returns text you cannot parse as the documented JSON shape, do **not** retry more than once and do **not** abort. Log one line noting that triage was unavailable, then derive the selection yourself from `/tmp/gh-aw/agent/pr-meta.json` and `/tmp/gh-aw/agent/pr-diff.patch` using this heuristic: | ||
|
|
||
| | Signal in the changed file paths | `change_type` | `recommended_skills` | |
…dd-fallback-pr-triage # Conflicts: # .github/workflows/mattpocock-skills-reviewer.lock.yml Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Step 3 of
mattpocock-skills-reviewer.mdhard-depended on thepr-triagesub-agent returning parseable JSON, so a single flaky, timed-out, or malformed sub-agent call failed the entire run (success rate fell from 100% to 54.5%).Changes
change_type/recommended_skillsvocabulary the sub-agent emits. Rows are matched top-down, first match wins, withmixed_unclear→/codebase-design+/tddas the catch-all.high_impact_filesfallback — largest non-generated changed files byadditions + deletionsfrom the already pre-fetchedpr-meta.json;key_signalsempty. The review body notes when the fallback path was taken.pr-triagedirectly, so both paths flow through identically.mattpocock-skills-reviewer.lock.yml(body hash only; the prompt body is not embedded in the lock).The heuristic reuses data already on disk, so the fallback adds no new tool calls or network dependencies.