ci(warden): switch to analyze/report split workflow#193
Open
dcramer wants to merge 4 commits into
Open
Conversation
Co-Authored-By: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
…CS auth guard Co-Authored-By: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Wrap Warden workflow status checks in explicit GitHub Actions expression syntax so bot review and workflow parsing agree on the conditional form. Co-Authored-By: Codex <codex@openai.com>
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 f526307. Configure here.
Require the Warden app token step to succeed before running report mode so the report step does not invoke Warden with an empty GitHub token. Co-Authored-By: Codex <codex@openai.com>
Comment on lines
46
to
49
| - uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1 | ||
| id: app-token | ||
| if: ${{ always() && steps.warden-analyze.outputs.findings-file != '' }} | ||
| with: |
There was a problem hiding this comment.
Bug: The app-token step lacks continue-on-error: true, causing the entire job to fail on transient errors instead of handling them gracefully.
Severity: MEDIUM
Suggested Fix
Add continue-on-error: true to the app-token step. This will allow the job to continue and be marked as successful even if token creation fails, and the subsequent Report step will be correctly skipped due to its if condition.
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/warden.yml#L46-L49
Potential issue: The `app-token` step in the GitHub workflow does not have
`continue-on-error: true`. If this step fails, for example due to a transient GitHub API
error, the entire job will be marked as failed. This is a regression from the previous
behavior where failures were handled gracefully. While subsequent steps are designed to
be skipped if `steps.app-token.outcome != 'success'`, the job's failure prevents this
graceful handling from working as intended. If this workflow is a required status check,
this could block pull request merges due to transient errors.
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.

Splits the single
getsentry/warden@v0step into separateAnalyzeandReportsteps using themodeinput added in warden 0.38.0.What changed:
Analyzestep runs withmode: analyze— no write token, usesGITHUB_TOKENwithpull-requests: read(added to permissions block) to read PR diffsReportstep runs withmode: report, receives the findings file and app token for write access;continue-on-error: truepreserves original behaviorAuthenticate to Google Cloudnow has an explicitif: always() && findings-file != ''guard so GCS upload still runs even when Report failssteps.warden-analyze(same semantics, updated step id)Requires: warden
v0tag pointing to 0.38.0+View Session in Sentry