ci: Try to auto-fix flaky test issues#20793
Conversation
|
adjusted this a bit and introduced prompt injection checker from triage-issue here as well. |
size-limit report 📦
|
| COMMENTS_JSON="${RUNNER_TEMP}/comments.json" | ||
| gh api "repos/getsentry/sentry-javascript/issues/${ISSUE_NUMBER}" > "$ISSUE_JSON" | ||
| gh api "repos/getsentry/sentry-javascript/issues/${ISSUE_NUMBER}/comments" > "$COMMENTS_JSON" | ||
| python3 .claude/skills/triage-issue/scripts/detect_prompt_injection.py "$ISSUE_JSON" "$COMMENTS_JSON" |
There was a problem hiding this comment.
Bug: The workflow auto-fix-issue.yml calls a script from an incorrect path, causing the step to fail on every execution.
Severity: HIGH
Suggested Fix
In .github/workflows/auto-fix-issue.yml, update the path in the run command to point to the correct script location: .agents/skills/triage-issue/scripts/detect_prompt_injection.py.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: .github/workflows/auto-fix-issue.yml#L64
Potential issue: The `auto-fix-issue.yml` workflow attempts to execute a script from
`.claude/skills/triage-issue/scripts/detect_prompt_injection.py`. This path is
incorrect; the script actually resides at
`.agents/skills/triage-issue/scripts/detect_prompt_injection.py`. As a result, the
"Check issue for prompt injection and language" step will deterministically fail on
every run with a "No such file or directory" error, preventing the workflow from ever
completing successfully.
Co-authored-by: Lukas Stracke <lukas.stracke@sentry.io>
|
We'll merge this as-is with manual run only, then we can iterate a bit on it and look into auto-running it in a follow up step. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a1ceb40. Configure here.
| COMMENTS_JSON="${RUNNER_TEMP}/comments.json" | ||
| gh api "repos/getsentry/sentry-javascript/issues/${ISSUE_NUMBER}" > "$ISSUE_JSON" | ||
| gh api "repos/getsentry/sentry-javascript/issues/${ISSUE_NUMBER}/comments" > "$COMMENTS_JSON" | ||
| python3 .claude/skills/triage-issue/scripts/detect_prompt_injection.py "$ISSUE_JSON" "$COMMENTS_JSON" |
There was a problem hiding this comment.
Bug: The workflow references a Python script at an incorrect path, which will cause the step to fail and halt the workflow.
Severity: CRITICAL
Suggested Fix
In .github/workflows/auto-fix-issue.yml, update the path to the detect_prompt_injection.py script to point to its correct location at .agents/skills/triage-issue/scripts/detect_prompt_injection.py.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: .github/workflows/auto-fix-issue.yml#L68
Potential issue: The `auto-fix-issue.yml` workflow attempts to execute a Python script
from an incorrect path:
`.claude/skills/triage-issue/scripts/detect_prompt_injection.py`. The script is actually
located at `.agents/skills/triage-issue/scripts/detect_prompt_injection.py`. This will
cause the "Check issue for prompt injection and language" step to fail with a
file-not-found error every time the workflow is triggered, which will halt the workflow
and prevent the auto-fix functionality from running.

This adds a workflow that tries to auto-fix a given issue. It is auto-run for flaky test issues.