fix(pr-sous-chef): deterministic nudge spam filter via hidden marker#32628
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix non-deterministic spam filter in PR Sous Chef
fix(pr-sous-chef): deterministic nudge spam filter via hidden marker
May 16, 2026
Copilot stopped work on behalf of
pelikhan due to an error
May 16, 2026 14:57
Contributor
There was a problem hiding this comment.
Pull request overview
This PR replaces fuzzy pr-sous-chef repeat-nudge detection with a hidden marker-based check and updates the workflow prompt to require that marker in generated nudges.
Changes:
- Adds a hidden nudge marker variable to the PR candidate prefilter.
- Updates latest-comment filtering to look for the marker.
- Updates sous-chef prompt instructions and compiled workflow parity.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/pr-sous-chef.md |
Adds marker-based filtering and prompt contract updates. |
.github/workflows/pr-sous-chef.lock.yml |
Mirrors the compiled workflow changes for marker-based filtering. |
pkg/workflow/safe_jobs_threat_detection_test.go |
Removes an extra blank line. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 2
| ' 2>/dev/null || echo "false" | ||
| ((.[0].body // "" | contains($marker))) | ||
| ) end | ||
| ' --arg marker "$sous_chef_nudge_marker" 2>/dev/null || echo "false" |
| ((.[0].body // "" | contains($marker))) | ||
| ) end | ||
| ' 2>/dev/null || echo "false" | ||
| ' --arg marker "$sous_chef_nudge_marker" 2>/dev/null || echo "false" |
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-chefwas suppressing repeat nudges using fuzzy text matching ("pr-sous-chef"in latest comment), which is non-deterministic and vulnerable to false positives/negatives. This change makes repeat-detection deterministic by requiring and checking a dedicated hidden marker in sous-chef-generated nudges.Deterministic latest-comment filter
<!-- gh-aw-pr-sous-chef-nudge -->Prompt contract update for nudge generation
Compiled workflow parity
.github/workflows/pr-sous-chef.md.github/workflows/pr-sous-chef.lock.yml