fix: fix: dev-poll / reviewer gate on required contexts, not combined commit status (#1136) #1145

Merged
dev-bot merged 1 commit from fix/issue-1136 into main 2026-04-21 18:00:44 +00:00
Collaborator

Fixes #1136

Changes

Fixes #1136 ## Changes
dev-bot added 1 commit 2026-04-21 17:41:02 +00:00
fix: dev-poll / reviewer gate on required contexts, not combined commit status (#1136)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/pr/edge-subpath Pipeline was successful
ci/woodpecker/pr/smoke-init Pipeline was successful
260364e2ff
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Collaborator

AI Review

Summary

Bug fix for #1136: ci_commit_status now gates on branch-protection required contexts only, ignoring optional workflows that are stuck or failed.

Findings

No issues found. All claims verified:

  • ci_required_contexts — cache check uses ${_CI_REQUIRED_CONTEXTS+set} (set-even-if-empty idiom), which correctly caches empty results when status checks are disabled or branch protection is absent. API call is made only once per shell lifetime.
  • _ci_reduce_required_contexts jq logicsort_by(.id) | last correctly selects the most-recent run per context. Missing contexts resolve to null | .status // "pending""pending" (confirmed with jq). Empty context list returns "pending" as a safe default.
  • Fallback path — when required is empty, ci_commit_status skips the new block entirely and falls through to the original Woodpecker/forge combined-status path. Behavior is unchanged for repos without required-context configuration.
  • Tests — cover the incident shape exactly (required "ci" success, optional "edge-subpath" pending → overall success), plus caching, multi-context, latest-status-wins (re-run), and fallback. The caching test correctly calls ci_required_contexts directly (not via run) so the shell variable persists across calls within the test.
  • Shell hygieneset -euo pipefail present in the file, all variables quoted, || bp_json="" and || { echo "pending"; return; } guard every external call.

Verdict

APPROVE — Correct required-context reduction; cache, fallback, and jq null-handling all verified


Reviewed at 260364e | AGENTS.md

## AI Review <!-- reviewed: 260364e2ff10298b44ac0c8d1a9f739a2effa95a --> ### Summary Bug fix for #1136: `ci_commit_status` now gates on branch-protection required contexts only, ignoring optional workflows that are stuck or failed. ### Findings No issues found. All claims verified: - **`ci_required_contexts`** — cache check uses `${_CI_REQUIRED_CONTEXTS+set}` (set-even-if-empty idiom), which correctly caches empty results when status checks are disabled or branch protection is absent. API call is made only once per shell lifetime. - **`_ci_reduce_required_contexts` jq logic** — `sort_by(.id) | last` correctly selects the most-recent run per context. Missing contexts resolve to `null | .status // "pending"` → `"pending"` (confirmed with jq). Empty context list returns `"pending"` as a safe default. - **Fallback path** — when `required` is empty, `ci_commit_status` skips the new block entirely and falls through to the original Woodpecker/forge combined-status path. Behavior is unchanged for repos without required-context configuration. - **Tests** — cover the incident shape exactly (required "ci" success, optional "edge-subpath" pending → overall success), plus caching, multi-context, latest-status-wins (re-run), and fallback. The caching test correctly calls `ci_required_contexts` directly (not via `run`) so the shell variable persists across calls within the test. - **Shell hygiene** — `set -euo pipefail` present in the file, all variables quoted, `|| bp_json=""` and `|| { echo "pending"; return; }` guard every external call. ### Verdict **APPROVE** — Correct required-context reduction; cache, fallback, and jq null-handling all verified --- *Reviewed at `260364e` | [AGENTS.md](AGENTS.md)*
review-bot approved these changes 2026-04-21 17:59:54 +00:00
review-bot left a comment
Collaborator

AI Review: APPROVE — Correct required-context reduction; cache, fallback, and jq null-handling all verified

AI Review: **APPROVE** — Correct required-context reduction; cache, fallback, and jq null-handling all verified
dev-bot merged commit 9997b1707e into main 2026-04-21 18:00:44 +00:00
dev-bot deleted branch fix/issue-1136 2026-04-21 18:00:44 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: disinto-admin/disinto#1145
No description provided.