feat: implement issue #2211 — dev-lead fix-bot-comment built a commit that undoes the PR's whole diff — the no-op guard caught it, but PR #2198 was held with its fix intact

DO
1mo ago
+241-5

Problem

dev-lead fix-bot-comment built a commit that undoes the PR's whole diff — the no-op guard caught it, but PR #2198 was held with its fix intact

From the issue: On PR #2198 (2026-10-10) a fix-bot-comment pass built a commit that undid the PR's whole diff. The no-op guard (#1340/#1786) refused to push it and applied needs-human-review, which is the guard working. But the pass should never have produced that commit, and the hold message told the reader the opposite of what was true.

Risk

Low — changes automation shell logic under scripts/, covered by shellcheck (--severity=warning) and the bats suite.

Test plan

Tests added/updated: tests/dev-lead/unit/test_retry_dispatch_pr_head.bats. Verification: bash scripts/dev-lead-lint.sh (shellcheck --severity=warning) ran pre-commit; the bats suite runs in CI.

Rollback

Revert this PR. No non-revertible side effects (no tags, migrations, or external state).

Monitoring

This PR's Lint (shellcheck) and bats checks show pass/fail; watch subsequent dev-lead / pr-review runs for behavioral regressions.

Closes #2211