Commit ccb3a87
committed
fix(release): address PR #3407 review feedback (12 items)
Applies must-fix correctness improvements plus optional polish surfaced
by cursor, codex, greptile, claude, and coderabbit bot reviews. None of
these change the high-level shape of the release gate or session hooks
documented in the design spec; they harden the edges.
Release gate (rakelib/release.rake):
- Combine .contexts + .checks[].context in the branch-protection query so
newer `checks`-based protection rules don't return an empty array and
trip the :no_required_checks path (cursor, greptile).
- Treat an empty result from that query as nil so the caller falls back
to "evaluate every check" rather than aborting (fail-safe).
- Dedupe check_runs by name, keeping the highest id (= latest attempt),
so an old failed run that was re-run and passed no longer blocks the
release (codex P1, greptile).
- Plumb dry_run/allow_override into fetch_main_ci_checks so dry-run on
a machine without gh/network warns instead of aborting (codex P2).
- Use capture_gh_output for all `gh api` calls so a missing gh binary
surfaces the friendly install hint instead of crashing with
Errno::ENOENT (coderabbit).
- Check failed runs before in-progress runs. If both are present, the
operator now sees the real blocker immediately instead of waiting for
the in-progress run to finish before discovering the failure (claude).
- Fix grammar of the success message ("(2 checks)" / "(1 required
check)") and switch override instructions to `bundle exec rake`
(claude, coderabbit).
Session hooks (.claude/hooks/):
- main-ci-status.sh: resolve origin/main HEAD via `git ls-remote origin
main` instead of the latest push-workflow run's headSha so the SHA
matches the release gate and doesn't lag right after a push or for
paths-ignored pushes (cursor).
- main-ci-status.sh: when no check runs are visible for the commit,
print "no check runs visible yet" instead of `Total: 0 | ... | 0`,
which an agent could misread as "all green" (cursor).
- main-ci-status.sh: write the cache via mktemp + mv so a concurrent
reader never sees a half-written file (claude).
- main-ci-status-on-push.sh: replace substring case-globs with anchored
bash regexes so `git push origin main-feature` / `maintenance` /
`main-ci-fix` no longer match. Drop the redundant `--force` case
(greptile P2, claude).
Tests:
- Add specs for the dedupe path, the failed-before-in-progress order,
the dry-run fetch-failure path, the empty-array branch-protection
fallback, and the missing-gh Errno::ENOENT path.
- Update existing assertions for the new success-message grammar.
Docs:
- docs/superpowers/specs/2026-05-25-...: mark Implemented, add language
identifiers to bare fenced code blocks (MD040), update override
instructions to use `bundle exec rake` (coderabbit).1 parent 666f5d3 commit ccb3a87
5 files changed
Lines changed: 267 additions & 102 deletions
File tree
- .claude/hooks
- docs/superpowers/specs
- rakelib
- react_on_rails/spec/react_on_rails
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
20 | 21 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
42 | 53 | | |
43 | 54 | | |
44 | 55 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | 56 | | |
63 | 57 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
68 | 75 | | |
69 | 76 | | |
70 | 77 | | |
| |||
93 | 100 | | |
94 | 101 | | |
95 | 102 | | |
96 | | - | |
97 | 103 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
120 | 141 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
| 142 | + | |
125 | 143 | | |
126 | 144 | | |
Lines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
| 165 | + | |
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
303 | | - | |
| 303 | + | |
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
307 | | - | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
308 | 315 | | |
309 | 316 | | |
310 | | - | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
311 | 325 | | |
312 | 326 | | |
313 | 327 | | |
314 | 328 | | |
315 | 329 | | |
316 | 330 | | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
322 | 343 | | |
323 | 344 | | |
324 | 345 | | |
| |||
332 | 353 | | |
333 | 354 | | |
334 | 355 | | |
335 | | - | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
336 | 362 | | |
337 | 363 | | |
338 | 364 | | |
339 | 365 | | |
340 | 366 | | |
341 | 367 | | |
342 | 368 | | |
343 | | - | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
344 | 374 | | |
345 | 375 | | |
346 | 376 | | |
| |||
384 | 414 | | |
385 | 415 | | |
386 | 416 | | |
387 | | - | |
| 417 | + | |
388 | 418 | | |
389 | | - | |
| 419 | + | |
390 | 420 | | |
391 | 421 | | |
392 | 422 | | |
393 | 423 | | |
394 | 424 | | |
395 | 425 | | |
396 | 426 | | |
397 | | - | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
398 | 433 | | |
399 | 434 | | |
400 | 435 | | |
| |||
408 | 443 | | |
409 | 444 | | |
410 | 445 | | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
411 | 455 | | |
412 | 456 | | |
413 | 457 | | |
| |||
423 | 467 | | |
424 | 468 | | |
425 | 469 | | |
426 | | - | |
427 | | - | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
428 | 478 | | |
429 | | - | |
| 479 | + | |
430 | 480 | | |
431 | 481 | | |
432 | 482 | | |
433 | 483 | | |
434 | 484 | | |
435 | 485 | | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
| 486 | + | |
| 487 | + | |
440 | 488 | | |
441 | | - | |
| 489 | + | |
442 | 490 | | |
443 | 491 | | |
444 | 492 | | |
445 | 493 | | |
446 | 494 | | |
447 | 495 | | |
448 | | - | |
449 | | - | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
450 | 499 | | |
451 | 500 | | |
452 | 501 | | |
| |||
0 commit comments