Skip to content

ci: request Codex reviews for every pull request with the owner's token #7

Closed

Description

@furedea-agent

概要

App(furedea-agent)が開いた PR も,GitHub 上の Codex にサブスクの枠でレビューさせる.CI がオーナーの fine-grained PAT で @codex review とコメントし,Codex の結果を待って判定する reusable workflow を追加する.
決めること:この方式でよいか.まず agent-config で試し,動けば全 repo に広げる.

sequenceDiagram
    participant L as レーン(App)
    participant CI as CI(codex-review)
    participant C as Codex(GitHub 連携)
    L->>CI: PR を開く / push
    CI->>C: オーナーの PAT で「@codex review」
    C-->>CI: Codex Review Summary(codex-review-state)
    CI-->>L: 指摘なしなら成功,指摘ありか応答なしなら失敗
Loading
場面 今 変更後
App が開いた PR Codex はレビューしない(「全て」はクレジットが必要) CI がオーナー名義で依頼し,サブスクの枠でレビューされる
App の push 再レビューされない push ごとに依頼する
マージの条件 Codex の結果は関係しない all-green に Codex の結果が入る
Codex が仕様変更などで応答しない 気づかない 待ち時間を過ぎたら失敗して気づける

受け入れ条件

  • furedea/reusable-workflows に codex-review.yml(workflow_call)がある
  • same-repo の PR で,opened と synchronize のたびに @codex review が投稿される.fork と,furedea-agent 以外の bot の PR は投稿せず成功で終わる
  • Codex Review Summary の codex-review-state を読み,HEAD の commit で completed かつ未解決の指摘がなければ成功,指摘があるか待ち時間内に結果がなければ失敗する.失敗理由を表示する
  • agent-config で,App が開いた PR と App の push の両方で Codex のレビューが走り,サブスクの枠で処理されることを確かめる
  • PAT の発行と登録が repo review-token rotate(dotfiles)で Claude の token と同じ流れでできる
  • 対象の全 repo と template-* の ci.yml に呼び出しジョブがあり,all-green の needs に入っている
前提,範囲外,出典

Activity

  1. furedea-agent commented on Nov 6, 2026

    @furedea-agent
    ContributorAuthor

    計画

    # 手順 担当 中身
    1 PAT を作る あなた GitHub の設定で fine-grained PAT を作る(上の権限).gh secret set CODEX_REVIEW_TOKEN -R furedea/agent-config で agent-config だけに登録する
    2 workflow を作る レーン codex-review(furedea/reusable-workflows,ブランチ ci/add-the-codex-review-workflow) should-review(claude-review と同じ条件)→ request(gh pr comment で @codex review)→ wait(codex-review-state を 30 秒ごとに読み,HEAD の commit の結果を最大 20 分待つ).workflow ファイルの push はあなた
    3 agent-config で試す 親 agent-config の ci.yml に呼び出しジョブを足す PR を開き,その PR 自身と追加の push で,レビューが走るか,判定が正しいか,枠の減り方を見る
    4 結果で判断 あなた 枠の減りが大きければ,依頼を「opened と CI 成功後の 1 回」に減らす.動かなければこの方式をやめる
    5 全 repo に広げる 親 rollout スクリプトで全対象 repo と template-* に呼び出しジョブを足す.dotfiles の repo review-token rotate に PAT の登録を足す(別 PR)

    失敗の扱い:判定ジョブが失敗したら,レーンは Codex の指摘を直して push する.全指摘の修正と確認の上限は herdr-delegation のレーン規則に従う.

  2. furedea-agent commented on Nov 9, 2026

    @furedea-agent
    ContributorAuthor

    受け入れ条件の確認(2026-11-09 時点)

    条件 証拠 結果
    codex-review.yml(workflow_call)がある PR #8(9bea83d)..github/workflows/codex-review.yml 満たす
    same-repo の PR で opened と synchronize のたびに @codex review.fork と furedea-agent 以外の bot は投稿せず成功 should-review の条件(same repo かつ,Bot でない,または furedea-agent[bot]).他の bot:agent-config PR #95(app/renovate)で codex-review / Decide whether to review が success,codex-review / Codex review が skipped(https://github.com/furedea/agent-config/pull/95,https://github.com/furedea/agent-config/actions/runs/42558365106).fork の実行例は未確認 満たす(fork の実行例のみ未確認)
    codex-review-state を HEAD の commit で読み,completed かつ未解決なしで成功,指摘あり・待ち時間超過で失敗,理由を表示 codex-review.yml の wait と判定ステップ(20 分,failed/timeout も失敗,GITHUB_STEP_SUMMARY と ::error::) 満たす
    agent-config で,App が開いた PR と App の push の両方でレビューが走り,サブスクの枠で処理される agent-harness PR #202(作成者 app/furedea-agent,App が複数回 push.最新 HEAD 09e131e)で codex-review / Codex review が success,all-green も success(https://github.com/furedea/agent-harness/pull/202,https://github.com/furedea/agent-harness/actions/runs/42610519472).agent-config PR #84 でも Codex が completed(https://github.com/furedea/agent-config/pull/84).App の PR と push の両方で動く.サブスク枠の減り方の記録は見つからない 満たす(枠の減り方のみ未記録)
    PAT の発行と登録が repo review-token rotate(dotfiles) dotfiles/github/repo.py に CODEX_REVIEW_TOKEN,tests/github/test_repo_review_token.py 満たす
    対象の全 repo と template-* の ci.yml に呼び出しジョブがあり all-green の needs に入る agent-config,dotfiles,template-typescript,agent-harness,rater,template-tex/rust/python/go/minimal,effort-or-luck,furedea.com,renovate-config,非公開 3 件(swe-conform,jit-research-preview,skills-human-intervention)に codex-review あり.furedea/splitwise-api-practice は 2026-11-09 にアーカイブされたため対象外 満たす(splitwise-api-practice は対象外)

    残り

    • なし.splitwise-api-practice はアーカイブされたため対象外
    • 任意:サブスク枠の減り方の記録,fork の PR で skip される実行例

    すべての条件を満たしたため,チェックボックスを付けて Issue を閉じます.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions