fix: fix: triage agent creates root cause issues without backlog label (#386) #392
No reviewers
Labels
No labels
action
backlog
blocked
bug-report
in-progress
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
tech-debt
underspecified
vision
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#392
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-386"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #386
Changes
AI Review
Summary
The PR takes a two-pronged approach to fix missing backlog labels on triage-created root-cause issues:
["backlog"]to[{"name": "backlog"}]The prompt format fix is reasonable (Forgejo's create-issue API may accept name objects). The post-processing intent is correct. However, the regex used in post-processing has a critical bug that will corrupt labels on unintended issues.
Findings
critical
entrypoint-reproduce.sh:501: The third regex alternative|#[0-9]+matches any#numberanywhere in Claude's output — including the original issue being triaged and every issue referenced in the triage summary. The triage formula generates output containing things like "Decomposed from #${ISSUE_NUMBER}", "cause 1 of M", and dependency references like "#X if this depends on another cause". All of these will be captured, causing the script to add the backlog label to the original bug-report issue and any referenced issues, corrupting their label state.The fix is to drop the overly broad third alternative and only match patterns that are unambiguously about issue creation:
Non-blocking observations
entrypoint-reproduce.sh:501: The patternharb#[0-9]+is unusual — it appears to be an artifact of a specific forge URL format. If this is intentional, a comment explaining it would help.entrypoint-reproduce.sh:507:_label_idis correctly called once before the loop (good), but if it returns empty, no label is added and no warning is logged. Alog "WARNING: could not get backlog label ID"branch would aid debugging.[{"name": "backlog"}]in both files is the right direction — the post-processing is a sound belt-and-suspenders fallback, but only once the regex bug is fixed.Verdict
REQUEST_CHANGES — Post-processing regex is too broad and will incorrectly label the original issue and any referenced issues
Reviewed at
ad1acc0| AGENTS.mdAI Review: REQUEST_CHANGES — Post-processing regex is too broad and will incorrectly label the original issue and any referenced issues
ad1acc092eto9a22e407a4AI Re-review (round 2)
Previous Findings
|#[0-9]+regex → FIXED: Replaced with(Created|created) issue #[0-9]+|(Created|created) #[0-9]+|harb#[0-9]+. Bare#numberreferences are no longer captured, preventing accidental labeling of the original issue and dependency references. The comment above the grep also documents the intent clearly._label_idreturns empty → FIXED:BACKLOG_IDcheck moved outside the loop with an explicitlog "WARNING: could not get backlog label ID"branch.harb#[0-9]+unexplained → NOT FIXED: still no comment explaining this pattern, but it's non-blocking and harmless.Assessment
The incremental diff is clean and minimal — it fixes exactly the two issues flagged without introducing anything new. The restructured guard (
if [ -z "$BACKLOG_ID" ]wrapping the loop instead of checking inside each iteration) is also a small correctness improvement. No new issues found.Verdict
APPROVE — Critical regex bug fixed; all previous findings addressed
Reviewed at
9a22e40| Previous:ad1acc0| AGENTS.mdAI Re-review (round 2): APPROVE — Critical regex bug fixed; all previous findings addressed