Repository navigation
CLAUDE.md: document the double-push review-race variant - #249
Conversation
…ck shortcut Extends the existing "canceled review can red-X require-review" section: the same race also fires from two ordinary pushes close together (not just a push plus an @claude review comment), and it's not a workflow defect to fix -- cancel-in-progress on a stale commit is the correct behavior. Adds a cheap self-check (compare the failing SHA against the PR's current head) to skip investigation without an extra tool call.
Codecov Report✅ All modified and coverable lines are covered by tests. |
| rare double-push. The fix is behavioral: batch closely-related changes into | ||
| one commit/push instead of two in quick succession. | ||
|
|
||
| **Cheap self-check before investigating any CI-failure webhook event:** |
There was a problem hiding this comment.
Scope overreach: this shortcut only applies to require-review/claude-review, not "any CI-failure webhook event."
The mechanism this paragraph relies on — a stale run getting canceled by cancel-in-progress: true on supersession — is specific to two jobs in this repo: claude-code-review.yml's claude-review (group claude-review-<PR#>) and preview.yml's preview job. _selftest.yml (which runs check-links, phi-tests, bib, coverage, review-fail-check, etc.) has no concurrency: block at all, so a superseded commit's _selftest job is never canceled — a genuine failure there can coexist with a SHA that no longer matches head (e.g. the reader simply hasn't re-checked after a later push landed).
As written, "before investigating any CI-failure webhook event... the event is almost certainly this exact race" tells a future reader to skip confirming cancelled vs failure for any failing check, not just claude-review/require-review. Applied to a _selftest job, that shortcut would wrongly wave off a real bug as "just the race." Per this file's own rule 4 ("every factual claim... needs either reasoning... and a bare assertion with neither is a finding"), the "any" scope is asserted without the reasoning that actually only supports the two cancel-in-progress jobs.
Suggest narrowing the opening clause:
| **Cheap self-check before investigating any CI-failure webhook event:** | |
| **Cheap self-check before investigating a post-push `require-review`/`claude-review` failure:** |
(Separately, minor: line 406's "the flagged run" introduces a third term for the same referent this paragraph otherwise calls "the failing check"/"the event" — consider reusing one of those instead for consistency.)
Code reviewDocumentation-only PR extending the existing "A canceled review can red-X require-review" section in
One finding posted inline (CLAUDE.md:398): the new "Cheap self-check" paragraph scopes itself to "any CI-failure webhook event," but the underlying mechanism (a canceled run from No other issues found — the addition matches this file's own established style (bold-lead-in paragraphs, em-dash usage, parenthetical real-world citations), doesn't restate the section it extends (it documents a genuinely distinct trigger: two ordinary pushes colliding, no comment/dispatch involved), and its reasoning against a debounce-based fix is adequately defended. VerdictNeeds minor revision — one scoping fix suggested inline (a one-line wording change); everything else checks out. |
|
Claude finished review — View run gh pr comment 249 --repo d-morrison/gha --body "$(cat <<'EOF' Code reviewDocumentation-only PR extending the existing "A canceled review can red-X require-review" section in
One finding posted inline (CLAUDE.md:398): the new "Cheap self-check" paragraph scopes itself to "any CI-failure webhook event," but the underlying mechanism (a canceled run from No other issues found — the addition matches this file's own established style (bold-lead-in paragraphs, em-dash usage, parenthetical real-world citations), doesn't restate the section it extends (it documents a genuinely distinct trigger: two ordinary pushes colliding, no comment/dispatch involved), and its reasoning against a debounce-based fix is adequately defended. VerdictNeeds minor revision — one scoping fix suggested inline (a one-line wording change); everything else checks out. |
The cancel-in-progress mechanism only applies to claude-review/preview, not every CI job -- _selftest.yml has no concurrency block, so applying the shortcut there could wrongly dismiss a real failure as the race. Also drops the redundant "the flagged run" phrasing.
|
Claude finished review — View run Code review — PR #249:
|
* Code review guidelines: add item 14, don't reinvent the wheel (closes #264) Companion to Morrison-Lab/ai-config#603, which enshrines DRW as a dev and review principle and starts a central big-picture-principles catalog. Follows the hedged proposed-in-ai-config#N citation convention while that PR is open. Per #247/#249 precedent, a CLAUDE.md-only guidelines change takes no changelog.d fragment. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01V5v5mUjURB2YW1nJW2Ai9S * Item 14: specify where the checked-nothing-fit note lives (review round 1) Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01V5v5mUjURB2YW1nJW2Ai9S * Item 14: qualify the marketplace entry as vetted, well-maintained, SHA-pinned (review round 2) Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01V5v5mUjURB2YW1nJW2Ai9S --------- Co-authored-by: Claude <[email protected]>
Documentation-only extension of the existing "A canceled review can red-X
require-review" section.
What
Two closely-spaced ordinary pushes (not just a push plus an
@claude reviewcomment) trigger the samecancel-in-progressrace onclaude-review's concurrency group — the second push's review cancels thefirst's. This is correct, intended behavior (only the latest commit's
review matters), not a workflow defect, so no code change accompanies
this — just documentation making that explicit, plus a cheap SHA-comparison
shortcut to skip investigating a stale-commit CI-failure event without an
extra tool call.
Why
Hit live on
Lacaedemon/spartaPR #780: two pushes ~3 minutes aparttriggered a
require-reviewfailure event on the non-head commit;confirmed via
get_workflow_runthat the flagged run's conclusion wascancelled, matching the existing documented pattern but via a differenttrigger (two pushes, not a push + comment). Recording the variant and the
faster diagnostic shortcut for next time.
Generated by Claude Code