triage-issue: bot ignores pre-merge failure, commits unformatted code
Problem
The triage bot in run 22795714447 committed code with formatting errors because it ignored a failing pre-merge check. The pre-merge hook failed with:
◎ Running pre-merge project:pre-commit
pre-commit run --all-files
sh: 1: pre-commit: not found
✗ pre-merge command failed: pre-commit: exit status: 127
The bot saw this output but proceeded to commit anyway, resulting in a CI lint failure and requiring a second cargo fmt commit on PR #1331.
Root cause
Two factors:
-
pre-commitis not installed in theclaude-issue-triageCI environment. The triage skill tells the bot to runcargo run -- hook pre-merge --yes, but that depends onpre-commitbeing available. -
The bot ignored the visible failure. Even though the output clearly showed
✗ pre-merge command failed, the bot piped through| tail -30(hiding the exit code) and did not react to the error text in the output.
Additional: stale gh run watch reference
The triage-issue skill still references gh run watch on line 136, which was flagged in #1316 but not actually fixed before that issue was closed. The bot correctly followed the running-in-ci skill's poll loop instead, but the inconsistency remains.
Suggested fix
Update the triage-issue skill step 6 to:
- Add
cargo fmtas a fallback lint check whenpre-mergefails (sincepre-commitmay not be installed) - Replace
gh run watchwith the poll approach fromrunning-in-ci
did this have a PR attached?
@worktrunk-bot did this have a PR attached?
Yes — #1333 was created to address both issues raised here (installing pre-commit in the claude-setup action and replacing the stale gh run watch reference). It has already been merged.
ok, diagnose why we didn't initially get a response to this and create a PR fixing it
Diagnosed the issue and opened #1352 to fix it.
Root cause: The verify-engagement step for plain issues only checked whether the bot had commented — it didn't check issue authorship. Since I opened #1332 but hadn't commented on it yet, the verify step found zero bot comments and skipped the entire job.
For PRs, there's an equivalent author check (PR_AUTHOR == worktrunk-bot), but the plain-issue branch was missing it.
Run 22806824478 confirms: the verify step ran, all subsequent steps (checkout, Claude) were skipped.
The fix adds the same author check for issues that already exists for PRs.