Codex Monthly Review #13
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
| name: Codex Monthly Review | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| source_repo: | |
| description: "Repository that owns the monthly review issue" | |
| required: true | |
| default: "QuantStrategyLab/CryptoSnapshotPipelines" | |
| issue_number: | |
| description: "Monthly review issue number in source_repo" | |
| required: true | |
| source_ref: | |
| description: "Source repository branch to audit" | |
| required: false | |
| default: "main" | |
| mode: | |
| description: "Run mode" | |
| required: false | |
| type: choice | |
| default: "review_and_fix" | |
| options: | |
| - review_only | |
| - review_and_fix | |
| provider: | |
| description: "Audit provider" | |
| required: false | |
| type: choice | |
| default: "auto" | |
| options: | |
| - auto | |
| - api | |
| - anthropic | |
| - codex | |
| - openai | |
| task: | |
| description: "Codex bridge task" | |
| required: false | |
| type: choice | |
| default: "monthly_snapshot_audit" | |
| options: | |
| - monthly_snapshot_audit | |
| - long_horizon_signal_shadow | |
| auto_merge: | |
| description: "Enable GitHub auto-merge for generated PRs" | |
| required: false | |
| type: boolean | |
| default: false | |
| repository_dispatch: | |
| types: | |
| - monthly-review-created | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: selfhosted-codex-monthly-${{ github.event.client_payload.source_repo || inputs.source_repo }}-${{ github.event.client_payload.issue_number || inputs.issue_number }} | |
| cancel-in-progress: false | |
| jobs: | |
| codex-monthly-review: | |
| runs-on: | |
| - self-hosted | |
| - codex-vps | |
| timeout-minutes: 60 | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" | |
| SOURCE_REPO: ${{ github.event.client_payload.source_repo || inputs.source_repo || 'QuantStrategyLab/CryptoSnapshotPipelines' }} | |
| ISSUE_NUMBER: ${{ github.event.client_payload.issue_number || inputs.issue_number }} | |
| SOURCE_REF: ${{ github.event.client_payload.source_ref || inputs.source_ref || 'main' }} | |
| CODEX_AUDIT_MODE: ${{ github.event.client_payload.mode || inputs.mode || 'review_and_fix' }} | |
| CODEX_AUDIT_PROVIDER: ${{ github.event.client_payload.provider || inputs.provider || 'auto' }} | |
| CODEX_AUDIT_TASK: ${{ github.event.client_payload.task || inputs.task || 'monthly_snapshot_audit' }} | |
| CODEX_AUDIT_AUTO_MERGE: ${{ github.event.client_payload.auto_merge || inputs.auto_merge || 'false' }} | |
| steps: | |
| - name: Checkout Bridge | |
| uses: actions/checkout@v6 | |
| - name: Verify Codex CLI | |
| if: env.CODEX_AUDIT_PROVIDER == 'codex' | |
| run: | | |
| set -euo pipefail | |
| command -v codex | |
| codex --version | |
| - name: Detect GitHub App Credentials | |
| id: app_credentials | |
| env: | |
| APP_ID: ${{ vars.CROSS_REPO_GITHUB_APP_ID }} | |
| APP_PRIVATE_KEY: ${{ secrets.CROSS_REPO_GITHUB_APP_PRIVATE_KEY }} | |
| run: | | |
| set -euo pipefail | |
| if [ -n "${APP_ID:-}" ] && [ -n "${APP_PRIVATE_KEY:-}" ]; then | |
| echo "available=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "available=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Create GitHub App Token For Source Repository | |
| id: source_app_token | |
| if: steps.app_credentials.outputs.available == 'true' | |
| continue-on-error: true | |
| uses: actions/create-github-app-token@v3 | |
| with: | |
| app-id: ${{ vars.CROSS_REPO_GITHUB_APP_ID }} | |
| private-key: ${{ secrets.CROSS_REPO_GITHUB_APP_PRIVATE_KEY }} | |
| owner: ${{ github.repository_owner }} | |
| repositories: | | |
| AiLongHorizonSignalPipelines | |
| CryptoSnapshotPipelines | |
| UsEquitySnapshotPipelines | |
| permission-contents: write | |
| permission-issues: write | |
| permission-pull-requests: write | |
| - name: Run Monthly Codex Audit | |
| env: | |
| CODEX_AUDIT_GH_TOKEN: ${{ steps.source_app_token.outputs.token || secrets.CODEX_AUDIT_GH_TOKEN }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| OPENAI_MODEL: ${{ vars.OPENAI_MODEL || 'gpt-5.4-mini' }} | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| ANTHROPIC_MODEL: ${{ vars.ANTHROPIC_MODEL || 'claude-sonnet-4-6' }} | |
| run: python scripts/run_monthly_codex_audit.py |