fix(pr-sous-chef): prevent back-to-back comments and add 30-min cooldown#41759
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
fix(pr-sous-chef): prevent double comments and add 30-min cooldown
fix(pr-sous-chef): prevent back-to-back comments and add 30-min cooldown
Jun 26, 2026
Copilot created this pull request from a session on behalf of
pelikhan
June 26, 2026 17:07
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the PR Sous Chef agentic workflow to prevent repetitive engagement on the same pull request by (1) ensuring only one nudge comment is posted per PR per run, and (2) adding a 30-minute cooldown window after a prior sous-chef nudge.
Changes:
- Adds a 30-minute cooldown filter in the bash prefilter and exposes
filtered_cooldownin the compact candidates JSON. - Updates the agent prompt to require posting exactly one combined nudge comment per PR per run (instead of multiple comments).
- Updates the run-summary counting fields to include cooldown skips and a single
nudgedcounter.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/pr-sous-chef.md | Adds cooldown filtering + prompt updates to enforce a single combined nudge comment and updated summary fields. |
| .github/workflows/pr-sous-chef.lock.yml | Regenerated compiled workflow reflecting the Markdown workflow changes. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Low
Comment on lines
+86
to
+90
| # Fetch the 10 most-recent issue comments once; used for the skip checks below. | ||
| recent_comments_json="$( | ||
| gh api "repos/$EXPR_GITHUB_REPOSITORY/issues/$pr_number/comments?per_page=10&sort=created&direction=desc" \ | ||
| 2>/dev/null || echo "[]" | ||
| )" |
Copilot AI
added a commit
that referenced
this pull request
Jun 26, 2026
…41759) Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
pelikhan
added a commit
that referenced
this pull request
Jun 26, 2026
* Initial plan * Cache compiled regexp in applySanitizePattern using sync.Map Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> * fix(pr-sous-chef): prevent double comments and add 30-min cooldown (#41759) Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com> * Add non-TTY fallback for interactive add wizard (MultiSelect + text prompts) (#41717) Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com> * Preserve issue-intent label metadata in `add_labels` REST payload behind feature flag (#41725) Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com> * Reduce validation benchmark overhead by deduplicating Copilot permission tip emission (#41753) Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com> * refactor(workflow): split custom job builder module out of compiler_jobs.go (#41754) Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com> * feat: upgrade experiments_command.go manual tables to console.RenderTable() (#41718) Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com> * Instruct PR sous-chef to run pr-finisher skill (#41768) Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com> * Initial plan Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com> * Replace sanitize regexp cache with precompiled patterns Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com> Co-authored-by: Peli de Halleux <pelikhan@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Sous Chef could post consecutive comments on the same PR (two nudges per run) and had no cooldown, allowing rapid re-engagement after a prior nudge.
Bash prefilter
cooldown_seconds=1800+filtered_cooldowncounter; skips any PR where a<!-- gh-aw-pr-sous-chef-nudge -->-marked comment was posted within the last 30 minutesfiltered_cooldownin the compact candidates JSON passed to the agentAgent prompt
pr-processorsub-agent updated to return a single combined nudge body instead of separateunresolved_review_feedback/additional_nudgefieldsnudged_review_comments+nudged_other→nudged; addsskipped_cooldown