dotCMS / dotCMS/core

Claude AI workflows overwrite each other's PR comments (rollback-safety clobbers the code review)

Open
#36,761 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Team : Enablement
Dominant language
Java
Stars
970
Forks
486
Avg merge
3d 33m
Merged PRs (30d)
170

Description

Problem

On a PR that triggers more than one Claude workflow, the later workflow overwrites the earlier one's comment. Example: PR #36759 comment — the Rollback-Safety verdict replaced the AI code review in the same comment.

Edit history of that single comment proves it:

time run content
20:10:08 Claude AI Orchestrator (30301039985) "Claude Code is working…" (creates comment)
20:11:23 same Code Review: PR #36759
20:12:17 Claude AI Rollback Safety Check (30301040015) reset to "Claude Code is working…" — code review gone
20:13:50 same Rollback-Safety Analysis

Root cause

anthropics/claude-code-action@v1 with use_sticky_comment: true looks up the comment to reuse with no per-workflow markersrc/github/operations/comments/create-initial.ts matches any comment whose author is the Claude app bot (user.id === 209825114, or any Bot login containing "claude") and takes the first one:

const existingComment = comments.data.find((comment) => {
  const idMatch = comment.user?.id === CLAUDE_APP_BOT_ID;
  const botNameMatch = comment.user?.type === "Bot" && comment.user?.login.toLowerCase().includes("claude");
  ...
});

So every workflow on the Anthropic path shares one "sticky" comment per PR. dotCMS/core runs three Claude commenters on pull_request: ai_claude-orchestrator.yml (code review, sticky by design), ai_claude-rollback-safety.yml, and ai_claude-backend-reviewer.yml. The Bedrock/Codex paths in ai-workflows already namespace their markers (sticky_namespace<!-- dotcms-ai-review:v3:<ns> -->); the Anthropic path has no equivalent.

Fix

Only one workflow per PR should own an action-managed comment.

  1. dotCMS/ai-workflows: plumb track_progress through claude-orchestrator.ymlclaude-executor.yml (currently hardcoded "true").
  2. dotCMS/core: set track_progress: false on rollback-safety and backend-reviewer. Neither needs the progress comment — rollback-safety posts its own comment only when a change is unsafe (plus a label), and the backend reviewer upserts its own <!-- dotcms-backend-review --> marker comment. The code-review orchestrator keeps the sticky comment.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with claude-orchestrator.yml and claude-executor.yml in dotCMS/ai-workflows, then inspect ai_claude-orchestrator.yml, ai_claude-rollback-safety.yml, and ai_claude-backend-reviewer.yml in dotCMS/core. Trace how track_progress is passed and how each workflow manages comments. Done means only the code-review orchestrator retains the sticky progress comment while the other workflows keep their own behavior without overwriting it.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, yaml
Domain
ci-cd, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.