Skip to content

ci: stop deleting prior Claude review comments#217

Merged
d-morrison merged 3 commits into
mainfrom
fix/claude-review-preserve-reviews
May 18, 2026
Merged

ci: stop deleting prior Claude review comments#217
d-morrison merged 3 commits into
mainfrom
fix/claude-review-preserve-reviews

Conversation

@d-morrison

Copy link
Copy Markdown
Member

Summary

  • Removes the Delete prior Claude sticky comments so the new one lands at the bottom step from .github/workflows/claude-code-review.yml.
  • That step ran first and wiped every Claude-authored top-level PR comment (matching claude[bot] by ID or any bot whose login contains "claude") before the review step ran. When the review step then failed — e.g. Workflow initiated by non-human actor: claude (type: Bot) after a Claude-pushed fix commit — the prior review was destroyed with no replacement.
  • Concrete example: @claude review comment #4480734783 on PR #207 (2026-05-18T18:32:52Z) triggered run 26052743776, which posted a CRAN-readiness review as comment 4480737380. A synchronize event 17 min later triggered the deletion step in run 26053637375, which deleted that review (and three other Claude comments) at 18:57:08–11Z, then failed to post a fresh review due to the bot-actor gate. Net result on PR Prepare v0.1.0 for first CRAN submission #207: zero surviving Claude review comments out of multiple invocations.

Behavior after this change

  • @claude review invocations via claude.yml (use_sticky_comment: false): each posts a new comment, never deleted. Explicit review history accumulates.
  • Auto-trigger on pull_request via claude-code-review.yml (use_sticky_comment: true): the action's own sticky-comment logic continues to collapse repeated auto-runs onto one in-place comment, so the noise floor doesn't grow with push count.
  • A future review-step failure no longer destroys the previous review.

Test plan

  • After merge, @claude review on an open PR and confirm the resulting comment survives the next push to that PR.
  • Push a commit to a PR and confirm Claude Code Review updates its sticky in place rather than creating a duplicate.
  • Confirm no comment_deleted events from github-actions[bot] appear on a PR's timeline after a Claude Code Review run.

🤖 Generated with Claude Code

The "Delete prior Claude sticky comments" step in claude-code-review.yml
ran unconditionally before the review step and wiped every Claude-authored
top-level PR comment — including reviews posted by the @claude-triggered
workflow (claude.yml, use_sticky_comment: false). When a Claude-pushed
commit then re-fired pull_request:synchronize, the action's bot-actor gate
refused to run, so the prior review was deleted with no replacement.

Remove the deletion step entirely. With use_sticky_comment: true the
action still collapses repeated auto-runs onto a single in-place sticky,
and @claude-triggered review comments are now preserved indefinitely.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 18, 2026 21:19
@github-actions github-actions Bot removed the request for review from Copilot May 18, 2026 21:19
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 18, 2026 21:24
@github-actions github-actions Bot removed the request for review from Copilot May 18, 2026 21:24
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 18, 2026 21:26
@github-actions github-actions Bot removed the request for review from Copilot May 18, 2026 21:27
@d-morrison d-morrison merged commit d0ff786 into main May 18, 2026
13 of 14 checks passed
@d-morrison d-morrison deleted the fix/claude-review-preserve-reviews branch May 18, 2026 21:39
@claude claude Bot mentioned this pull request May 18, 2026
15 tasks
claude Bot pushed a commit that referenced this pull request May 18, 2026
Co-authored-by: Douglas Ezra Morrison <d-morrison@users.noreply.github.com>
d-morrison added a commit that referenced this pull request May 18, 2026
Resolves conflicts in .github/workflows/claude-code-review.yml by
layering this PR's head-SHA-based reviewer re-routing on top of the
hardening from #216 / #217 on main:

* Keep the post-#216 concurrency block, $REPO env-var style, and the
  explanatory comments on why the stash/restore is load-bearing.
* Keep the post-#217 use_sticky_comment behavior and dropped the
  Claude-comment deletion step entirely.
* Re-apply this PR's head-SHA snapshot + post-Claude branch logic on
  top of that base: if HEAD_AFTER != HEAD_BEFORE, re-request review
  from human assignees only; otherwise restore the original reviewers.
* Preserved the "no `|| true` on the final POST" rule from #216 on
  both branches of the new restore/re-assign step — failure must
  surface so a dropped reviewer is recoverable.

Bumped dev version to 0.0.0.9053 and added a NEWS entry for #210.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
d-morrison added a commit that referenced this pull request May 18, 2026
Resolves conflicts in DESCRIPTION, NEWS.md, and inst/WORDLIST:

* DESCRIPTION: keep the CRAN-ready Title and Version 0.1.0 from
  cran-submission. Main's dev-version (0.0.0.9053) is superseded by
  this release.
* NEWS.md: keep cran-submission's "first CRAN release" intro and 0.1.0
  structure (## New features / ## Bug fixes / ## Developer-facing
  changes). Folded three previously-uncaptured items from main's dev
  section into ## Developer-facing changes:
  - #210 (re-assign reviewers to human assignees on Claude commits)
  - #73 OS-specific snapshot consolidation
  - Copilot decomposition guidance
* inst/WORDLIST: took the union of both branches' wordlists
  (cran-submission + main), preserving ASCII sort order and CRLF
  endings. Adds assignees, CodeFactor, PR's, SHA, seroresponses on
  top of cran-submission's existing entries.

The two workflow files (.github/workflows/claude{,-code-review}.yml)
auto-merged to main's version, picking up the post-#216/#217/#210
hardening on this branch as well.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
d-morrison added a commit that referenced this pull request May 19, 2026
Same three-way conflict as the previous main → cran-submission merge:

* DESCRIPTION — kept the 0.1.0 release Title and version from
  cran-submission. Main's dev version (0.0.0.9054 after #218) is
  superseded.
* NEWS.md — kept cran-submission's "first CRAN release" intro and
  0.1.0 structure. All of main's incoming dev-version bullets
  (#218 R toolchain + gh issue allowlist, findjags casing,
  #210/#216/#217, OS-snapshot consolidation, Copilot decomposition)
  are already represented under ## Developer-facing changes from
  the prior merge and the "Incorporate PR #218 changes" cherry,
  so the main-side block is dropped rather than re-merged.
* inst/WORDLIST — union of both branches, ASCII-sorted, CRLF
  preserved.

Workflow files (.github/workflows/{claude,copilot-setup-steps,
test-coverage}.yml) auto-merged to main's version, so cran-submission
now inherits #218's @claude R toolchain, gh issue allowlist, and
the lowercase runjags::findjags() consistency fix in test-coverage
and copilot-setup.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant