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 verdict artifact を AIエージェントが安定して読める ci_verdict_summary_v2 に正規化し、merge-ready 判定の誤読を減らす"
change_kind: mixedParent Issue
none(単独改善)
Parent Goal Ref
- Goal: CI 結果を機械可読 artifact と人間向け Step Summary に正規化し、AI review / impl-review-loop の CI 判定精度を高める
- Desired Destination: ci_verdict_summary_v2 schema が定義され、CI workflow が artifact を出力し、実装: ci_verdict_summary.py で head_sha=null の skipped ジョブを failed 扱いしない #863 との責務分界が明文化された状態
Current Validated Scope
.github/workflows/ci.ymlに ci_verdict_summary_v2 artifact 出力ステップを追加する.claude/skills/impl-review-loop/または.claude/skills/pr-review-judge/側の参照スクリプトを更新するdocs/dev/ci-operations.md(feat(#894): CI 運用設計を docs/dev/ci-operations.md で定義し required/advisory/evidence の責務を分離する #902 で作成)に ci_verdict_summary_v2 schema を追記する
Remaining Parent Gaps
- 全 review skill の ci_verdict_summary_v2 への完全移行(別 Issue 化予定)
- GitHub branch protection settings の変更(別途人間判断)
Outcome
.github/workflows/ci.yml が ci_verdict_summary_v2 の machine-readable JSON と人間向け Step Summary を出力し、required/advisory/evidence 分類・head SHA 一致判定・pending/skipped 扱いが定義されたスキーマが docs/dev/ci-operations.md に記述され、既存 CI_VERDICT_SUMMARY_V1 との移行方針が文書化された状態になる。
In Scope
ci_verdict_summary_v2の JSON schema を定義する(check name / required/advisory/evidence/excluded/unknown / conclusion / status / head_sha / expected_head_sha / head_sha_match / blocking_merge_ready / failure_reason / artifact_refs).github/workflows/ci.ymlに ci_verdict_summary_v2 artifact を出力するステップを追加する(artifact 名:ci-verdict-summary-v2-${{ github.run_id }}-${{ github.run_attempt }}、if-no-files-found: error、retention-days: 30、outputs にartifact-id/artifact-url/artifact-digestを含める)$GITHUB_STEP_SUMMARYに人間向け CI 判定表を出力する(ci_verdict_summary_v2.jsonから生成)- pending / skipped / cancelled / neutral の扱いをスキーマ上で表現する
docs/dev/ci-operations.mdに ci_verdict_summary_v2 schema を追記する(feat(#894): CI 運用設計を docs/dev/ci-operations.md で定義し required/advisory/evidence の責務を分離する #902 依存)- 既存
CI_VERDICT_SUMMARY_V1との移行方針を文書化する(V1→V2 migration table を含む) - 実装: ci_verdict_summary.py で head_sha=null の skipped ジョブを failed 扱いしない #863(head_sha=null skipped job 扱い修正)と重複するロジック変更がある場合は依存関係を明記する
- impl-review-loop または pr-review-judge から参照する次アクションを明記する
- check 分類は
check name単独ではなく(workflow, check name)tuple を使う - aggregator job (
ci-verdict-summary) にtypecheck,lint,test,build,e2e,python-test,actionlintをneedsで受けif: always()で実行する
Out of Scope
- このIssue単独で全 review skill の ci_verdict_summary_v2 への移行は行わない
- GitHub branch protection settings の変更は行わない
- PR Body Japanese Check のルール自体は変更しない
- 実装: ci_verdict_summary.py で head_sha=null の skipped ジョブを failed 扱いしない #863 と同一の head_sha 修正は重複して行わない
ci_verdict_summary_v2 Schema
schema: ci_verdict_summary_v2
schema_version: 2
generated_at: ISO-8601
repository: string
workflow_run_id: integer
workflow_run_attempt: integer
event_name: string
expected_head_sha: string
head_sha: string | null
overall_status:
enum: [merge_ready, blocked, pending, stale_head_sha, gh_error, no_required_evidence]
next_action:
enum: [none, wait_for_ci, inspect_failed_log_artifacts, refresh_head_sha, rerun_failed_check, manual_review_gh_error, manual_review_no_required_evidence]
checks:
- name: string
workflow: string
check_run_id: integer | null
status: queued | in_progress | completed | waiting | requested | pending | null
conclusion: success | failure | neutral | skipped | stale | timed_out | cancelled | action_required | null
classification: required | advisory | evidence | excluded | unknown
head_sha: string | null
expected_head_sha: string
head_sha_match: boolean
blocking_merge_ready: boolean
failure_reason:
enum: [none, failed, pending, cancelled_current_head, stale_head_sha, skipped_required, neutral_required, missing_required_artifact, gh_error, no_required_evidence]
artifact_refs:
- name: string
artifact_id: integer | null
artifact_url: string | null
artifact_digest: string | null
required_for_merge_ready: boolean
missing_policy: error | warn | ignoreRequired Design Constraints
ci_verdict_summary_v2はCI_VERDICT_SUMMARY_V1の置換ではなく、移行期間は V2 preferred / V1 fallback とする。ci_verdict_summary.pyの V1 verdict semantics は 実装: ci_verdict_summary.py で head_sha=null の skipped ジョブを failed 扱いしない #863/implement(#863): ci_verdict_summary.py で head_sha=null の allowlisted skipped ジョブを excluded 扱いする #911 の責務とし、本 Issue で重複変更しない。skipped/neutralは GitHub branch protection 上許容され得るが、agent merge-ready の required evidence には数えない。head_sha=nullは required PR-head evidence に数えない。head_sha=null + skippedは allowlisted retrospective/conditional job のみexcluded。- check 分類は
check name単独ではなく(workflow, check name)tuple を使う。 ci_verdict_summary_v2artifact は missing 時に workflow を失敗させる(if-no-files-found: error)。- Step Summary は
ci_verdict_summary_v2.jsonから生成し、別計算しない。 - aggregator job (
ci-verdict-summary) は全 required/evidence job をneedsで受け、if: always()で実行する。 - consumer の canonical owner は
pr-review-judgeとし、impl-review-loopは直接 parse しない。 classification=requiredの check はhead_sha == expected_head_shaかつconclusion == successの場合のみ pass。
Acceptance Criteria
- AC1:
ci_verdict_summary_v2JSON schema が docs/dev/ci-operations.md に定義されている - AC2:
.github/workflows/ci.ymlに ci_verdict_summary_v2 artifact upload ステップが存在する - AC3: GITHUB_STEP_SUMMARY への出力が ci_verdict_summary_v2.json 由来であること(rg "ci_verdict_summary_v2.json" .github/workflows/ci.yml が通る)
- AC4: schema に required / advisory / evidence / excluded / unknown の classification フィールドが含まれている(rg "advisory|evidence" docs/dev/ci-operations.md)
- AC5: schema に head_sha / expected_head_sha / head_sha_match フィールドが含まれている
- AC6: schema に pending / skipped / cancelled / neutral の status/conclusion 扱いが定義されている(rg "skipped|cancelled|pending" docs/dev/ci-operations.md)
- AC7: CI_VERDICT_SUMMARY_V1 との移行方針が docs に記述されている
- AC8:
pnpm testと pytest が通る - AC9: ci_verdict_summary_v2.json が valid JSON として生成され、schema_version / expected_head_sha / overall_status / next_action / checks[] を含む fixture test がある
- AC10: checks[] の status / conclusion / classification / failure_reason が定義済み enum のみを使う fixture test がある
- AC11: head_sha=null + skipped の allowlisted job は excluded になり、required job は blocked/failed になる fixture test がある
- AC12: neutral / skipped は required evidence として pass にならない fixture test がある
- AC13: artifact upload は unique name(ci-verdict-summary-v2-${{ github.run_id }}-${{ github.run_attempt }})、if-no-files-found: error、retention-days を明示する
- AC14: Step Summary は artifact と同一 JSON 由来で、overall_status / blockers / artifact-id / artifact-digest を表示する
- AC15: V1→V2 migration table が docs/dev/ci-operations.md にある
Verification Commands
# AC1
$ rg -c "ci_verdict_summary_v2" docs/dev/ci-operations.md
# AC2
$ rg -c "ci_verdict_summary_v2" .github/workflows/ci.yml
# AC3
$ rg -c "ci_verdict_summary_v2.json" .github/workflows/ci.yml
# AC4
# baseline-expect: pass
$ rg -c "advisory|evidence" docs/dev/ci-operations.md
# AC5
$ rg -c "head_sha_match" docs/dev/ci-operations.md
# AC6
# baseline-expect: pass
$ rg -c "skipped|cancelled|pending" docs/dev/ci-operations.md
# AC7
$ rg -c "CI_VERDICT_SUMMARY_V1" docs/dev/ci-operations.md
# AC8
$ pnpm test
# AC9
# preflight-scope: pr_review_only
$ uv run pytest .claude/skills/pr-review-judge/scripts/tests/ -v -k "ci_verdict_summary_v2"
# AC10
# preflight-scope: pr_review_only
$ uv run pytest .claude/skills/pr-review-judge/scripts/tests/ -v -k "ci_verdict_summary_v2"
# AC11
# preflight-scope: pr_review_only
$ uv run pytest .claude/skills/pr-review-judge/scripts/tests/ -v -k "head_sha and skipped"
# AC12
# preflight-scope: pr_review_only
$ uv run pytest .claude/skills/pr-review-judge/scripts/tests/ -v -k "neutral or skipped"
# AC13
$ rg "if-no-files-found: error" .github/workflows/ci.yml
$ rg "ci-verdict-summary-v2" .github/workflows/ci.yml
# AC14
$ rg "ci_verdict_summary_v2.json" .github/workflows/ci.yml
# baseline-expect: pass
$ rg "GITHUB_STEP_SUMMARY" .github/workflows/ci.yml
# AC15
$ rg -c "CI_VERDICT_SUMMARY_V1" docs/dev/ci-operations.mdRuntime Verification Applicability
applicability: deferred
decision: deferred
reason: CI 上での artifact 生成・upload の確認には実際の CI run が必要。実装後 CI push 後に確認可能。
deferred_destination:
destination_type: implementation_pr_ci
destination_ref: "#898 implementation PR CI run"
deferred_verification_condition:
trigger: "after implementation PR push"
required_evidence:
- "ci-verdict-summary-v2 artifact exists in CI run"
- "ci_verdict_summary_v2.json is valid JSON"
- "GITHUB_STEP_SUMMARY output is derived from ci_verdict_summary_v2.json"Allowed Paths
- .github/workflows/ci.yml
- docs/dev/ci-operations.md
- .claude/skills/impl-review-loop/
- .claude/skills/pr-review-judge/
- .claude/skills/pr-review-judge/scripts/tests/
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
- 実装: ci_verdict_summary.py で head_sha=null の skipped ジョブを failed 扱いしない #863 との実装重複が判明した場合は停止して責務分界を人間確認する
- Hard dependency:
- feat(#894): CI 運用設計を docs/dev/ci-operations.md で定義し required/advisory/evidence の責務を分離する #902 (docs/dev/ci-operations.md 作成) が merged 済みであること
- implement(#863): ci_verdict_summary.py で head_sha=null の allowlisted skipped ジョブを excluded 扱いする #911 が merged 済みであること、OR 実装: CI verdict artifact を正規化し AIエージェントの CI 待機・判定を安定化する #898 では CI_VERDICT_SUMMARY_V1 / ci_verdict_summary.py の verdict semantics を変更しないこと
Required Skills
- GitHub Actions(artifact upload / step summary / check 取得)
- JSON Schema / YAML schema 設計
Scope Delta(任意)
N/A
Delivery Rule
1 Issue = 1 PR。worktree を使用。Draft PR として起票し、CI 通過後に ready にする。#902 の docs/dev/ci-operations.md 作成後に着手することを推奨(依存関係あり)。
Metadata
Metadata
Assignees
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasetriage-requiredNeeds owner triage for priority decision
Activity
squne121 commentedon Jun 14, 2026
判定
REQUEST_CHANGES。#898 は方向性は正しいですが、このまま実装に渡すと「読める artifact」はできても、AI エージェントの merge-ready 誤判定を止めるには弱いです。
#898 自体のコメントは 0 件です。参照すべき実質的なレビュー情報は、#894 の設計レビュー、#894 実装 PR #902、#863 のレビューコメント、#863 実装中 PR #911 にあります。
主要な依存関係
#898 は、
ci_verdict_summary_v2schema、CI artifact、Step Summary、#863 との責務分界を目的にしています。スコープには.github/workflows/ci.ymlの artifact 出力、.claude/skills/impl-review-loop/または.claude/skills/pr-review-judge/側の参照更新、docs/dev/ci-operations.mdへの schema 追記が含まれます。#894 はすでに PR #902 で merged 済みで、
docs/dev/ci-operations.mdに CI job taxonomy、required/advisory/evidence、GitHub branch protection semantics と agent merge-ready semantics の分離、head_sha=null + skippedの allowlist 方針を文書化しています。#863 はまだ open で、PR #911 は draft です。#911 は
head_sha=None + conclusion=skippedのうち allowlisted retrospective/conditional job だけをexcludedにし、required job のhead_sha=None + skippedはfailedのままにする実装です。Blocking issues
1. #863 / #911 と責務衝突する
#898 は pending/skipped/cancelled/neutral、head SHA、V1 移行、pr-review-judge 更新まで含んでいます。一方 #863/#911 はまさに
ci_verdict_summary.pyの skipped/null-head 判定語彙を変更中です。PR #911 では V1 にexcluded_checks/excluded_count、no_required_evidenceが追加されています。修正: #898 の着手条件を明確にしてください。
#911 が未 merged のまま #898 を実装すると、
excluded/no_required_evidenceの扱いが二重実装または食い違いになります。2. schema が「フィールド名の列挙」で止まっている
#898 は
check name / required/advisory/evidence / conclusion / status / head_sha / expected_head_sha / head_sha_match / blocking_merge_ready / failure_reason / artifact_urlsを列挙していますが、型・enum・必須性・不変条件が未定義です。GitHub Check Run API の
statusはqueued,in_progress,completed,waiting,requested,pendingを取り、conclusionはsuccess,failure,neutral,skipped,stale,timed_out,cancelled,action_required等を取ります。statusとconclusionは別フィールドなので、V2 schema でも混ぜてはいけません。([GitHub Docs]1)修正: 最低限、次を schema に固定してください。
3. grep ベース AC では artifact の正しさを検証できない
現行 AC は
rg -c "ci_verdict_summary_v2"やrg -c "GITHUB_STEP_SUMMARY"で通ります。これは、壊れた JSON、空 artifact、手書き summary、古い head SHA、artifact 未生成でも pass できます。修正: AC を runtime artifact 検証に変えるべきです。
4. artifact upload の実装制約が Issue に入っていない
actions/upload-artifactは artifact 名の衝突・再アップロードに制約があり、v4 以降の artifact は immutable です。複数 job から同じ artifact 名に upload する設計は壊れます。またif-no-files-foundはwarn/error/ignoreを選べますが、CI verdict artifact は missing ならerrorにすべきです。([GitHub]2)修正: artifact 名と upload policy を固定してください。
artifact の参照には、単なる URL だけでなく
artifact-id,artifact-url,artifact-digestを含めるべきです。upload-artifact はこれらを outputs として返します。([GitHub]2)5. aggregator job の設計がない
各 job が個別に artifact を出すのではなく、
typecheck,lint,test,build,e2e,python-test,actionlintをneedsで受ける 単一の aggregator job が必要です。#894/#902 の CI inventory でも、これらが required/evidence job として整理されています。推奨形は以下です。
needs.*.resultだけでは check-runhead_sha、artifact ID、workflow/check 名、status/conclusion の完全な判定には不足します。#818 の V1 設計でも、PR head SHA 確定 →gh pr checks→ 必要時に REST / run/job 情報補完 → head SHA mismatch を stale として fail-closed、という取得順が定義されています。6. Step Summary が artifact と乖離する危険
GitHub の job summary は
$GITHUB_STEP_SUMMARYに Markdown を書く仕組みで、step ごとに個別ファイルです。([GitHub Docs]3)修正: Step Summary は手書きロジックで別計算せず、
ci_verdict_summary_v2.jsonから生成してください。そうしないと「artifact は blocked、summary は green」のような二重真実ができます。Summary には最低限これを出すべきです。
7. GitHub platform semantics と agent semantics の分離を壊しやすい
GitHub の required status check は
successful,skipped,neutralで満たされ得ます。ただし LOOP_PROTOCOL の agent merge-ready では、required PR-head evidence としてskipped/neutralを pass 扱いしない、というのが #894/#902 の設計です。([GitHub Docs]4)修正: V2 schema に次の invariant を明記してください。
8. check name だけで分類すると壊れる
GitHub は複数 workflow で同じ job 名を使うと required status check が曖昧になり得ると警告しています。([GitHub Docs]4)
#911 は allowlist を
(workflow_name, check_name)tuple にしています。これは正しい方向です。#898 の V2 schema もname単独ではなく、workflow,job_name,check_run_idを持つべきです。9. V1 migration policy が不足している
#818 の V1 は
all_pass | failed | pending_or_queued | stale_head_sha | gh_errorを中心にした compact verdict です。#911 ではそこに
excludedとno_required_evidenceが実質的に追加されています。#898 の移行方針には、最低限この対応表が必要です。#898 本文に追加すべき修正案
Required Design Constraints
Acceptance Criteria 追加案
結論
#898 は #894 の文書化成果を CI runtime artifact に落とす重要 Issue ですが、現状では schema・artifact・consumer migration・#863 依存が曖昧です。実装前に、少なくとも次を直してください。
ci_verdict_summary_v2の schema enum / invariant / migration table を固定するif-no-files-found: error、artifact-id/url/digestを使うpr-review-judgeを canonical owner にし、impl-review-loopは直接 parse しない方針にするsqune121 commentedon Jun 14, 2026
Refinement Loop: Human Escalation Required
The loop has terminated and requires human review. Cause: human judgment required
human_escalationhuman_judgment_requiredBlockers
squne121 commentedon Jun 14, 2026
Refinement 結果報告(狙い撃ち修正)
前回
human_escalationで停止した残存 checker blockers を狙い撃ちで修正しました。修正内容
LP010/LP016 fix — Verification Commands の AC9〜AC12 スタックを個別
# ACN+ 個別コマンドに分割:LP020 fix — Runtime Verification Applicability に
deferred_destination/deferred_verification_conditionを追加:Readiness Check 結果
Reviewer 結果
→
decision: deferredの実装前 Issue として正常な状態。テストは実装 PR(#898 implementation PR)で作成する。現状まとめ
Issue #898 の contract 構造は完成。anchor comment(issuecomment-4701833079)の 9 blocking issues もすべて本文に反映済み。実装着手 OK の状態です(
issue-contract-reviewで確認推奨)。squne121 commentedon Jun 14, 2026
Contract Review Result
fix(#898): B1-B5 ブロッカー修正 — inline Python 廃止・REQUIRED_CHECKS・unknown b…
implement(#898): CI verdict artifact を ci_verdict_summary_v2 として正規化し …