Harry/mmqa ff drift and create pr#230
Conversation
- Add feature-flag-drift-report action (Slack notification with optional pr-url) - Add check-feature-flag-registry-drift reusable workflow (creates PR, outputs pr-url) - Use download-artifact@v7 with explicit path for artifacts - Use github.run_id and repository in branch name to avoid collisions - Add registry file validation before cp - Include repository in PR title Made-with: Cursor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| echo "has_changes=false" >> "$GITHUB_OUTPUT" | ||
| else | ||
| git commit -m "chore: sync feature flag registry from E2E" | ||
| git push --force-with-lease origin "$BRANCH" |
There was a problem hiding this comment.
Force-with-lease fails when remote branch already exists
Medium Severity
git push --force-with-lease will fail on subsequent workflow runs when the remote branch already exists. Since actions/checkout@v6 only fetches the default branch, there is no local remote-tracking ref for the drift branch. Without a tracking ref, --force-with-lease treats the expected remote value as null and rejects the push if the branch exists remotely. The existing-PR handling at the "Create Pull Request" step is never reached because the workflow fails at the push step first.
Additional Locations (1)
| else | ||
| MSG="${BASE}<${WORKFLOW_URL}|View workflow run>" | ||
| fi | ||
| PAYLOAD=$(jq -n --arg m "$MSG" '{text: $m, blocks: [{type: "section", text: {type: "mrkdwn", text: $m}}]}') |
There was a problem hiding this comment.
Slack message shows literal \n instead of newlines
Low Severity
The \n sequences in the BASE and MSG bash variables are literal two-character strings (backslash + n), not actual newlines. When passed to jq --arg, each backslash is JSON-escaped to \\, producing \\n in the JSON output. After Slack's JSON parser decodes this, the text contains literal \n characters. Slack's mrkdwn format does not interpret these as line breaks, so the entire message renders as a single unformatted block.


Note
Medium Risk
Adds new GitHub Actions automation that force-pushes a branch and opens PRs using a write-scoped token; misconfiguration could create noisy PRs or unintended repo writes.
Overview
Introduces automation to detect and respond to feature-flag registry drift between E2E and production.
Adds a reusable workflow (
check-feature-flag-registry-drift.yml) that downloads drift artifacts, builds a PR description fromreport.json, commits the updated registry file to a dedicatedqa/sync-ff-registry-*branch, and creates/labels a PR (or reuses an existing one).Adds a composite action (
feature-flag-drift-report) that formats and sends a Slack notification linking to the workflow run and, when available, the created sync PR.Written by Cursor Bugbot for commit f785c08. This will update automatically on new commits. Configure here.