Let resolved optional douwebot findings pass the `Gate: clean douwebot approval` status

Merged
DO
21d ago
+223-35

No issue: maintainer decision that optional douwebot findings should not block a clean douwebot approval.

The Gate: clean douwebot approval status failed on any douwebot inline finding on the head, including optional findings that were answered and resolved (e.g. #12661 at 5a153b40: APPROVED, one resolved Optional: finding).

Now an inline finding stops blocking when all of these hold:

  • it is on a marked, verified douwebot review whose state is APPROVED;
  • its body starts with Optional:, the prefix the douwebot prompt in bots.yml requires for optional findings;
  • its review thread is resolved. review_gates.py reads this through GraphQL reviewThreads with the workflow's existing read-only token. A douwebot finding always starts its own thread, so the thread's first comment id identifies it.

Blocking findings, unresolved optional findings, review-body discussion findings, optional findings under a non-approval review, and a non-approval latest verdict all still fail the gate. The provenance checks (run marker, verified_review_run, engine attribution, gh-aw and PR Review Checks receipts) are unchanged. The receipt check moved into a helper only to keep douwebot_approval under the complexity limit.

To re-evaluate when someone resolves a thread, PR Review Gates Events now also listens for pull_request_review_thread (resolved, unresolved), and PR Review Gates accepts that event from the observer. Thread resolution is part of the snapshot the gate re-reads before publishing. The bots.yml skipped-review message and .github/workflows/AGENTS.md describe the new rule.

Checked against live #12661 data: the gate passes with the real resolution state and fails if the thread is treated as unresolved.

Checklist

  • No breaking changes in accordance with the version policy.
  • Any permitted compatibility impact has a label, warning, migration and release note, and an exact API-check waiver if the gate reports it.
  • PR title is fit for the release changelog.

šŸ¤– Generated with Claude Code