Skip to content

Upgrade ty to 0.0.63 and fix new MRO-based method-override diagnostics #1

Upgrade ty to 0.0.63 and fix new MRO-based method-override diagnostics

Upgrade ty to 0.0.63 and fix new MRO-based method-override diagnostics #1

Workflow file for this run

name: codex-outcome
# ADAPTER: turn whatever Codex did into a submitted review.
#
# Codex cannot be named as a PullApprove agent directly. It emits no check run
# at all, and its clean result is a πŸ‘ reaction rather than a review, so there
# is nothing for PullApprove to read. This watches what it *does* leave behind
# and submits a review under this workflow's own identity β€” so the account to
# declare in CODEREVIEW.toml is github-actions[bot], not Codex's.
#
# Every outcome Codex has been observed to produce leaves either a review or a
# pull request comment, and both are workflow triggers β€” so this is entirely
# event-driven. An earlier version polled for the πŸ‘, which held an Actions
# runner for up to fifteen minutes per pull request; the reaction turned out to
# be redundant, because the clean path leaves a comment too.
#
# found issues review -> reviewed it and left findings
# clean comment -> reviewed it and found nothing
# never ran comment (quota) -> could not run
#
# Only the quota notice is matched on its text. Anything else Codex says is
# treated as "it responded", which errs toward releasing the hold: waiting too
# long costs the whole point of the feature, while releasing early costs
# minutes. The `[[agents]]` hold is timing-only β€” it never changes what is
# required to merge β€” so that is the right direction to be wrong in.
#
# Not covered: Codex being triggered and then saying nothing at all. That has
# not been observed across 100 measured runs (even the quota case comments),
# and covering it would mean going back to holding a runner open.
on:
issue_comment:
types: [created]
pull_request_review:
types: [submitted]
permissions:
pull-requests: write
jobs:
report:
# Only Codex's own activity, and only on pull requests. `issue_comment`
# fires for plain issues too, which have no review to submit.
if: >-
(github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
github.event.comment.user.login == 'chatgpt-codex-connector[bot]') ||
(github.event_name == 'pull_request_review' &&
github.event.review.user.login == 'chatgpt-codex-connector[bot]')
runs-on: ubuntu-latest
steps:
- name: Report the Codex outcome
env:
GH_TOKEN: ${{ github.token }}
PR: ${{ github.event.issue.number || github.event.pull_request.number }}
REPO: ${{ github.repository }}
EVENT: ${{ github.event_name }}
BODY: ${{ github.event.comment.body }}
run: |
if [ "$EVENT" = "pull_request_review" ]; then
outcome="reviewed it and left findings."
elif printf '%s' "$BODY" | grep -qi "usage limits"; then
outcome="could not run (Codex usage limits reached)."
else
outcome="reviewed it and found nothing."
fi
echo "Reporting: $outcome"
gh pr review "$PR" -R "$REPO" --comment \
--body "Codex second opinion β€” $outcome"