Skip to content

Commit d9141bd

Browse files
committed
Tighten dashboard prompt: clearer rules with explicit ordering
The previous prompt's guidelines were under-specified, so the model ran on intuition: when an approver had left review questions and the author hadn't replied (open-telemetry#16390), it picked 'approver' instead of 'author'. Restate the rules as an ordered first-match decision tree (external > author-owes-response > approver-default), with explicit edge cases: an approver *commit* does not put the ball in the author's court, and an approver comment linking to an upstream issue should bucket as external.
1 parent c4ab11b commit d9141bd

1 file changed

Lines changed: 23 additions & 10 deletions

File tree

.github/scripts/pull-request-dashboard.py

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,29 @@
5757
status only as weak supporting evidence and focus on the conversation \
5858
(comments, reviews, commits).
5959
60-
Guidelines:
61-
- If the latest substantive activity is from the AUTHOR and there is an \
62-
outstanding approver question, an approver should respond next.
63-
- If an approver's most recent comment asks for a specific change and the \
64-
author has not responded, the author should act next.
65-
- Use "external" ONLY when the conversation explicitly indicates the PR \
66-
is blocked on something outside this repo (e.g., an upstream PR, a \
67-
spec change, a release in another project). A new PR with no reviews \
68-
yet is NOT external — it is waiting on an approver. CI failing alone \
69-
is NOT external.
60+
The single most important signal is the latest substantive event in the \
61+
timeline. Apply these rules in order (first match wins):
62+
63+
1. EXTERNAL — Use "external" when the conversation explicitly indicates \
64+
the PR is blocked on something outside this repo (e.g., links to an \
65+
upstream PR/issue, "reported at <other-repo>", a spec change, or a \
66+
release in another project). Look especially at the latest comments. \
67+
A new PR with no reviews yet is NOT external. CI failing alone is \
68+
NOT external unless an upstream cause is named.
69+
2. AUTHOR — If the latest substantive event is an approver review or \
70+
review-comment with content (a question, suggestion, change \
71+
request, clarification ask, or [APPROVED/CHANGES_REQUESTED] state) \
72+
and the AUTHOR has not posted any comment, review, or commit AFTER \
73+
it, the AUTHOR should act next. This holds even when the comment \
74+
is just a question or a soft suggestion — the ball is in the \
75+
author's court until they respond. (Note: a *commit* by an approver \
76+
does not count here — that's an approver pushing a fix, not asking \
77+
the author for something.)
78+
3. APPROVER — Otherwise, an APPROVER should act next. This includes: \
79+
fresh PRs with no reviews yet; PRs where the author has posted the \
80+
latest substantive event (comment, review, or commit) addressing \
81+
prior approver feedback; and PRs where an approver pushed the \
82+
latest commit (waiting for someone to review/merge).
7083
7184
Respond with a single JSON object and nothing else (no prose, no fences):
7285
{{"side": "approver" | "author" | "external"}}

0 commit comments

Comments
 (0)