Skip to content

実装: historical 非必須 deploy-pr CANCELLED の current-head review false-block を解消する #2884

Open

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: none
goal_ref: "旧 HEAD の非必須 deploy-pr CANCELLED が現 HEAD の PR review を false-block しないよう CI provenance を分離する"
change_kind: workflow
dedupe_key: "follow-up:squne121/loop-protocol:pr-2861:historical-optional-deploy-pr-cancelled:v1"

Parent Issue

なし(単独改善。PR #2861 で発見した別スコープの follow-up)

Parent Goal Ref

Current Validated Scope

  • V1 CI verdict の check head / workflow run・attempt / required-context provenance を区別する最小分類変更と同じ領域の回帰テストのみ。
  • 旧 run と current run の identity を混同せず、required/current-head の失敗は従来どおり block する。

Remaining Parent Gaps

なし(単独改善)。#1666 の skipped 対応、#2605 の V2 unknown optional checks 設計調査、#1673 の required identity readback、#2836 の required waiter inventory はそれぞれ別スコープ。

Outcome

.claude/skills/pr-review-judge/scripts/ci_verdict_summary.py と対応する pytest 回帰テストを含む 1 PR を作り、旧 HEAD に結びついた非必須 deploy-pr CANCELLED は現 HEAD review を false-block せず、現 HEAD / required check の不備は fail-closed のままテストで検証できる状態にする。

Background

In Scope

  • V1 verdict の check SHA と workflow run/attempt、required-context identity を区別し、旧 HEAD の非必須 deploy-pr CANCELLED だけが現 HEAD の最終結果を汚染しない限定分類にする。必要な provenance が欠け判別できない場合は fail-closed。
  • required six contexts の current-head evidence の欠落・stale・cancelled・skipped・failed・pending は従来どおり success とみなさない。非必須でも current-head の cancelled/skipped/failed/pending を安易に許容しない。
  • 旧/現 HEAD・run/attempt・required/non-required の境界を pytest fixture で固定する。V1 public schema を不要に拡張しない。

Out of Scope

Acceptance Criteria

  • AC1: 旧 HEAD 255d1f71b545e1f87a7b958b443c953da489b5d1 の run 37065810649/attempt 1 に由来する非必須 deploy-pr completed/CANCELLED と現 HEAD の required 6/6 success が共存しても、旧取消のみを根拠に現 HEAD の V1 review verdict を failed/stale にせず、除外理由が検証できる。
  • AC2: 同じ deploy-pr でも現 HEAD に帰属する cancelled/skipped/failed/pending は pass にせず、provenance 不完全で old/current や required が特定できない場合も fail-closed にする。
  • AC3: 6 required contexts のどれかが current-head で missing/stale/cancelled/skipped/failed/pending の場合、非必須の過去取消の有無にかかわらず all_pass にしない。
  • AC4: 現 HEAD 6d69d9c86fd30df03295ecf8d867a95102e37afb の run 37072979303/attempt 1 と deploy-pages run 37072979363/attempt 1 が success の fixture は all_pass/exit 0。expected head と live head がずれた場合は stale とし、current-head review を旧 HEAD に巻き戻さない。
  • AC5: 実装: deploy-pr skipped を CI verdict から安全に除外する #1666 の null+skipped のみの除外境界を維持し、既存 V1 verdict regression suite が PASS する。

Verification Commands

# AC1
# baseline-expect: fail
$ uv run --locked pytest .claude/skills/pr-review-judge/scripts/tests/test_ci_verdict_summary.py::test_historical_optional_deploy_cancel_does_not_block_current_head -q
# AC2
# baseline-expect: fail
$ uv run --locked pytest .claude/skills/pr-review-judge/scripts/tests/test_ci_verdict_summary.py::test_current_or_unknown_deploy_cancel_stays_blocking -q
# AC3
# baseline-expect: fail
$ uv run --locked pytest .claude/skills/pr-review-judge/scripts/tests/test_ci_verdict_summary.py::test_required_context_failures_remain_blocking_with_historical_cancel -q
# AC4
# baseline-expect: fail
$ uv run --locked pytest .claude/skills/pr-review-judge/scripts/tests/test_ci_verdict_summary.py::test_current_head_success_and_expected_head_drift -q
# AC5
$ uv run --locked pytest .claude/skills/pr-review-judge/scripts/tests/test_ci_verdict_summary.py -q

Allowed Paths

  • .claude/skills/pr-review-judge/scripts/ci_verdict_summary.py
  • .claude/skills/pr-review-judge/scripts/tests/test_ci_verdict_summary.py

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
  • required contexts の信頼できる inventory / run-attempt provenance が取得できず安全な除外の証明ができない場合

Required Skills

  • なし

Required Design References

  • docs/dev/workflow.md
  • docs/dev/runtime-verification-policy.md

Runtime Verification Applicability

  • decision: not_applicable
  • reason: CI verdict の分類ロジックと hermetic pytest fixture で境界を検証する変更であり外部 runtime smoke は AC で要求しない。

Delivery Rule

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

    agent/implementerenhancementphase/implementation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions