You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@magpie.apache.org by po...@apache.org on 2026/08/27 20:40:24 UTC
(magpie) branch main updated: fix(pr-management-triage): show stable per-PR drill-in progress (#1118)
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/magpie.git
The following commit(s) were added to refs/heads/main by this push:
new e8c3a346 fix(pr-management-triage): show stable per-PR drill-in progress (#1118)
e8c3a346 is described below
commit e8c3a346a06a0fad1227a90e66f788eeddb735cd
Author: CAOShurong <35...@qq.com>
AuthorDate: Fri Aug 28 04:40:18 2026 +0800
fix(pr-management-triage): show stable per-PR drill-in progress (#1118)
Generated-by: Codex (GPT-5)
Co-authored-by: CAOShurong <17...@users.noreply.github.com>
---
skills/pr-management-triage/interaction-loop.md | 31 ++++++++++++++++++++++
tools/skill-evals/README.md | 2 +-
.../evals/pr-management-triage/README.md | 3 ++-
.../fixtures/case-1-each-middle/expected.json | 6 +++++
.../fixtures/case-1-each-middle/report.md | 6 +++++
.../fixtures/case-2-picked-row/expected.json | 6 +++++
.../fixtures/case-2-picked-row/report.md | 6 +++++
.../fixtures/case-3-each-first/expected.json | 6 +++++
.../fixtures/case-3-each-first/report.md | 6 +++++
.../fixtures/case-4-each-last/expected.json | 6 +++++
.../fixtures/case-4-each-last/report.md | 6 +++++
.../interaction-progress/fixtures/output-spec.md | 21 +++++++++++++++
.../interaction-progress/fixtures/step-config.json | 4 +++
.../fixtures/user-prompt-template.md | 8 ++++++
tools/spec-loop/.last-sync | 2 +-
tools/spec-loop/specs/pr-management-family.md | 9 +++++++
16 files changed, 125 insertions(+), 3 deletions(-)
diff --git a/skills/pr-management-triage/interaction-loop.md b/skills/pr-management-triage/interaction-loop.md
index 9d70fb91..b416d177 100644
--- a/skills/pr-management-triage/interaction-loop.md
+++ b/skills/pr-management-triage/interaction-loop.md
@@ -197,6 +197,7 @@ because its group mandates per-PR), present the full detail:
```text
─────────────────────────────────────────────────────
+[3/27] #65471 — step: classify → propose draft
PR #65471 "Add support for new db dialect"
Author: @eve (tier: new, 2 merged / 5 total on this repo)
Age: opened 4d ago, last push 6h ago
@@ -237,6 +238,36 @@ approval PR, and it's gated on the maintainer asking for it.
"pulled-out-and-left-pending". The maintainer can come back
to it after finishing the rest of the group.
+### Per-PR progress header
+
+The first line of every individual drill-in must show the PR's stable
+position in its group and the pipeline transition currently being presented.
+Use a one-based position and the original group size:
+
+```text
+[3/27] #65471 — step: classify → propose draft
+```
+
+The position is the PR's row index in the group that was presented, not the
+number of PRs already handled in the session. Keep it stable throughout the
+drill-in and when returning to the group:
+
+- `[E]` uses the current PR's row index in the group.
+- `[P]NN` records PR `NN`'s row index before pulling it out; do not renumber
+ the remaining group or change the denominator.
+- A skipped, pending, or previously pulled-out PR still counts toward the
+ original group size.
+
+`classify → propose <action>` means that the classification from Step 2 is
+being surfaced together with the suggested action for the maintainer's
+decision; it does not trigger a second classification fetch. If the
+optimistic-lock check finds that the contributor pushed since Step 1, replace
+the marker with `re-classify → propose <action>` after the live state has been
+re-evaluated. The subsequent confirmation and mutation are shown by the
+per-PR action prompt and batch progress lines, not by changing the saved group
+position. If the maintainer overrides the suggested action, update the
+`<action>` part of the header before asking for confirmation.
+
---
## Group action override
diff --git a/tools/skill-evals/README.md b/tools/skill-evals/README.md
index c1ca57e5..b0dc7764 100644
--- a/tools/skill-evals/README.md
+++ b/tools/skill-evals/README.md
@@ -30,7 +30,7 @@ Suites are currently implemented for:
- **pr-management-code-review**: 117 cases across 27 suites (selector-resolution, step-1-selectors-match-chips, step-2.5-slop-detection, step-3-security-disclosure-scan, step-3-ai-authorship-disclosure, step-4-* checks, step-5-adversarial-integration, step-6-disposition, step-7b-review-body-attribution, review-risk-classify, injection-guard, review-disposition, review-handoff)
- **pr-management-mentor** — 20 cases across 2 steps (tone-checks, hand-off)
- **pr-management-stats** — 13 cases across 2 steps (classify, pressure-weight)
-- **pr-management-triage** — 35 cases across 4 steps (pre-filter, decision-table, terminal-links, pagination-dedup)
+- **pr-management-triage** — 39 cases across 5 steps (pre-filter, decision-table, terminal-links, pagination-dedup, interaction-progress)
- **list-skills** — 7 cases across 2 steps (step-1-command, step-2-present)
- **setup-isolated-setup-verify** — 12 cases across 3 steps (runtime-routing, step-1-classify, step-2-recommend)
- **setup-isolated-setup-update** — 14 cases across 4 steps (runtime-routing, step-snapshot-drift, step-tool-freshness, step-after-report)
diff --git a/tools/skill-evals/evals/pr-management-triage/README.md b/tools/skill-evals/evals/pr-management-triage/README.md
index b2ff7e22..9af1a1d4 100644
--- a/tools/skill-evals/evals/pr-management-triage/README.md
+++ b/tools/skill-evals/evals/pr-management-triage/README.md
@@ -5,7 +5,7 @@
Behavioral evals for the `pr-management-triage` skill.
-## Suites (35 cases total)
+## Suites (39 cases total)
| Suite | Step | Cases | What it covers |
|---|---|---|---|
@@ -13,6 +13,7 @@ Behavioral evals for the `pr-management-triage` skill.
| decision-table | Step 2 (decision table) | 18 | Rows 3/4 (already-triaged via body-fold block→skip), 7b (security signal), 9 (conflict→draft), 10 (all systemic→rerun), 11 (partial systemic→rerun), 12 (static-only→comment), 13 (flaky ≤2→rerun), 14a (author confirmed→mark-ready), 14b (pending confirmation→skip), 14c (threads addressed→request-author-confirmation), 15 (threads→ping), 16 (no CI→rebase), 18 (changes-requested+new-commits→ping), 19 (already ready→skip), 20 (passing→mark-read [...]
| terminal-links | Golden rule 10 | 5 | Short, context-short, and full PR references use the canonical target; `NO_COLOR` and `TERM=dumb` select the plain-text fallback |
| pagination-dedup | Step 1 (full pagination) | 2 | A PR that moves to a later page is emitted once at its freshest occurrence; distinct PRs keep their fetched order |
+| interaction-progress | Interaction loop | 4 | Per-PR drill-ins retain the original one-based group position at the first, middle, and last rows and show the active classify-to-propose transition for `[E]` and `[P]` entry |
The two body-fold cases (`case-17-fold-already-triaged`,
`case-18-fold-stale-after-push`) are the regression guard for the denoise
diff --git a/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/case-1-each-middle/expected.json b/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/case-1-each-middle/expected.json
new file mode 100644
index 00000000..8daa90d9
--- /dev/null
+++ b/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/case-1-each-middle/expected.json
@@ -0,0 +1,6 @@
+{
+ "header": "[3/27] #65471 — step: classify → propose comment",
+ "position": 3,
+ "group_size": 27,
+ "stage": "classify → propose comment"
+}
diff --git a/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/case-1-each-middle/report.md b/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/case-1-each-middle/report.md
new file mode 100644
index 00000000..b8ede2ca
--- /dev/null
+++ b/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/case-1-each-middle/report.md
@@ -0,0 +1,6 @@
+<!-- SPDX-License-Identifier: Apache-2.0
+ https://www.apache.org/licenses/LICENSE-2.0 -->
+
+The maintainer chose `[E]ach` on a group containing 27 PRs. The current PR is
+`#65471`, the third row in the original group, and the group's suggested
+action for it is `comment`. No optimistic-lock re-check has been triggered.
diff --git a/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/case-2-picked-row/expected.json b/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/case-2-picked-row/expected.json
new file mode 100644
index 00000000..f27bed36
--- /dev/null
+++ b/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/case-2-picked-row/expected.json
@@ -0,0 +1,6 @@
+{
+ "header": "[5/27] #65505 — step: classify → propose draft",
+ "position": 5,
+ "group_size": 27,
+ "stage": "classify → propose draft"
+}
diff --git a/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/case-2-picked-row/report.md b/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/case-2-picked-row/report.md
new file mode 100644
index 00000000..e2071d93
--- /dev/null
+++ b/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/case-2-picked-row/report.md
@@ -0,0 +1,6 @@
+<!-- SPDX-License-Identifier: Apache-2.0
+ https://www.apache.org/licenses/LICENSE-2.0 -->
+
+The maintainer chose `[P]NN` to pull a PR out of a group containing 27 PRs.
+The selected PR was `#65505`, the fifth row before it was pulled out, and the
+group's suggested action for it is `draft`. The remaining group stays pending.
diff --git a/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/case-3-each-first/expected.json b/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/case-3-each-first/expected.json
new file mode 100644
index 00000000..1a949445
--- /dev/null
+++ b/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/case-3-each-first/expected.json
@@ -0,0 +1,6 @@
+{
+ "header": "[1/27] #65401 — step: classify → propose rerun",
+ "position": 1,
+ "group_size": 27,
+ "stage": "classify → propose rerun"
+}
diff --git a/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/case-3-each-first/report.md b/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/case-3-each-first/report.md
new file mode 100644
index 00000000..d207f076
--- /dev/null
+++ b/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/case-3-each-first/report.md
@@ -0,0 +1,6 @@
+<!-- SPDX-License-Identifier: Apache-2.0
+ https://www.apache.org/licenses/LICENSE-2.0 -->
+
+The maintainer chose `[E]ach` on a group containing 27 PRs. The current PR is
+`#65401`, the first row in the original group, and the group's suggested
+action for it is `rerun`. No optimistic-lock re-check has been triggered.
diff --git a/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/case-4-each-last/expected.json b/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/case-4-each-last/expected.json
new file mode 100644
index 00000000..ccdb5c58
--- /dev/null
+++ b/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/case-4-each-last/expected.json
@@ -0,0 +1,6 @@
+{
+ "header": "[27/27] #65499 — step: classify → propose mark-ready",
+ "position": 27,
+ "group_size": 27,
+ "stage": "classify → propose mark-ready"
+}
diff --git a/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/case-4-each-last/report.md b/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/case-4-each-last/report.md
new file mode 100644
index 00000000..09e4a5d1
--- /dev/null
+++ b/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/case-4-each-last/report.md
@@ -0,0 +1,6 @@
+<!-- SPDX-License-Identifier: Apache-2.0
+ https://www.apache.org/licenses/LICENSE-2.0 -->
+
+The maintainer chose `[E]ach` on a group containing 27 PRs. The current PR is
+`#65499`, the last row in the original group after several earlier rows were
+skipped or pulled out, and the group's suggested action for it is `mark-ready`.
diff --git a/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/output-spec.md b/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/output-spec.md
new file mode 100644
index 00000000..cc333206
--- /dev/null
+++ b/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/output-spec.md
@@ -0,0 +1,21 @@
+<!-- SPDX-License-Identifier: Apache-2.0
+ https://www.apache.org/licenses/LICENSE-2.0 -->
+
+## Output format
+
+Return ONLY valid JSON with this structure:
+
+```json
+{
+ "header": "[3/27] #65471 — step: classify → propose comment",
+ "position": 3,
+ "group_size": 27,
+ "stage": "classify → propose comment"
+}
+```
+
+Use the one-based row index and original group size from the input. The
+`stage` value must be `classify → propose <action>` for the suggested action
+shown in the input. The `header` value must render the complete first line,
+including the PR number, with the exact format shown above. Return no text
+outside the JSON object.
diff --git a/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/step-config.json b/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/step-config.json
new file mode 100644
index 00000000..fa8b1da7
--- /dev/null
+++ b/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/step-config.json
@@ -0,0 +1,4 @@
+{
+ "skill_md": "skills/pr-management-triage/interaction-loop.md",
+ "step_heading": "### Per-PR progress header"
+}
diff --git a/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/user-prompt-template.md b/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/user-prompt-template.md
new file mode 100644
index 00000000..d420219b
--- /dev/null
+++ b/tools/skill-evals/evals/pr-management-triage/interaction-progress/fixtures/user-prompt-template.md
@@ -0,0 +1,8 @@
+<!-- SPDX-License-Identifier: Apache-2.0
+ https://www.apache.org/licenses/LICENSE-2.0 -->
+
+## Per-PR drill-in request
+
+{report}
+
+Render the progress fields for this individual drill-in. Return JSON only.
diff --git a/tools/spec-loop/.last-sync b/tools/spec-loop/.last-sync
index e63ff595..83aa4c53 100644
--- a/tools/spec-loop/.last-sync
+++ b/tools/spec-loop/.last-sync
@@ -1 +1 @@
-821e564d49883b793c2cf3cb0d4d12b39adb56ab
+9d5382c50fb170d6d384c774e573a691e5b28123
diff --git a/tools/spec-loop/specs/pr-management-family.md b/tools/spec-loop/specs/pr-management-family.md
index 51a9e96b..55efc412 100644
--- a/tools/spec-loop/specs/pr-management-family.md
+++ b/tools/spec-loop/specs/pr-management-family.md
@@ -93,6 +93,12 @@ is listed here for navigability since its domain is PR threads.
a label, comment, or state change without the maintainer typing a
confirmation in-session. The single exception class — `pr-management-stats`
— is unconditionally read-only; it emits rendered tables, never a write.
+- **Stable per-PR drill-in progress.** `pr-management-triage` prefixes each
+ individual drill-in with the PR's original one-based group position and
+ group size plus the active `classify → propose <action>` transition.
+ `[E]` and `[P]NN` preserve that position and denominator across skipped,
+ pending, and pulled-out rows; a changed head advances the transition to
+ `re-classify → propose <action>` after live state is refreshed.
- **Quick-merge never merges.** `pr-management-quick-merge` surfaces
candidates and the maintainer runs the exact `gh pr merge` command
themselves. Automated merge belongs to a future Auto-merge mode that is
@@ -157,6 +163,9 @@ is listed here for navigability since its domain is PR threads.
effective intersection is `broken` without requiring a concrete failing
resolution; recommended remediation follows the adopter's documented
policy.
+8. Every `pr-management-triage` per-PR drill-in shows a stable
+ `[position/total]` header and the active classify-to-propose transition;
+ `[E]` and `[P]NN` do not renumber the original group.
## Validation