You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The existing prefilter step (lines 66-79) checked for the string pr-sous-chef in:
user.login — the bot login may not contain this string (e.g., github-copilot[bot])
body — relied on the AI agent voluntarily including pr-sous-chef in comment bodies (non-deterministic)
This meant the filter could silently miss comments posted by sous chef, causing the same PR to be nudged repeatedly on every 15-minute run.
Changes Made
.github/workflows/pr-sous-chef.md
Shell prefilter — changed the jq filter from a loose case-insensitive substring match on login/body to an exact check for <!-- pr-sous-chef --> in the comment body.
Agent prompt — added mandatory rule: every add_comment call must end with <!-- pr-sous-chef --> on its own line. Explained that skipping the marker causes spam on subsequent runs.
pr-processor sub-agent — same marker mandate, and updated skip-condition wording to reference the exact marker.
Expected Improvements
Eliminates repeated nudges on the same PR — the marker is invisible to users but exact and deterministic to check
No reliance on AI improvising freeform text; the marker is a hard requirement in the prompt
Validation
✅ pr-sous-chef compiled successfully with zero errors/warnings.
Note: .lock.yml files will be regenerated automatically after merge.
The bundle file is available in the agent artifact in the workflow run linked above.
To create a pull request with the changes:
# Download the artifact from the workflow run
gh run download 25963425157 -n agent -D /tmp/agent-25963425157
# Fetch the bundle into a temporary ref, then update the local branch
git fetch /tmp/agent-25963425157/aw-q-pr-sous-chef-deterministic-filter.bundle refs/heads/q/pr-sous-chef-deterministic-filter:refs/bundles/create-pr-q-pr-sous-chef-deterministic-filter-18ba1c4ed991ac21-466fa5c7
git update-ref refs/heads/q/pr-sous-chef-deterministic-filter-18ba1c4ed991ac21 refs/bundles/create-pr-q-pr-sous-chef-deterministic-filter-18ba1c4ed991ac21-466fa5c7
git checkout q/pr-sous-chef-deterministic-filter-18ba1c4ed991ac21
# Ensure the working tree matches the updated branch
git reset --hard
# Remove the temporary bundle ref
git update-ref -d refs/bundles/create-pr-q-pr-sous-chef-deterministic-filter-18ba1c4ed991ac21-466fa5c7
# Push the branch to origin
git push origin q/pr-sous-chef-deterministic-filter-18ba1c4ed991ac21
# Create the pull request
gh pr create --title '[q] fix(pr-sous-chef): deterministic spam filter using marker' --base main --head q/pr-sous-chef-deterministic-filter-18ba1c4ed991ac21 --repo github/gh-aw
Q Workflow Optimization Report
Issue Found
PR Sous Chef — Non-Deterministic Spam Filter
The existing prefilter step (lines 66-79) checked for the string
pr-sous-chefin:user.login— the bot login may not contain this string (e.g.,github-copilot[bot])body— relied on the AI agent voluntarily includingpr-sous-chefin comment bodies (non-deterministic)This meant the filter could silently miss comments posted by sous chef, causing the same PR to be nudged repeatedly on every 15-minute run.
Changes Made
.github/workflows/pr-sous-chef.mdjqfilter from a loose case-insensitive substring match on login/body to an exact check for<!-- pr-sous-chef -->in the comment body.add_commentcall must end with<!-- pr-sous-chef -->on its own line. Explained that skipping the marker causes spam on subsequent runs.pr-processorsub-agent — same marker mandate, and updated skip-condition wording to reference the exact marker.Expected Improvements
Validation
✅
pr-sous-chefcompiled successfully with zero errors/warnings.Fixes #32532 (comment requesting deterministic spam prevention)
Note
This was originally intended as a pull request, but the git push operation failed.
Workflow Run: View run details and download bundle artifact
The bundle file is available in the
agentartifact in the workflow run linked above.To create a pull request with the changes: