feat(triage): add not-planned action to close out-of-scope issues#54
feat(triage): add not-planned action to close out-of-scope issues#54rh-hemartin wants to merge 1 commit into
Conversation
The triage schema now accepts action: "not-planned" to close issues as out-of-scope, invalid, or spam. The post-script applies the not-planned label, posts the agent's comment, and closes the issue with reason "not planned" (matching the existing duplicate flow). This addresses feedback from konflux-ci/mobster onboarding: without not-planned, the agent must use insufficient (keeps issue open) or sufficient (may promote to coder) for issues that should be closed. Changes: - triage-result.schema.json: add not-planned to action enum - post-triage.sh: add not-planned case that labels and closes issue - post-triage.sh: add not-planned to CONTROL_LABELS array - post-triage-test.sh: add 6 tests for not-planned action - agents/triage.md: document when to use not-planned vs other actions - docs/agents/triage.md: add not-planned to control labels table All tests pass. Closes #2205 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Hector Martinez <hemartin@redhat.com>
|
🤖 Finished Review · ✅ Success · Started 6:45 AM UTC · Completed 6:57 AM UTC |
PR Summary by QodoAdd
AI Description
Diagram
High-Level Assessment
Files changed (5)
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
55 rules 1. Stale not-planned label persists
|
| # pipeline itself applies (pre-triage.sh resets the first five; the action | ||
| # handlers apply blocked/triaged/feature). | ||
| CONTROL_LABELS=("needs-info" "ready-to-code" "duplicate" "feature" "blocked" "triaged" "question") | ||
| CONTROL_LABELS=("needs-info" "ready-to-code" "duplicate" "feature" "blocked" "triaged" "question" "not-planned") |
There was a problem hiding this comment.
1. Docs omit not-planned label 📜 Skill insight ⚙ Maintainability
The triage pipeline now treats not-planned as a control label, but docs/triage.md still lists only the older control labels even though the harness directs users to that document. This leaves user-facing documentation out of sync with post-triage.sh, so operators and skill authors lack guidance on interpreting/configuring the new outcome and label expectations.
Agent Prompt
## Issue description
Update the user-facing triage documentation to reflect that `not-planned` is now a pipeline-managed control label: `docs/triage.md` should include `not-planned` alongside the other control labels and clarify that it should not be recommended via `label_actions`.
## Issue Context
`scripts/post-triage.sh` now manages a `not-planned` action/label as part of `CONTROL_LABELS`, but `docs/triage.md` still documents only the older control labels (including in its control-label table and `issue-labels` guidance). The harness configuration also references `docs/triage.md` as the triage agent documentation, so keeping it accurate is important for operators and skill authors interpreting outcomes and configuring label expectations.
## Fix Focus Areas
- docs/triage.md[32-46]
- docs/triage.md[79-83]
- harness/triage.yaml[1-4]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| not-planned) | ||
| if [[ -z "${COMMENT}" ]]; then | ||
| echo "ERROR: action is 'not-planned' but no comment provided" >&2 | ||
| exit 1 | ||
| fi | ||
| remove_label "blocked" | ||
| remove_label "needs-info" | ||
| add_label "not-planned" | ||
| ;; | ||
|
|
There was a problem hiding this comment.
| not-planned) | ||
| if [[ -z "${COMMENT}" ]]; then | ||
| echo "ERROR: action is 'not-planned' but no comment provided" >&2 | ||
| exit 1 | ||
| fi | ||
| remove_label "blocked" | ||
| remove_label "needs-info" | ||
| add_label "not-planned" | ||
| ;; |
There was a problem hiding this comment.
3. Stale not-planned label persists 🐞 Bug ≡ Correctness
post-triage.sh adds the new not-planned control label, but neither pre-triage.sh nor other action handlers remove it, so a reopened/re-triaged issue can end up with not-planned plus another control label (e.g., ready-to-code). This breaks the pipeline’s mutual-exclusion expectations and can misroute downstream automation that keys off control labels.
Agent Prompt
## Issue description
The new `not-planned` control label is applied by `post-triage.sh` but is not cleared by `pre-triage.sh` and is not removed by other action handlers. This allows stale `not-planned` labels to persist across future triage runs (e.g., when an issue is reopened), creating conflicting control-label state.
## Issue Context
- `pre-triage.sh` is the pipeline’s label baseline reset script.
- `post-triage.sh` action handlers generally remove incompatible control labels (e.g., `blocked`, `needs-info`), but do not clear `not-planned` for non-`not-planned` actions.
## Fix Focus Areas
- scripts/pre-triage.sh[30-45]
- scripts/post-triage.sh[101-358]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
ReviewWell-structured addition of the One consumer of the triage action enum was not updated in this PR. Findings1.
|
Summary
Add
not-plannedaction to triage agent for closing issues as out-of-scope, invalid, or spam.Related Issue
Closes #2205
Changes
not-plannedto action enum intriage-result.schema.jsonnot-plannedcase that applies label and closes issue with reasonnot plannednot-plannedtoCONTROL_LABELSarraynot-plannedvs other actionsnot-plannedto control labels table indocs/agents/triage.mdnot-plannedaction behaviorTest plan
🤖 Generated with Claude Code