Repository navigation
Closed
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasetriage-requiredNeeds owner triage for priority decision
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "CI の job 分類・merge ゲート・AIエージェント判定条件を明文化し、required / advisory / evidence の責務を分離する"
change_kind: docsParent Issue
none(単独改善)
Parent Goal Ref
- Goal: CI 運用設計を定義し、AIエージェントと人間が merge-ready 判定を一貫して行える基盤を作る
- Desired Destination: docs/dev/ci-operations.md が追加され、CI job taxonomy / merge-ready 判定条件 / pending・skipped 扱いが定義された状態
Current Validated Scope
- docs/dev/ci-operations.md を新規作成する
Remaining Parent Gaps
- CI Runtime Baseline 計測(別 Issue 化予定)
- Node/pnpm/uv setup の Composite Action 化(別 Issue 化予定)
- Playwright E2E 安定化(別 Issue 化予定)
- CI verdict artifact v2 正規化(別 Issue 化予定)
Outcome
docs/dev/ci-operations.md が追加され、CI job taxonomy・required/advisory/evidence 分類表・AIエージェント向け merge-ready 判定条件・pending/skipped/head_sha_null 扱い定義・#846/#863 との責務分界が記述された状態になる。GitHub platform semantics(required checks・neutral/skipped 扱い)と AI agent merge-ready semantics(required evidence 判定・head_sha=null 除外ルール)が別セクションで定義され、#863 の誤判定再生産を防ぐ設計正本となる状態。
In Scope
docs/dev/ci-operations.mdを新規作成する- CI job taxonomy を以下の 4 分類で定義する
- product quality gate(typecheck / lint / test / build)
- runtime/browser evidence gate(e2e / playwright)
- agent-ops/skill regression gate(python-test / actionlint)
- PR hygiene gate(check-japanese 等)
- required check と advisory check の違いを定義する
- AIエージェントが merge-ready と判定してよい条件を定義する
pending/skipped/cancelled/failure/neutral/head_sha=null/head_sha mismatchの扱いを表で定義する- 既存 Issue feat: Allowed Paths 外ファイル変更を commit 前に検出する pre-commit gate を整備する #846(Allowed Paths pre-commit gate)および 実装: ci_verdict_summary.py で head_sha=null の skipped ジョブを failed 扱いしない #863(head_sha=null skipped job 扱い)との責務分界を明記する
- CI 高速化の採用順序(計測→重複 setup 削減→E2E 安定化→cache 拡張)を明記する
- S3 cache は現時点で採用せず計測後判断とする旨を明記する
- GitHub branch protection semantics(required checks、neutral/skipped の扱い)と AI agent merge-ready semantics を別セクションで定義する
- 実 CI job inventory を分類表に記載する(typecheck / lint / test / build / e2e / python-test / actionlint)
success/failure/timed_out/action_required/cancelled/neutral/skipped/stale(conclusion)とqueued/in_progress/waiting/requested/pending(status)の扱いを表で定義するhead_sha=null + skippedは allowlisted retrospective/conditional job のみ excluded とする定義を含める- required evidence artifact の missing policy と retention policy を定義する
- 実装担当エージェントへの注記として以下を追記する
Out of Scope
.github/workflows/ci.ymlの大規模変更は行わない- S3 cache は導入しない
- Playwright Docker 化の実装は別 Issue で行う
- feat: Allowed Paths 外ファイル変更を commit 前に検出する pre-commit gate を整備する #846 / 実装: ci_verdict_summary.py で head_sha=null の skipped ジョブを failed 扱いしない #863 と同一の修正は行わない
- CI 計測・setup 重複削減・E2E 安定化・verdict artifact 正規化は別 Issue で扱う
Acceptance Criteria
- AC1:
docs/dev/ci-operations.mdが追加されている - AC2: 実 CI job inventory として
typecheck,lint,test,build,e2e,python-test,actionlintが分類表に記載されている - AC3: GitHub branch protection semantics と AI agent merge-ready semantics が別セクションで定義されている
- AC4:
success/failure/timed_out/action_required/cancelled/neutral/skipped/staleとqueued/in_progress/waiting/requested/pendingの扱いが表で定義されている - AC5:
head_sha=null,head_sha mismatch,expected_head_shaの扱いが表で定義されている - AC6:
head_sha=null + skippedは allowlisted retrospective/conditional job のみ excluded であり、required PR-head evidence に数えないことが明記されている - AC7: feat: Allowed Paths 外ファイル変更を commit 前に検出する pre-commit gate を整備する #846 は Allowed Paths pre-commit gate の実装スコープ、実装: ci_verdict_summary.py で head_sha=null の skipped ジョブを failed 扱いしない #863 は
ci_verdict_summary.pyの実装修正スコープとして責務分界が明記されている - AC8: CI 高速化は baseline measurement → setup 重複削減 → E2E 安定化 → cache 拡張の順であり、S3/external cache は計測・security・cost 条件を満たす別 Issue まで採用しないと明記されている
- AC9: required evidence artifact の missing policy と retention policy が定義されている
- AC10:
pnpm lintがエラーなしで通る
Verification Commands
# AC1
$ test -f docs/dev/ci-operations.md
# AC2
$ rg -c "typecheck" docs/dev/ci-operations.md
$ rg -c "python-test" docs/dev/ci-operations.md
$ rg -c "actionlint" docs/dev/ci-operations.md
# AC3
$ rg -c "branch protection" docs/dev/ci-operations.md
$ rg -c "merge.ready" docs/dev/ci-operations.md
# AC4
$ rg -c "timed_out" docs/dev/ci-operations.md
$ rg -c "in_progress" docs/dev/ci-operations.md
# AC5
$ rg -c "head_sha" docs/dev/ci-operations.md
# AC6
$ rg -c "allowlist" docs/dev/ci-operations.md
# AC7
$ rg -c "#846" docs/dev/ci-operations.md
$ rg -c "#863" docs/dev/ci-operations.md
# AC8
$ rg -c "S3" docs/dev/ci-operations.md
# AC9
$ rg -c "retention" docs/dev/ci-operations.md
# AC10
$ pnpm lintAllowed Paths
- docs/dev/ci-operations.md
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
- 実 CI job 名(
.github/workflows/ci.yml上の名前)を発明する必要が生じた場合
Required Skills
- Markdown / YAML フロントマター
- GitHub Actions CI 基礎知識(job / step / check / status)
- GitHub Check Run API の status/conclusion field の区別
Implementation Notes
.github/workflows/**および.claude/skills/**は変更しない- feat: Allowed Paths 外ファイル変更を commit 前に検出する pre-commit gate を整備する #846(Allowed Paths pre-commit gate)および 実装: ci_verdict_summary.py で head_sha=null の skipped ジョブを failed 扱いしない #863(ci_verdict_summary.py)の実装は行わない
- 希望するポリシーが現在の
ci_verdict_summary.pyと競合する場合は、競合を文書化して 実装: ci_verdict_summary.py で head_sha=null の skipped ジョブを failed 扱いしない #863 を参照する - 実際に現在の repo コードが強制していない場合、強制が存在すると記載しない
.github/workflows/ci.ymlの実際のジョブ名を使用する。チェック名を発明しない
Scope Delta(任意)
N/A
Runtime Verification Applicability
本 Issue の変更対象はワークフロー文書・スクリプトのみです。ゲームの実行時動作には影響しません。
decision: not_applicable
reason: "Workflow documentation and script changes only. No runtime game behavior changed."Delivery Rule
1 Issue = 1 PR。worktree を使用。Draft PR として起票し、CI 通過後に ready にする。
Metadata
Metadata
Assignees
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasetriage-requiredNeeds owner triage for priority decision
Activity
squne121 commentedon Jun 13, 2026
確認範囲
Issue #894 は、
docs/dev/ci-operations.mdを追加し、CI job taxonomy、required/advisory/evidence、AI エージェント向け merge-ready 判定、pending/skipped/cancelled/head_sha=null等の扱いを文書化する docs-only Issue です。Allowed Paths もdocs/dev/ci-operations.mdのみです。#894 / #846 / #863 の Issue コメントはいずれも空でした。
総評
方向性は正しいが、このまま実装に渡すと「CI 運用設計書らしい文章」は作れても、AI エージェントの誤判定を止める実効性は弱いです。
特に危険なのは、GitHub の branch protection 上の “required check” と、リポジトリ独自の “agent merge-ready” を同じ意味で扱いかねない点です。GitHub 公式 docs では required status check は
successful/skipped/neutralでも要件を満たす扱いですが、AI エージェントの merge-ready ではskippedやneutralをそのまま pass とみなすと証跡偽陽性になります。(GitHub Docs)Blocking / High severity
1.
skipped/neutralの扱いが危険に曖昧GitHub Check Run API の conclusion には
action_required,cancelled,failure,neutral,success,skipped,stale,timed_outがあり、status にはqueued,in_progress,completed,waiting,requested,pendingがあります。(GitHub Docs)一方、現在の
ci_verdict_summary.pyはneutral/skipped/staleを fail bucket に分類し、determine_check_verdictでもneutral/skippedをfailedとして扱っています。これは #863 の問題意識そのものです。#863 は、PR #856 起点で
head_sha=nullかつconclusion=skippedの retrospective / conditional job が exit 10 偽陽性を起こすため、deploy-main,cleanup-pr,issue-body-japanese等を failed 扱いしない修正を求めています。 PR #856 自体は merged 済みで、この false positive の発見元として参照されています。修正案: #894 では次の 3 層を明示分離すべきです。
層 | 意味 | skipped / neutral の扱い -- | -- | -- GitHub branch protection | GitHub が merge gate として見る状態 | GitHub 上は required check として許容され得る Repository CI policy | LOOP_PROTOCOL として品質証跡に採用するか | 原則 pass ではない。job class ごとに定義 Agent merge-ready verdict | AI が merge-ready と判断してよいか | required evidence には数えない。明示 allowlist の skipped のみ exclude特に
e2eは単なる runtime gate ではなく、Playwright report / test-results / visual evidence summary を持つ evidence producer でもあります。現在の workflow はplaywright-reportとtest-resultsを!cancelled()条件で upload し、環境 fingerprint や artifact URL を summary に書いています。5. docs-only Issue なのに「運用の実装済み感」が出る
#894 は Allowed Paths が
docs/dev/ci-operations.mdのみなので、.github/workflows/ci.ymlやci_verdict_summary.pyは変更できません。したがって文書には、この Issue は enforcement 実装ではなく normative design / decision record である と明記すべきです。
特に #863 が未解決のままなら、
head_sha=null skippedの実装挙動は現行コードと設計文書で乖離します。現行コードはskippedを fail 扱いしています。Medium severity / 高品質化ポイント
6. CI 高速化の順序はよいが、S3 cache 判断基準が曖昧
#894 は「計測 → setup 重複削減 → E2E 安定化 → cache 拡張」「S3 cache は計測後判断」としており、順序自体は妥当です。
ただし判断基準がありません。
GitHub Actions の cache は exact match / prefix match / restore-keys の順で探索され、cache miss 時は job 成功後に新規 cache が作成されます。また、cache には機密情報を入れるべきではなく、fork PR などから base branch cache へのアクセスがあり得ます。(GitHub Docs)
actions/setup-nodeの pnpm cache は依存ファイルを前提にし、node_modules自体は cache しません。(GitHub)pnpm/action-setupも Node.js はセットアップしないため、actions/setup-nodeとの併用が前提です。(GitHub)追記すべき判断基準:
7. Artifact policy が不足
actions/upload-artifactv4+ 系では artifact 名の衝突や再アップロードに制約があり、artifact は immutable です。artifact 名は job 間でユニークにする必要があります。またif-no-files-foundはwarn/error/ignoreを選べます。(GitHub)現在の
e2eはif-no-files-found: warnで Playwright report と test-results を upload しています。これは evidence としては少し弱いです。required evidence とするなら missing artifact は warn ではなく block すべき、advisory evidence なら warn でよい、という区別を文書化してください。
8. cancellation / concurrency の扱いが不足
現在の workflow は
concurrency.cancel-in-progress: trueです。つまり古い PR head の CI run はキャンセルされ得ます。#894 の表では
cancelledを扱う予定ですが、次の区別が必要です。cancelled かつ current head の required job:
pending/current head:
workflow/path filter により required check が pending のまま:
GitHub 上も merge blocking になり得る
GitHub docs でも、workflow が path / branch filtering 等で skip されると required check が Pending のまま残り、merge がブロックされる場合があります。(GitHub Docs)
9.
check-japanese 等が現 CI inventory と接続されていない#894 は PR hygiene gate の例として
check-japanese 等を挙げていますが、取得した.github/workflows/ci.ymlにはcheck-japanesejob は見当たりません。別 workflow / GitHub App / 外部 check 由来なら、その source を表に入れるべきです。
GitHub 公式 docs は、複数 workflow で同じ job 名を使うと required status check が曖昧になり、merge がブロックされ得ると警告しています。(GitHub Docs)
抽象名だけを書くのは危険です。
#894 の改善草案
Issue 本文に次を追加するのがよいです。
If the policy described here conflicts with current
ci_verdict_summary.py, the document MUST mark the conflict and point to #863 rather than pretending enforcement exists.追加すべき CI inventory:
typecheck,lint,test,build,e2e,python-test,actionlintが分類表に記載されているsuccess/failure/timed_out/action_required/cancelled/neutral/skipped/staleとqueued/in_progress/waiting/requested/pendingの扱いが表で定義されているhead_sha=null,head_sha mismatch,expected_head_shaの扱いが表で定義されているhead_sha=null + skippedは allowlisted retrospective/conditional job のみ excluded であり、required PR-head evidence に数えないことが明記されているci_verdict_summary.pyの実装修正スコープとして責務分界が明記されている[ ] AC10:
pnpm lintがエラーなしで通る実装担当エージェントへの注意
この Issue は docs-only なので、実装担当に次を明示した方が安全です。
結論として、#894 は 「CI 運用設計の SSOT を作る Issue」にはなっているが、「AI が merge-ready を誤判定しないための契約」としてはまだ甘い です。特に
## 確認範囲skipped/neutral/head_sha=nullを GitHub の平台 semantics と agent policy に分けて書かないと、#863 の false positive / false negative を再生産します。Issue #894 は、
docs/dev/ci-operations.mdを追加し、CI job taxonomy、required/advisory/evidence、AI エージェント向け merge-ready 判定、pending/skipped/cancelled/head_sha=null等の扱いを文書化する docs-only Issue です。Allowed Paths もdocs/dev/ci-operations.mdのみです。#894 / #846 / #863 の Issue コメントはいずれも空でした。
総評
方向性は正しいが、このまま実装に渡すと「CI 運用設計書らしい文章」は作れても、AI エージェントの誤判定を止める実効性は弱いです。
特に危険なのは、GitHub の branch protection 上の “required check” と、リポジトリ独自の “agent merge-ready” を同じ意味で扱いかねない点です。GitHub 公式 docs では required status check は
successful/skipped/neutralでも要件を満たす扱いですが、AI エージェントの merge-ready ではskippedやneutralをそのまま pass とみなすと証跡偽陽性になります。([GitHub Docs]1)Blocking / High severity
1.
skipped/neutralの扱いが危険に曖昧GitHub Check Run API の conclusion には
action_required,cancelled,failure,neutral,success,skipped,stale,timed_outがあり、status にはqueued,in_progress,completed,waiting,requested,pendingがあります。([GitHub Docs]2)一方、現在の
ci_verdict_summary.pyはneutral/skipped/staleを fail bucket に分類し、determine_check_verdictでもneutral/skippedをfailedとして扱っています。これは #863 の問題意識そのものです。#863 は、PR #856 起点で
head_sha=nullかつconclusion=skippedの retrospective / conditional job が exit 10 偽陽性を起こすため、deploy-main,cleanup-pr,issue-body-japanese等を failed 扱いしない修正を求めています。 PR #856 自体は merged 済みで、この false positive の発見元として参照されています。修正案: #894 では次の 3 層を明示分離すべきです。
skipped/neutralの扱い2.
head_sha=nullの判定規則が足りない#894 は
head_sha=nullを表で扱うことを求めていますが、どのhead_sha=nullを除外してよく、どれをブロックすべきか が未定義です。これでは #863 と同じ誤判定が再発します。最低限、文書には次のルールが必要です。
GitHub CLI の
gh pr checksはbucketをpass/fail/pending/skipping/cancelに分類します。つまり実装側では GitHub API のconclusion=skippedと CLI のbucket=skippingの両方を意識する必要があります。(GitHub CLI)3. AC が keyword grep 中心で、低品質な文書でも通る
#894 の Verification Commands は
rg -c "product quality gate"やrg -c "head_sha"のような存在確認が中心です。これは敵対的には簡単にすり抜けられます。たとえば、表がなくても、実際の job 名がなくても、矛盾したルールでも、単語だけ書けば AC を満たせます。
修正案: AC を最低限こう強化すべきです。
pnpm lintは必要ですが、Markdown の意味的妥当性までは検証できません。AC8 を「最低限の形式チェック」と明記し、意味検証は grep 条件・表構造・実 CI job inventory で担保すべきです。4. 実 CI と taxonomy の対応が固定されていない
現在の
.github/workflows/ci.ymlにはtypecheck,lint,test,build,e2e,python-test,actionlintが存在します。typecheck/lint/test/buildは各ジョブで pnpm setup とpnpm install --frozen-lockfileを繰り返し、e2eは Playwright Chromium install とpnpm test:e2e:ciを実行します。python-testは uv / pnpm / ripgrep / pytest 群を実行し、ci_test_selectionartifact を生成します。actionlintは workflow lint を行います。#894 の taxonomy は抽象カテゴリだけでなく、実ジョブ名との対応表 を必須にすべきです。
推奨列:
特に
e2eは単なる runtime gate ではなく、Playwright report / test-results / visual evidence summary を持つ evidence producer でもあります。現在の workflow はplaywright-reportとtest-resultsを!cancelled()条件で upload し、環境 fingerprint や artifact URL を summary に書いています。5. docs-only Issue なのに「運用の実装済み感」が出る
#894 は Allowed Paths が
docs/dev/ci-operations.mdのみなので、.github/workflows/ci.ymlやci_verdict_summary.pyは変更できません。したがって文書には、この Issue は enforcement 実装ではなく normative design / decision record である と明記すべきです。
特に #863 が未解決のままなら、
head_sha=null skippedの実装挙動は現行コードと設計文書で乖離します。現行コードはskippedを fail 扱いしています。Medium severity / 高品質化ポイント
6. CI 高速化の順序はよいが、S3 cache 判断基準が曖昧
#894 は「計測 → setup 重複削減 → E2E 安定化 → cache 拡張」「S3 cache は計測後判断」としており、順序自体は妥当です。
ただし判断基準がありません。
GitHub Actions の cache は exact match / prefix match / restore-keys の順で探索され、cache miss 時は job 成功後に新規 cache が作成されます。また、cache には機密情報を入れるべきではなく、fork PR などから base branch cache へのアクセスがあり得ます。([GitHub Docs]4)
actions/setup-nodeの pnpm cache は依存ファイルを前提にし、node_modules自体は cache しません。([GitHub]5)pnpm/action-setupも Node.js はセットアップしないため、actions/setup-nodeとの併用が前提です。([GitHub]6)追記すべき判断基準:
7. Artifact policy が不足
actions/upload-artifactv4+ 系では artifact 名の衝突や再アップロードに制約があり、artifact は immutable です。artifact 名は job 間でユニークにする必要があります。またif-no-files-foundはwarn/error/ignoreを選べます。([GitHub]7)現在の
e2eはif-no-files-found: warnで Playwright report と test-results を upload しています。これは evidence としては少し弱いです。required evidence とするなら missing artifact は warn ではなく block すべき、advisory evidence なら warn でよい、という区別を文書化してください。
8. cancellation / concurrency の扱いが不足
現在の workflow は
concurrency.cancel-in-progress: trueです。つまり古い PR head の CI run はキャンセルされ得ます。#894 の表では
cancelledを扱う予定ですが、次の区別が必要です。GitHub docs でも、workflow が path / branch filtering 等で skip されると required check が Pending のまま残り、merge がブロックされる場合があります。([GitHub Docs]8)
9.
check-japanese 等が現 CI inventory と接続されていない#894 は PR hygiene gate の例として
check-japanese 等を挙げていますが、取得した.github/workflows/ci.ymlにはcheck-japanesejob は見当たりません。別 workflow / GitHub App / 外部 check 由来なら、その source を表に入れるべきです。
GitHub 公式 docs は、複数 workflow で同じ job 名を使うと required status check が曖昧になり、merge がブロックされ得ると警告しています。([GitHub Docs]1)
抽象名だけを書くのは危険です。
#894 の改善草案
Issue 本文に次を追加するのがよいです。
追加すべき CI inventory:
追加すべき status matrix:
改善後 Acceptance Criteria 案
実装担当エージェントへの注意
この Issue は docs-only なので、実装担当に次を明示した方が安全です。
結論として、#894 は 「CI 運用設計の SSOT を作る Issue」にはなっているが、「AI が merge-ready を誤判定しないための契約」としてはまだ甘い です。特に
skipped/neutral/head_sha=nullを GitHub の平台 semantics と agent policy に分けて書かないと、#863 の false positive / false negative を再生産します。squne121 commentedon Jun 13, 2026
Refinement Loop: Approved
The issue has been approved and is ready for implementation.
approvedsqune121 commentedon Jun 14, 2026
CONTRACT_REVIEW_RESULT_V1
判定サマリ
status: go — 実装着手可能。
checks
Worktree / Branch
Handoff to implement-issue
docs(#894): e2e artifact conditional化・PR hygiene inventory・Implementa…
feat(#894): CI 運用設計を docs/dev/ci-operations.md で定義し required/advisory…
squne121 commentedon Jun 14, 2026
post-merge-cleanup: 完了 (2026-06-14T00:50:00Z)
cleanup 実施内容
.claude/worktrees/issue-894-ci-operations-docを force 削除(PR マージ済み・git plumbing コミットにより working tree diverge していたが data loss なし)worktree-issue-894-ci-operations-docを削除origin/mainと整合済み(7a598ca)