Skip to content

latex-ecosystem and aldc sit outside the protection audit with enforce_admins inverted #153

Description

@toshi0806

問題

latex-ecosystem と aldc はブランチ保護が設定されているが、config/dev-infra-protection.json に登録されていない。desired state を持たないまま、実際の設定だけが存在している。

そして両方とも、文書が「固定」と書いている値から外れている。

latex-ecosystem   enforce_admins=true   required_status_checks=なし
aldc              enforce_admins=true   required_status_checks=なし

config/dev-infra-protection.jsoninvariants はこう書いている。

enforce_admins: false 固定。CI が壊れた緊急時に管理者が明示的に突破できるようにする。Renovate App はブランチ保護をバイパスしないので bot 側は必ずゲートされる

登録済みの 11 リポジトリはすべて false。この 2 本だけが true で、しかも監査対象外なので週次監査には映らない。

対応

config/dev-infra-protection.json に 2 本を追加し、enforce_adminsfalse に揃える。

required_status_checks は「無し」が正しい可能性が高い

この 2 本に required contexts を設定すると、PR がマージ不能になる。

両方とも PR 上で走るワークフローは ai-code-review.yml 1 本だけで、そのトリガはこうなっている。

on:
  pull_request:
    types: [opened, reopened, ready_for_review]   # no synchronize: avoid re-reviewing every push

synchronize を含まないため、PR を開いた後に push しても再走しないreview / review を required にすると、2 コミット目以降の head に対する check run が存在せず、永久に pending になる。

これは invariants.contexts が既に警告している事象と同型である。

その PR で必ず check run が生成されるジョブだけを列挙する。… 発火しない workflow は check run 自体が出ず永久 pending になるので指定してはいけない

実際に latex-ecosystem#176 で発生している。amend 後の head 30b3e7b に対する check run は 0 件で、直前の完走 run(9bc7a7b / success)で判断してマージした。required になっていればブロックされていた。

したがって、この 2 本については

  • required_status_checks を持たない形で登録する
  • あるいは ai-code-review.ymlsynchronize を足したうえで review / review を required にする

のいずれかを選ぶ。前者を選ぶ場合、保護の実質は require_pull_request: true だけになる(main への直接 push を止める)が、それはそれで意味がある。

docs/DEPENDENCY-MANAGEMENT.md の contexts テーブルに両者が載っていないのも、この事情と整合する。

関連

Activity

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