Skip to content

fix(claude-blocking-review): distinct skip reasons + SHA-scoped skip marker (v3.1.0) - #93

Merged
twistedmelonman merged 2 commits into
mainfrom
claude/fix-github-workflows-86-88-a1
Aug 7, 2026
Merged

fix(claude-blocking-review): distinct skip reasons + SHA-scoped skip marker (v3.1.0)#93
twistedmelonman merged 2 commits into
mainfrom
claude/fix-github-workflows-86-88-a1

Conversation

@twistedmelonman

Copy link
Copy Markdown
Member

Summary

Implements Part A1 of the reusable-workflows plan: two bug fixes to claude-blocking-review.yml, bumping to v3.1.0.

#86 — misleading skip log message. The Check review verdict step's short-circuit for skip paths used a single hardcoded "Doc-only skip" message regardless of which of three skip paths actually fired (workflow-self-modification, doc-only diff, Dependabot PR). Each skip path now writes its own skip/skip_reason output pair, and the verdict-check step logs the actual reason that fired.

#88 — unscoped skip marker silently bypasses all future runs. [skip-claude-review: reason] in the PR body was checked live with no scoping — once added, it silently bypassed every subsequent run on that PR, including runs against later, never-reviewed commits.

Fix (per the plan's adversarially-reviewed redesign, not the issue's original simpler suggestion):

  • New syntax: [skip-claude-review sha=<short-sha>: reason], matched against github.event.pull_request.head.sha (not github.sha, which is a synthetic merge-commit SHA on pull_request events) with a minimum 7-character prefix requirement to prevent a trivial bypass like sha=a.
  • Old-style unscoped markers continue to work exactly as today — unconditional skip, no SHA check. This is deliberate grandfathering, not a bug to "fix."
  • A sha=-scoped marker that doesn't match the current head SHA now emits a visible ::notice:: (with both SHAs) instead of silently doing nothing.
  • Documented (workflow header + README) that the correct way to make a freshly-added scoped marker take effect is gh run rerun <run-id> on the existing failed/blocked run — not a new commit/push, since a new push changes the head SHA and correctly invalidates a SHA-scoped marker (intentional anti-staleness behavior).

A second commit fixes the same escape-hatch check in the "Minimize PASS review comment" step, which the pre-push whole-codebase review caught was still using the pre-#88 regex and wouldn't recognize the new sha=-scoped form (closes #91, filed automatically by that review).

Both changes are additive/non-breaking — existing unscoped markers behave identically. Bumped to v3.1.0.

Changes

  • .github/workflows/claude-blocking-review.yml:
    • skip_reason output added to all three skip-detection branches (workflow-self-mod, doc-only, Dependabot)
    • Check review verdict step reads per-path skip_reason and logs the actual cause
    • SHA-scoped skip marker parsing and matching logic (7+ char prefix, github.event.pull_request.head.sha)
    • ::notice:: emitted when a scoped marker exists but doesn't match current head
    • "Minimize PASS review comment" step's escape-hatch check aligned with the same scoped/unscoped logic
    • Header comment documents the new syntax, grandfathering, and the gh run rerun recovery procedure
  • README.md: escape-hatch section expanded with the sha= syntax, scoping behavior, and the gh run rerun-not-a-new-commit guidance

Verification

  • YAML validated with yamllint (clean)
  • Shell logic extracted and checked with shellcheck -S info (only pre-existing-style SC2312 info notes, matching the file's established idiom)
  • Standalone bash harness exercised all branches of the SHA-prefix matching (unscoped, scoped-match, scoped-mismatch, too-short-reject) — all behave as designed
  • Local pre-commit/pre-push review (code-reviewer + adversarial-reviewer, with arbiter) passed on both commits
  • No existing test suite in this repo (workflow-only, no build/test/lint commands per repo convention)

Tagging / release

Per repo convention (confirmed via git log/tag dates: v3.0.0/v3 were both created immediately after PR #62 merged, pointing at the merge commit on main), tagging happens after merge — not part of this PR. After merge, will create v3.1.0 + move floating v3 to it, and a matching GitHub Release with notes covering both fixes.

Closes #86
Closes #88

https://claude.ai/code/session_0143Nf4sXqnTp2Kx3LNbMvBA

Claude Code Bot added 2 commits August 7, 2026 15:33
…marker

#86: each skip path (workflow-self-modification, doc-only diff,
Dependabot-authored PR) now writes its own skip/skip_reason output pair,
so the "Check review verdict" step logs the path that actually fired
instead of a hardcoded "Doc-only skip" message regardless of cause.

#88: the [skip-claude-review] escape hatch can now be scoped to a
specific commit via [skip-claude-review sha=<short-sha>: reason],
matched against github.event.pull_request.head.sha with a minimum
7-character prefix requirement. Unscoped markers (no sha=) continue to
work exactly as before, unconditionally, for backward compatibility. A
scoped marker that doesn't match the current head SHA now emits a
visible ::notice:: instead of silently doing nothing. Documented in the
workflow header and README that gh run rerun (not a new push) is the
correct way to make a freshly-added scoped marker take effect, since a
new commit changes the head SHA and correctly invalidates the old scope.

Both changes are additive — v3.1.0.

zizmor findings on this file (artipacked, template-injection,
known-vulnerable-actions, ref-version-mismatch x2) are all pre-existing
on main, unrelated to this diff — confirmed by diffing zizmor's output
against the pre-change file. Skipped per this repo's documented
SKIP=zizmor convention for pre-existing findings outside the changed
lines.

Closes #86, Closes #88

Claude-Session: https://claude.ai/code/session_0143Nf4sXqnTp2Kx3LNbMvBA
…ith sha= scoping

The "Minimize PASS review comment" step's escape-hatch detection still
used the pre-#88 regex, which doesn't match the new
[skip-claude-review sha=...] form. Flagged by the pre-push whole-codebase
review as #91.

Replace the regex-only check with the same unscoped/scoped-match logic
used in "Check review verdict": an unscoped marker or a sha=-scoped
marker matching the current head means nothing to minimize (no review
ran); a scoped marker that does NOT match the current head must fall
through to normal minimize logic, since in that case a real review did
run and may have posted a PASS comment.

Closes #91

Claude-Session: https://claude.ai/code/session_0143Nf4sXqnTp2Kx3LNbMvBA
@twistedmelonman
twistedmelonman merged commit 9615f93 into main Aug 7, 2026
3 checks passed
@twistedmelonman
twistedmelonman deleted the claude/fix-github-workflows-86-88-a1 branch August 8, 2026 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant