Skip to content
Closed
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
54 changes: 54 additions & 0 deletions .github/workflows/agents-test-codex-direct.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Agents Test Codex Direct

on:
workflow_dispatch:

permissions:
contents: write
pull-requests: write
actions: write

jobs:
preflight:
name: Check secrets
runs-on: ubuntu-latest
environment: agent-standard
outputs:
secrets_ok: ${{ steps.check.outputs.secrets_ok }}
steps:
- name: Check secrets
id: check
env:
HAS_CODEX_AUTH: ${{ secrets.CODEX_AUTH_JSON != '' }}
HAS_APP_ID: ${{ secrets.WORKFLOWS_APP_ID != '' }}
run: |
echo "CODEX_AUTH_JSON present: $HAS_CODEX_AUTH"
echo "WORKFLOWS_APP_ID present: $HAS_APP_ID"
echo "secrets_ok=true" >> "$GITHUB_OUTPUT"
Copy link

Copilot AI Dec 24, 2025

Choose a reason for hiding this comment

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

The preflight job always sets secrets_ok=true regardless of whether the secrets are actually present. This means the test-codex job will always run even if the required secrets are missing, which may not provide useful test results. Consider adding conditional logic similar to the production workflow to only set secrets_ok=true when at least one of the required secrets is present, or document that this is intentional for testing purposes.

Suggested change
echo "secrets_ok=true" >> "$GITHUB_OUTPUT"
if [ "$HAS_CODEX_AUTH" = "true" ] || [ "$HAS_APP_ID" = "true" ]; then
echo "secrets_ok=true" >> "$GITHUB_OUTPUT"
else
echo "secrets_ok=false" >> "$GITHUB_OUTPUT"
fi

Copilot uses AI. Check for mistakes.

test-codex:
name: Call Codex
needs: preflight
if: needs.preflight.outputs.secrets_ok == 'true'
uses: ./.github/workflows/reusable-codex-run.yml
secrets:
CODEX_AUTH_JSON: ${{ secrets.CODEX_AUTH_JSON }}
WORKFLOWS_APP_ID: ${{ secrets.WORKFLOWS_APP_ID }}
WORKFLOWS_APP_PRIVATE_KEY: ${{ secrets.WORKFLOWS_APP_PRIVATE_KEY }}
with:
prompt_file: .github/codex/prompts/keepalive_next_task.md
mode: test
pr_number: '103'

summary:
name: Summary
needs:
- preflight
- test-codex
if: always()
runs-on: ubuntu-latest
steps:
- name: Report result
run: |
echo "preflight: ${{ needs.preflight.result }}"
echo "test-codex: ${{ needs.test-codex.result }}"
Loading