feat: implement issue #1921 — Harden the maintainer-comment gate against marker forgery and login-collision auto-clear

Merged
DO
7d ago
+158-18

Problem

Harden the maintainer-comment gate against marker forgery and login-collision auto-clear

From the issue: Two review findings on PR #1920 (the #1918 fix) identify pre-existing / cross-cutting gaps in the maintainer-comment gate's trust model. They are out of scope for #1920's minimal review-fix and are tracked here.

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_maintainer_comment_gate.bats,tests/dev-lead/unit/test_maintainer_resolve_comment.bats tests/test_review_one_pr_carry_forward.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 #1921