Skip to content

Commit e7f89cd

Browse files
justin808claude
andcommitted
fix(release): review feedback round 8 (2 items)
- release.rake: only label success-message count as "required" when `evaluated` was actually filtered to the required subset. On stable releases the filter is skipped, so reporting "(N required checks)" misrepresented the count when branch protection was visible. - main-ci-status.sh: replace stale `release.rake:451-455` line-number pointer (which now lands inside an error heredoc) with a stable reference to `validate_main_ci_status!` so the "keep in sync" note does not rot on the next edit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent c6210a0 commit e7f89cd

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

.claude/hooks/main-ci-status.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ checks_jsonl=$(gh api \
121121
# attempt (highest check_run id). The key intentionally includes the
122122
# suite id so we only collapse true reruns and not unrelated workflows
123123
# that happen to share a job name (e.g. this repo has multiple workflows
124-
# that each define a `detect-changes` job). Mirrors the Ruby dedup at
125-
# release.rake:451-455. Keep the two in sync.
124+
# that each define a `detect-changes` job). Mirrors the Ruby dedup in
125+
# `validate_main_ci_status!` (rakelib/release.rake). Keep the two in sync.
126126
checks_json=$(echo "${checks_jsonl}" | jq -s '
127127
[.[] | {id, name, status, conclusion, html_url, suite_id: (.check_suite.id // .id)}]
128128
| group_by([.suite_id, .name])

rakelib/release.rake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,12 @@ def validate_main_ci_status!(monorepo_root:, is_prerelease:, allow_override:, dr
583583
return
584584
end
585585

586-
qualifier = required_names.nil? ? "" : "required "
586+
# Only label the count "required" when `evaluated` was actually filtered to
587+
# the required subset (prerelease + branch protection visible). On stable
588+
# releases we keep evaluating every check_run, so the count includes
589+
# non-required runs and labelling them "required" would misrepresent the
590+
# gate.
591+
qualifier = is_prerelease && required_names ? "required " : ""
587592
noun = evaluated.length == 1 ? "check" : "checks"
588593
puts "✓ Main CI is healthy on #{short_sha} (#{evaluated.length} #{qualifier}#{noun})"
589594
end

0 commit comments

Comments
 (0)