Skip to content

The four Elixir tools have no branch protection and the audit cannot see them #152

Description

@toshi0806

問題

LaTeX エコシステムの Elixir ツール 4 本に、ブランチ保護が 1 つも設定されていない

ecosystem-manager    Branch not protected
registry-manager     Branch not protected
thesis-monitor       Branch not protected
elixir-tool-kit      Branch not protected

main へ直接 push できる状態で、CI が赤の PR も止まらない。

監査が届いていない

audit-repo-protection.yml のヘッダは、まさにこの事態を想定して書かれている。

これらの設定は GitHub 上にしか存在しないため、消されても、リポジトリが増えて設定漏れても、誰も気付かない

しかし config/dev-infra-protection.json に登録されているのは 11 リポジトリで、この 4 本は入っていない。desired state に無いものは突き合わせようがないため、週次監査は毎週 clean を返し続けている。想定していた失敗が、監査自身の対象範囲の外で起きた。

4 本はいずれも 2026-07 に分離・新設されたリポジトリで、その際に登録されなかったものと思われる。同じ経緯で Renovate の対象からも漏れており、そちらは smkwlab/latex-ecosystem#174 で追跡している。

対応

config/dev-infra-protection.jsonrepositories に 4 本を追加し、scripts/apply-repo-protection.sh --apply で反映する。

contexts は実測で確認済み。4 本とも共有ワークフロー elixir-ci.yml を呼んでおり、PR 上に必ず出るのは次の 2 つ。

ci / Code Quality   pass
ci / All checks     pass

ci / Test on OTP 27.3.4.16 / Elixir 1.17.3 のようなマトリクスのジョブ名は版を含むため指定しない(ci / All checks が集約する)。ci / Dialyzer Analysis on OTP ${{ inputs.otp-version-latest }} / ... は展開前の名前で check run が出るため、これも指定しない。

{
  "name": "ecosystem-manager",
  "allow_auto_merge": false,
  "enforce_admins": false,
  "require_pull_request": true,
  "required_status_checks": {
    "strict": ???,
    "contexts": ["ci / Code Quality", "ci / All checks"]
  }
}

strict をどちらにするか要判断

既存の 11 リポジトリは 2 つに割れている。

strict
latex 系 6 本 false
DNS プロジェクトの Elixir 5 本 true

true の根拠は DNS 側の流量(マージが月 0〜4 件・open PR が 0〜2 件)で、再ビルドの費用が出ていないというもの。この 4 本の流量が同程度なら true、Renovate を入れて(latex-ecosystem#174)PR が増えるなら false が妥当になる。

併せて検討すること

config/dev-infra-protection.json に登録されていないエコシステムのリポジトリは、この 4 本のほかにもある。

リポジトリ 現在の状態
latex-ecosystem 保護あり・required checks なし・enforce_admins: true
aldc 保護あり・required checks なし・enforce_admins: true
thesis-student-registry 保護なし

latex-ecosystem と aldc は別 Issue で扱う。thesis-student-registry は private のデータリポジトリで、GitHub Actions が data/registry.json を更新する経路を持つため、保護の要否自体が判断事項になる。

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