Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 17 additions & 12 deletions .github/workflows/pr-to-slack-codex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,14 @@ jobs:
echo "---- prompt size ----"; wc -c prompt.txt >&2

# Run Codex with a scrubbed env: only OPENAI_API_KEY, PATH, HOME
env -i OPENAI_API_KEY="${{ secrets.OPENAI_API_KEY }}" PATH="$PATH" HOME="$HOME" \
codex --model gpt-5-codex --ask-for-approval never exec \
--sandbox read-only \
--output-last-message review.md \
< prompt.txt \
> codex.log 2>&1
if ! env -i OPENAI_API_KEY="${{ secrets.OPENAI_API_KEY }}" PATH="$PATH" HOME="$HOME" \
codex --model gpt-5-codex --ask-for-approval never exec \
--sandbox read-only \
--output-last-message review.md \
< prompt.txt \
> codex.log 2>&1; then
echo "Codex review failed; publishing fallback review." >&2
fi

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing Codex failure log dump

Low Severity

The small-diff Codex failure handler redirects all output to codex.log but never prints it, unlike the large-diff handler which runs cat codex.log. Because failures are now non-fatal, the common path can succeed with only a generic message and no reason for the failure in the CI logs.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c7299b2. Configure here.


else
echo "Large diff – switching to fallback that lets Codex fetch the .diff URL"
Expand Down Expand Up @@ -130,12 +132,15 @@ jobs:
echo "---- fallback prompt size ----"; wc -c prompt.txt >&2

# Network-enabled only for this large-diff case; still scrub env
env -i OPENAI_API_KEY="${{ secrets.OPENAI_API_KEY }}" PATH="$PATH" HOME="$HOME" \
codex --model gpt-5-codex --ask-for-approval never exec \
--sandbox danger-full-access \
--output-last-message review.md \
< prompt.txt \
> codex.log 2>&1
if ! env -i OPENAI_API_KEY="${{ secrets.OPENAI_API_KEY }}" PATH="$PATH" HOME="$HOME" \
codex --model gpt-5-codex --ask-for-approval never exec \
--sandbox danger-full-access \
--output-last-message review.md \
< prompt.txt \
> codex.log 2>&1; then
echo "Codex review failed; publishing fallback review." >&2
cat codex.log >&2
fi
fi

# Defensive: ensure later steps don't explode
Expand Down
Loading