Skip Dependabot `pull_request` completions in `Agent Provider Health`

Merged
DS
2mo ago
+36-20

This pull request was posted by Claude Code using claude-opus-5-5 on behalf of David.

Dependabot-triggered runs get Dependabot secrets instead of Actions secrets, and this repo's Dependabot secret store is empty, so they have no ZAI_API_KEY. When Dependabot PR #10180 ran Pydantic AI UI Security Review (run), its health artifact reported missing_api_key and Agent Provider Health opened provider-wide incident #10181, which blocked every agent run with a healthy quota until it was closed by hand. The fork gate from #9756 did not catch it: the run's head_repository is this repository.

Extend the monitor job's pull_request gate to also skip completions whose actor is dependabot[bot], and enforce the new condition in the workflow policy checker, as #9756 did for forks. The gate keys on actor rather than triggering_actor or the dependabot/ head branch because GitHub applies the Dependabot restrictions by github.actor "even if the workflow is re-run by a different actor" (docs). The run above has actor and triggering_actor both dependabot[bot]. The gate stays scoped to pull_request: those restrictions do not cover workflow_run, so a Dependabot-triggered CI Review still receives the key (run) and is still reconciled.

New public surface: none.

User-visible behavior: Before: a Dependabot pull_request completion reached the monitor without provider credentials and published quota_unknown. After: the monitor job is skipped for that completion.

Verification: test_provider_health_monitor_rejects_credentialless_runs accepts the current monitor and rejects both the ungated condition behind #9753 and the fork-only condition behind #10181. The targeted policy tests, the live repository policy check, Pyright on .github/scripts, and the commit hooks (including Zizmor) pass.

Existing users: Library behavior is unchanged. Other same-repository completions, including Dependabot-triggered CI Review runs, scheduled quota checks and manual recovery keep their current behavior. The policy check's violation id is now provider-health-monitor-credential-gate, since it covers both cases.

The skip takes effect after merge, because workflow_run uses the default-branch workflow.

Checklist

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