Skip to content

ci: re-applying the deep-review label re-runs the deep review - #281

Merged
allxsmith merged 1 commit into
mainfrom
ci/deep-review-rerun
Jul 11, 2026
Merged

allxsmith merged 1 commit into
mainfrom
ci/deep-review-rerun

Conversation

@allxsmith

@allxsmith allxsmith commented Jul 11, 2026 •

Copy link
Copy Markdown
Owner

Pull Request

Description

The deep-review label was a strict one-shot: once a PR carried the <!-- claude-deep-review --> marker, re-applying the label was a silent no-op, so there was no way to get a fresh opus review after new commits landed or after the review prompt improved. This PR makes a deep-review labeled event skip the marker probe — re-applying the label is an explicit "run a fresh review" request from a human whose triage+ role the workflow already re-verifies live.

Cost model is unchanged in spirit: one opus session per deliberate label application, human-metered. The AI-loop path and the label-at-creation double-fire keep the original one-review invariant (their dedupe is untouched), so the loop can never re-trigger reviews on itself.

Also updates the two docs that stated "once ever per PR": the label table in docs/docs/guides/getting-started/ai-development.md and the root CLAUDE.md loop section — both now say "re-apply to re-run".

  • bulma-ui (@allxsmith/bestax-bulma)
  • create-bestax (create-bestax)
  • docs (@allxsmith/bestax-docs)
  • Other (please specify): repo tooling (.github/workflows/claude-review.yml) + docs

Related Issue(s)

Refs #273

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Performance
  • Build tooling
  • Other (please describe):

Checklist

  • My code follows the project style guidelines
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or that my feature works (n/a — workflow YAML, parse-validated)
  • I have added/updated documentation as needed
  • I have updated Storybook stories as needed (bulma-ui) (n/a)
  • My changes require a change to the documentation
  • All new and existing tests passed (no code paths touched; prettier passes on the changed markdown)
  • Any relevant dependencies are updated (n/a)
  • If this PR changes commands, conventions, or package structure, the affected CLAUDE.md files are updated

Screenshots / Demos

n/a

Additional Context

🤖 Generated with Claude Code

https://claude.ai/code/session_01Pohc8xLkdx4gwXkW3xd7up


Generated by Claude Code

Summary by CodeRabbit

  • New Features

    • Re-applying the deep-review label now triggers another deep review for a pull request.
  • Documentation

    • Updated contributor guidance and the AI development guide to explain the revised deep-review label behavior.

The per-PR dedupe marker made the label a one-shot: once a PR carried
<!-- claude-deep-review -->, relabeling was a silent no-op, so there was
no way to get a fresh opus review after new commits or prompt upgrades.
deep-review labeled events (already live-verified as triage+) now skip
the marker probe — one opus session per deliberate label application.
The ai-loop path and label-at-creation double-fire keep the one-review
invariant unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pohc8xLkdx4gwXkW3xd7up
@coderabbitai

coderabbitai Bot commented Jul 11, 2026 •

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The deep-review workflow now reruns when the deep-review label is re-applied, while other events retain marker-based deduplication. Project and guide documentation now describe the updated label lifecycle.

Changes

Deep-review label re-application

Layer / File(s) Summary
Deep-review deduplication exception
.github/workflows/claude-review.yml
The deduplication step detects deep-review label events and forces a fresh review instead of using the existing marker probe.
Deep-review lifecycle guidance
CLAUDE.md, docs/docs/guides/getting-started/ai-development.md
Documentation states that re-applying the deep-review label runs the deep review again.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • allxsmith/bestax#216: Introduced the Claude deep review workflow and marker-based deduplication that this change extends.
  • allxsmith/bestax#278: Added related deep-review label handling and documentation in the same workflow.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: re-applying the deep-review label triggers a fresh review.
Description check ✅ Passed The description largely follows the template and includes the summary, affected area, issue reference, type, checklist, and additional context.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/deep-review-rerun

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

Preview Deployment

Preview URL: https://082e7263.bestax.pages.dev

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/claude-review.yml:
- Around line 98-120: The deduplication bypass in the “Skip if already reviewed”
step allows initial deep-review label events to evade the marker probe and run
duplicate reviews. Update the labeled deep-review handling to distinguish
deliberate re-labels from label-at-creation events, preserving the probe for
initial labels, and revise the surrounding one-review-invariant comment to match
the corrected behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: df100a70-29f9-49f0-96c7-acf64f41c544

📥 Commits

Reviewing files that changed from the base of the PR and between dfaff24 and e3957b8.

📒 Files selected for processing (3)
  • .github/workflows/claude-review.yml
  • CLAUDE.md
  • docs/docs/guides/getting-started/ai-development.md

Comment on lines +98 to +120
#
# EXCEPTION — deep-review `labeled` events skip the probe: a triage+
# human re-applying the label (verified live by the perm step above)
# is an explicit "run a fresh review" request, e.g. after new commits
# or a prompt upgrade. Usage stays human-metered: one opus session per
# deliberate label application. The ai-loop path and label-at-creation
# double-fires keep the one-review invariant.
- name: Skip if already reviewed
id: dedupe
if: steps.perm.outputs.allowed == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
PR: ${{ github.event.pull_request.number }}
ACTION: ${{ github.event.action }}
LABEL: ${{ github.event.label.name }}
run: |
set -euo pipefail
if [ "$ACTION" = "labeled" ] && [ "$LABEL" = "deep-review" ]; then
echo "skip=false" >> "$GITHUB_OUTPUT"
echo "deep-review label applied by a verified triage+ user — running a fresh review"
exit 0
fi

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Inspect the trigger/concurrency config and the (unchanged) header comment
# referenced elsewhere as lines 10-17, to confirm the double-fire premise.
sed -n '1,45p' .github/workflows/claude-review.yml

Repository: allxsmith/bestax

Length of output: 2068


🏁 Script executed:

#!/bin/bash
set -euo pipefail
nl -ba .github/workflows/claude-review.yml | sed -n '45,170p'

Repository: allxsmith/bestax

Length of output: 194


🏁 Script executed:

#!/bin/bash
set -euo pipefail
awk 'NR>=45 && NR<=170 { printf "%4d %s\n", NR, $0 }' .github/workflows/claude-review.yml

Repository: allxsmith/bestax

Length of output: 6701


deep-review relabel bypass breaks the one-review invariant

  • The ACTION == 'labeled' && LABEL == 'deep-review' fast path skips the marker probe, so a PR created with deep-review already attached still fires both opened and labeled and runs Claude twice. Keep the probe here, or gate this bypass on a signal that distinguishes a deliberate re-label from the initial label-at-creation event.
  • The surrounding comment about the marker capping reviews at one per PR is now inaccurate and should be updated too.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/claude-review.yml around lines 98 - 120, The deduplication
bypass in the “Skip if already reviewed” step allows initial deep-review label
events to evade the marker probe and run duplicate reviews. Update the labeled
deep-review handling to distinguish deliberate re-labels from label-at-creation
events, preserving the probe for initial labels, and revise the surrounding
one-review-invariant comment to match the corrected behavior.

Source: Learnings

@allxsmith
allxsmith merged commit 8d78d96 into main Jul 11, 2026
20 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 5.4.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@allxsmith
allxsmith deleted the ci/deep-review-rerun branch July 31, 2026 04:46
@bestax-release-bot

Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants