Skip to content

Back-port the routine's "do not watch the PR" rule into the versioned prompt - #2934

Merged
Pierre-Gilles merged 1 commit into
masterfrom
claude/autofix-pr-conflicts-trigger-ny4c4q
Aug 17, 2026
Merged

Back-port the routine's "do not watch the PR" rule into the versioned prompt#2934
Pierre-Gilles merged 1 commit into
masterfrom
claude/autofix-pr-conflicts-trigger-ny4c4q

Conversation

@Pierre-Gilles

@Pierre-Gilles Pierre-Gilles commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Description

Follow-up to #2932, found while diagnosing why a /claude command on #2910 did nothing.

The live routine's stored prompt ends with a line that has never existed in .github/CLAUDE_AUTOFIX_ROUTINE_PROMPT.md, on any revision:

Do not watch the PR you fix

It was added directly in the claude.ai web UI, which leaves no trace in git. The setup instructions in CLAUDE_AUTOFIX.md tell you to copy the versioned file onto the routine's page — doing that today would have silently deleted that instruction, and fired sessions would have started subscribing to the activity of every PR they touch.

This PR back-ports it as a common rule, so it now also binds the on-demand mode (a /claude session should answer and stop, not start watching either), and documents the hazard that caused it: the routine's page is what actually runs, so the two must be diffed before pushing this file over it.

No workflow behaviour changes — this touches only the versioned prompt and its documentation.

Why this matters now

#2932 is merged, so claude-on-demand-autofix.yml is live and firing correctly. But the routine's stored prompt is still the scheduled-only version, so an on-demand payload fails its validation and the session stops without doing anything. That is the documented pending step, not a defect — the prompt still has to be copied to the routine's page for /claude to work. This PR makes that copy safe to perform.

Forum

Checklist

  • Tests pass — no application code and no workflow logic is touched (one Markdown line in the versioned prompt, plus documentation), so the server/front suites, Cypress and the gate harness are all unaffected.
  • Linter and prettier pass on both front and server — unchanged by this PR. .github/*.md is outside prettier's configured scope.
  • No undocumented breaking change — the added rule matches what the live routine has been doing all along; this only makes git agree with production.

Generated by Claude Code

Summary by CodeRabbit

  • Chores
    • Improved automation guidance to keep web-based edits aligned with version-controlled content.
    • Updated automated workflow behavior to conclude immediately after responding, reducing unnecessary follow-up activity.

… prompt

The live routine's stored prompt ends with "Do not watch the PR you fix", a
line that has never existed in this file — it was added directly in the
claude.ai web UI. Copying the versioned prompt over the routine, which the
setup instructions tell you to do, would therefore have silently deleted it
and let fired sessions start subscribing to the PRs they touch.

Back-ported as a common rule, so it applies to the on-demand mode too, and
documented the hazard: the routine's page is what actually runs, editing it
leaves no trace in git, so the two must be diffed before pushing this file
over it.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1EYXKSQN8zZWrcTuCyduQ
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying gladys-plus with  Cloudflare Pages  Cloudflare Pages

Latest commit: e1031c5
Status:🚫  Build failed.

View logs

@github-actions github-actions Bot added area:infra CI, Docker, release, deployment type:chore Deps, CI, refactoring, docs. Hidden from user changelog labels Aug 17, 2026
@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b072cec5-bcd3-4412-a453-af92541c462a

📥 Commits

Reviewing files that changed from the base of the PR and between dedd00d and e1031c5.

📒 Files selected for processing (2)
  • .github/CLAUDE_AUTOFIX.md
  • .github/CLAUDE_AUTOFIX_ROUTINE_PROMPT.md

Included review availability: Your plan includes up to 8 reviews per rolling hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The PR updates Claude autofix documentation. It adds prompt synchronization steps and prohibits monitoring a pull request after the routine posts its response.

Changes

Claude autofix guidance

Layer / File(s) Summary
Prompt synchronization and execution rules
.github/CLAUDE_AUTOFIX.md, .github/CLAUDE_AUTOFIX_ROUTINE_PROMPT.md
The guidance compares the live routine prompt with the repository version, preserves live edits through back-porting, publishes the merged prompt, and ends PR monitoring after responding.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Merge Risk: ⚪ Minimal · up to e1031

This localized documentation and prompt update is merge-ready after normal checks, with no actionable merge-blocking risk remaining.

Poem

A rabbit checks the prompt with care,
Merges live edits in the air.
The answer posts, the run is done,
No watchful loop follows the one.
Back-port first, then hop away.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: back-porting the routine's rule into the versioned prompt.
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 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/autofix-pr-conflicts-trigger-ny4c4q

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions

Copy link
Copy Markdown
Contributor

🐳 A Docker image has been built for this branch and pushed to the GitHub Container Registry.

You can test this pull request (AMD64 only) by pulling the image below:

ghcr.io/gladysassistant/gladys-preview:claude-autofix-pr-conflicts-trigger-ny4c4q

For example, run it with:

sudo docker run -d \
  --log-driver json-file \
  --log-opt max-size=10m \
  --cgroupns=host \
  --restart=always \
  --privileged \
  --network=host \
  --name gladys-claude-autofix-pr-conflicts-trigger-ny4c4q \
  -e NODE_ENV=production \
  -e SERVER_PORT=80 \
  -e TZ=Europe/Paris \
  -e SQLITE_FILE_PATH=/var/lib/gladysassistant/gladys-production.db \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /var/lib/gladysassistant:/var/lib/gladysassistant \
  -v /dev:/dev \
  -v /run/udev:/run/udev:ro \
  ghcr.io/gladysassistant/gladys-preview:claude-autofix-pr-conflicts-trigger-ny4c4q

This comment and the image are automatically updated on every new commit pushed to this pull request.

Need an ARM64 image (Raspberry Pi, Apple Silicon, …)? Comment /build-arm64 on this pull request.

@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.52%. Comparing base (dedd00d) to head (e1031c5).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2934   +/-   ##
=======================================
  Coverage   99.52%   99.52%           
=======================================
  Files        1242     1242           
  Lines       89235    89235           
=======================================
  Hits        88809    88809           
  Misses        426      426           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cursor cursor 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.

Docs and versioned-prompt only. The new common rule matches what the live routine already does, and putting it in git (with the copy-hazard note) is what makes the pending prompt copy from #2932 safe.

What this does

  • Adds Do not watch the PR you fix as a common rule in .github/CLAUDE_AUTOFIX_ROUTINE_PROMPT.md, so both scheduled and on-demand sessions post their answer and stop instead of subscribing to PR activity.
  • Documents that the routine page is what actually runs, and that copying this file over a drifted web-UI prompt silently deletes those edits.

Why this is the right place
Watching a PR after the pass would recreate the event-driven loop these workflows exist to kill (push → bot re-review → react again). Binding it as a common rule also covers /claude: that mode should answer once, not start monitoring. The expansion beyond the live one-liner (do not subscribe / end the run / follow-ups via the next cron or a new /claude) is unambiguous and does not conflict with “fetch the PR and do the pass.”

Not in this diff (and fine)

  • No workflow YAML, no Gladys runtime, no server/constants.js categories/types.
  • Merging git still does not change live sessions until the prompt is copied to the routine page. That remaining ops step is already documented; this PR is what makes that copy not drop the watch rule.

Cloudflare Pages is unrelated (gladys-plus). Front test/build, server lint/test, and the rest of the PR jobs that have finished are green.

Ready to merge from this side.

Open in Web View Automation 

Sent by Cursor Automation: Automatic PR review

@Pierre-Gilles
Pierre-Gilles added this pull request to the merge queue Aug 17, 2026
Merged via the queue into master with commit 8b20255 Aug 17, 2026
14 of 15 checks passed
@Pierre-Gilles
Pierre-Gilles deleted the claude/autofix-pr-conflicts-trigger-ny4c4q branch August 17, 2026 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:infra CI, Docker, release, deployment type:chore Deps, CI, refactoring, docs. Hidden from user changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants