Skip to content

実装: 全領域再検証 + CI global gate 有効化(E501 / #1138 Child 5) #1188

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "#1138"
goal_ref: "4 領域全体で E501 diagnostic が 0 件になったことを確認し、CI Ruff gate を --select E,F --ignore E402 へ変更して green にする"
change_kind: workflow

Parent Issue

#1138

Parent Goal Ref

  • Goal: .claude/scripts / scripts / schemas / .claude/skills の 4 領域で Ruff 0.15.18 の E501 diagnostic が 0 件になり、final child で CI Ruff command が --select E,F --ignore E402 に切り替わって緑になる状態。
  • Desired Destination: CI(.github/workflows/ci.yml)の Ruff command が --select E,F --ignore E402 になり、GitHub Actions python-test job が green であること。

Current Validated Scope

  • .github/workflows/ci.yml の Ruff command から --ignore E501 を除去し、--select E,F --ignore E402 へ変更する(1 行変更のみ)
  • 変更前提: Child 1〜4 がすべてマージ済みであること

Remaining Parent Gaps

Outcome

.github/workflows/ci.yml の Ruff command が --select E,F --ignore E402 に変更され、4 領域全体(.claude/scripts / scripts / schemas / .claude/skills)で ruff check --select E501 --ignore-noqa の E501 diagnostic が 0 件となり、GitHub Actions python-test job が green になった PR がマージされた状態。

In Scope

  • .github/workflows/ci.yml の Ruff command から --ignore E501 を除去し --select E,F --ignore E402 にする(1 行変更)
  • 4 領域全体の E501 再検証(VC として実行するが、ファイル変更はしない)

Out of Scope

  • .claude/scripts / scripts / schemas / .claude/skills 内の Python ファイル変更(Child 2〜4 の担当)
  • pyproject.toml / uv.lock / nested ruff.toml / .ruff.toml / exclude / extend-exclude の変更
  • E402 以外の Ruff rule の追加・削除
  • GitHub Actions ジョブ構成の変更(Ruff command の --ignore 引数変更のみ)
  • --exit-zero / --add-noqa / # noqa / per-file-ignores / line-length の使用・変更(gate を無効化するため禁止)
  • actions/checkout の version bump や fetch-depth 変更(既に fetch-depth: 0 設定済みのため不要)

Acceptance Criteria

  • AC1: uv run --locked ruff check --select E501 --ignore-noqa .claude/scripts scripts schemas .claude/skills が exit 0(E501 diagnostic 0 件)
  • AC2: uv run --locked ruff check --select E,F --ignore E402 .claude/scripts scripts schemas .claude/skills が exit 0
  • AC3: .github/workflows/ci.yml に期待 Ruff command が exact match で存在し、かつ E501 が Ruff ignore に残っていない(rg で positive + negative 両方を確認)
  • AC4: PR head SHA に紐づく GitHub Actions ci run の python-test job が conclusion == success であること(gh run list / gh run view で確認)
  • AC5: PR の base/head SHA 間の差分が .github/workflows/ci.yml のみであること

Verification Commands

# AC1
# baseline-expect: fail
# preflight-scope: pr_review_only
$ uv run --locked ruff check --select E501 --ignore-noqa .claude/scripts scripts schemas .claude/skills
# AC2
# baseline-expect: fail
# preflight-scope: pr_review_only
$ uv run --locked ruff check --select E,F --ignore E402 .claude/scripts scripts schemas .claude/skills
# AC3
# baseline-expect: fail
$ rg -n -- 'ruff check --select E,F --ignore E402 \.claude/scripts scripts schemas \.claude/skills' .github/workflows/ci.yml
$ ! rg -n -- 'ruff check .*--ignore [^[:cntrl:]]*E501' .github/workflows/ci.yml
# AC4
# baseline-expect: pass
# preflight-scope: pr_review_only
$ gh run list --repo squne121/loop-protocol -w ci.yml --json databaseId,headSha,status,conclusion,workflowName
# AC5
# baseline-expect: fail
# preflight-scope: pr_review_only
$ git diff --name-only "${PR_BASE_SHA}" "${PR_HEAD_SHA}"

Allowed Paths

  • .github/workflows/ci.yml

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
  • Child 4(.claude/skills E501 cleanup)がマージ未完了の場合(E501 が残っているため AC1/AC2 が fail する)
  • 4 領域で E501 が 0 件にならない場合(追加の cleanup child が必要であり本 Issue のスコープを超える)
  • .github/workflows/ci.yml 以外の Python ファイル修正が必要になった場合(Stop Condition 発火、別 cleanup Issue に分離)

Required Skills

  • GitHub Actions YAML(.github/workflows/ci.yml の Ruff command 変更)
  • Ruff(--select / --ignore オプション)

Runtime Verification Applicability

  • decision: not_applicable
  • reason: 本 Issue の変更対象は .github/workflows/ci.yml の Ruff command 引数変更のみであり、ブラウザやゲーム実行を伴う runtime 動作検証の対象ではない。検証は静的 lint(ruff)と GitHub Actions による CI green で行う。

Delivery Rule

  • 1 Issue = 1 PR
  • worktree: worktree-issue-N-e501-ci-global-gate
  • Draft PR 既定
  • Depends on: Child 4(.claude/skills E501 cleanup)マージ完了後に着手

Source

dedupe_key: 1138-child5-re-verification-ci-gate
parent_issue: "#1138"
origin_skill: post-merge-cleanup

Activity

  1. added
    phase/implementation
    agent/implementer
    enhancement
    on Jun 26, 2026
  2. squne121 commented on Jun 27, 2026

    @squne121
    OwnerAuthor

    判定: REQUEST_CHANGES

    #1188 はこのまま実装開始不可です。理由は単純で、#1188 の契約は「.github/workflows/ci.yml だけを変更する final gate child」なのに、直前の Child 4 PR #1202 が scripts/ の残存 E501 5件を #1188 に渡しています。これは #1188 の Allowed Paths / Out of Scope / Stop Conditions と正面衝突します。#1188 本体もコメントは 0 件で、補足合意は確認できません。

    最大の Blocker

    1. scripts/ の E501 が未解消なら #1188 の Stop Condition 発火

    #1188 は AC1/AC2 で 4 領域全体、つまり .claude/scripts scripts schemas .claude/skills の E501=0 と E/F green を要求し、変更可能ファイルは .github/workflows/ci.yml のみとしています。ところが PR #1159 は Child 3 の scripts/ cleanup を「34件中29件解消」に留め、local_main_branch_guard.py 2件・test_pr_body_validator.py 3件を残したままマージしています。

    さらに PR #1202 は Child 5 への引き継ぎで、.claude/skills/ は 0 件だが、scripts/ 残存 E501 5件は #1188 で対応予定と明記しています。これは #1188 の「CI workflow 1行変更のみ」という契約を破壊します。

    結論: #1188 に Python cleanup を混ぜてはいけません。先に別 Issue / PR で scripts/ 残存 5件を解消し、その後に #1188 を final gate 専用として実行してください。

    2. 現在の CI はまだ E501 を無視している

    現行 .github/workflows/ci.yml の python-test job は fetch-depth: 0 を既に持っているため、Child 5 で checkout 設定を追加する必要は薄いです。一方、Ruff step はまだ --ignore E501,E402 のままなので、#1188 の唯一の実装差分はここを --ignore E402 に変えることです。

    actions/checkout はデフォルトでは単一コミットだけを取得し、fetch-depth: 0 で全履歴を取る仕様です。現在の python-test job はこの条件を満たしているため、#1188 で追加変更を入れるなら「なぜ必要か」の証明が要ります。([GitHub]1)

    3. #1188 の検証コマンドが弱い

    AC3 の rg -n -- "--ignore E402" .github/workflows/ci.yml は不十分です。--ignore E501,E402 と --ignore E402 の両方が混在しても pass し得ます。少なくとも「Ruff command に E501 が残っていないこと」を機械的に assert してください。

    AC4 の gh workflow view --repo squne121/loop-protocol ci.yml も green 証明ではありません。workflow 定義が存在することしか確認しません。必要なのは、該当 PR head SHA の CI run を取得し、python-test job の conclusion == success を確認することです。

    AC5 の git diff --name-only HEAD~1 HEAD も危険です。複数コミット PR なら最後の 1 コミットしか見ません。#1156 のレビューでも同じ問題が指摘されており、PR base/head の immutable SHA で比較すべきです。

    外部仕様に基づく補強点

    Ruff の E501 は「物理的に全行が 120 文字以下」を意味しません。単一長語、閾値前から始まる URL、pragma、SPDX / copyright などは例外として扱われます。したがって #1188 の成功条件は「Ruff 固定条件で E501 diagnostic が 0 件」と書くべきで、「全行 120 以下」と書くべきではありません。([Astral Docs]2)

    Ruff は CLI オプションを pyproject.toml より高優先度で扱うため、CI command から E501 を外すこと自体が gate 有効化の本体です。また Ruff の exit code 2 は設定・CLI・内部エラーであり、「診断 0 件」として扱ってはいけません。([Astral Docs]3)

    Ruff の suppression は # noqa だけではなく、#noqa、# ruff: ignore[...]、# ruff: disable[...] / enable[...]、file-level suppression、設定側の ignore / per-file-ignores など複数あります。#1188 は workflow だけの変更に限定するべきですが、最終再検証では --ignore-noqa と設定変更なしの確認を維持してください。([Astral Docs]3)

    実装修正方針

    #1188 の前に、次の 別 Issue / PR を切ってください。

    Title: 実装: scripts/ 残存 E501 5件の最終 cleanup(#1138 Child 3b)
    
    Scope:
    - scripts/agent-guards/local_main_branch_guard.py
    - scripts/tests/test_pr_body_validator.py
    
    Goal:
    - `uv run --locked ruff check --select E501 --ignore-noqa scripts/` が exit 0
    - `uv run --locked ruff check --select E,F --ignore E402 scripts/` が exit 0
    - add/delete/rename/config/suppression なし
    - AST 同値性、file mode、comment/shebang/encoding 不変を verify-diff または同等検証で証明

    その後、#1188 は以下だけにしてください。

    - run_timed ruff_check uv run --locked ruff check --select E,F --ignore E501,E402 .claude/scripts scripts schemas .claude/skills
    + run_timed ruff_check uv run --locked ruff check --select E,F --ignore E402 .claude/scripts scripts schemas .claude/skills

    #1188 に追加すべき検証コマンド

    set -euo pipefail
    
    BASE_SHA="${PR_BASE_SHA:?}"
    HEAD_SHA="${PR_HEAD_SHA:?}"
    
    # 事前条件: 4領域全体で E501 が実際に 0
    uv run --locked ruff check \
      --isolated \
      --select E501 \
      --line-length 120 \
      --target-version py312 \
      --no-preview \
      --ignore-noqa \
      --no-respect-gitignore \
      --no-cache \
      --output-format json \
      .claude/scripts scripts schemas .claude/skills > e501-final.json
    
    python - <<'PY'
    import json
    with open("e501-final.json", encoding="utf-8") as f:
        diagnostics = json.load(f)
    assert diagnostics == [], diagnostics
    PY
    
    # 実際の CI command と同じ形でも pass すること
    uv run --locked ruff check \
      --select E,F \
      --ignore E402 \
      .claude/scripts scripts schemas .claude/skills
    
    # workflow command の exact check
    rg -n -- 'ruff check --select E,F --ignore E402 \.claude/scripts scripts schemas \.claude/skills' .github/workflows/ci.yml
    ! rg -n -- 'ruff check .*--ignore [^[:cntrl:]]*E501' .github/workflows/ci.yml
    
    # 差分は workflow のみ
    test "$(git diff --name-only "$BASE_SHA" "$HEAD_SHA")" = ".github/workflows/ci.yml"
    git diff --check "$BASE_SHA" "$HEAD_SHA"

    貼り付け用レビューコメント

    判定: REQUEST_CHANGES
    
    #1188 は現状のまま実装開始不可です。
    
    Blocker:
    1. #1188 は `.github/workflows/ci.yml` の Ruff command 変更のみを許可していますが、PR #1202 の Child 5 handoff は `scripts/` 残存 E501 5件(`local_main_branch_guard.py` 2件、`test_pr_body_validator.py` 3件)を #1188 で対応予定としています。これは #1188 の Out of Scope / Allowed Paths / Stop Conditions と矛盾します。
    2. #1188 の AC1/AC2 は 4領域全体の E501=0 を要求しているため、`scripts/` 残存がある状態では CI gate 有効化 PR を作ってはいけません。
    3. AC3 の `rg "--ignore E402"` は弱く、`--ignore E501,E402` の残存を否定できません。
    4. AC4 の `gh workflow view` は CI green 証明ではありません。PR head SHA の run / job conclusion を確認してください。
    5. AC5 の `HEAD~1` 型差分確認は複数コミット PR で不十分です。immutable PR base/head SHA を使ってください。
    
    要求:
    - #1188 の前に別 Issue / PR で `scripts/` 残存 E501 5件を解消する。
    - #1188 は `.github/workflows/ci.yml` の `--ignore E501,E402` → `--ignore E402` のみに限定する。
    - 4領域全体の hardened E501 JSON が空配列であること、実 CI command が pass すること、PR 差分が `.github/workflows/ci.yml` のみであること、python-test job が該当 head SHA で green であることを証跡化する。

    最終判断として、#1188 は「最後のスイッチを入れる Issue」であって、「残った Python E501 を直す Issue」ではありません。今のまま実装すると、parent #1138 の child topology と CI gate 契約を崩します。

  3. squne121 commented on Jun 27, 2026

    @squne121
    OwnerAuthor

    Refinement Loop: Approved

    The issue has been approved and is ready for implementation.

  4. squne121 commented on Jun 27, 2026

    @squne121
    OwnerAuthor

    contract_review_result/v1

    schema: contract_review_result/v1
    issue_number: 1188
    repo: squne121/loop-protocol
    generated_at: "2026-06-27T09:10:00Z"
    status: blocked
    body_sha256: "sha256:ab42795ee1b1cc3fe805060bfdc0dfe4c11565512304c7ae58698206155c8bec"

    判定: blocked

    #1188 は現状では実装着手不可です。


    Blocker 1: Stop Condition 発火 — 4 領域で E501 が 38 件残存

    #1188 の Stop Condition に明記されています:

    「4 領域で E501 が 0 件にならない場合(追加の cleanup child が必要であり本 Issue のスコープを超える)」

    現在の E501 残存状況(uv run --locked ruff check --select E501 --ignore-noqa .claude/scripts scripts schemas .claude/skills):

    Found 38 errors.
    

    内訳:

    • .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.py — 14 件
    • .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight_pnpm_no_tty.py — 1 件
    • .claude/skills/issue-refinement-loop/tests/test_artifact_security.py — 1 件
    • .claude/skills/issue-refinement-loop/tests/test_compact_review_result.py — 4 件
    • scripts/agent-guards/local_main_branch_guard.py — 2 件
    • scripts/agent-guards/skill_runtime_command_policy.py — 3 件
    • scripts/agent-guards/skill_runtime_exec.py — 1 件
    • scripts/agent-guards/tests/test_controlled_skill_mutation_exec.py — 3 件
    • scripts/ci/codex_execpolicy_matrix.py — 5 件
    • scripts/ci/tests/test_codex_execpolicy_matrix.py — 1 件
    • scripts/tests/test_pr_body_validator.py — 3 件

    #1188 の Allowed Paths は .github/workflows/ci.yml のみです。これらの E501 を解消することは Out of Scope かつ Stop Condition に抵触します。

    変更前提「Child 1〜4 がすべてマージ済みであること」は満たされていません。


    Blocker 2: VC preflight — uv run ruff がアローリスト外

    AC1 / AC2 の VC (uv run --locked ruff check ...) は VC preflight アローリストに含まれていません。

    'uv run ruff' is not in the VC preflight allowlist; only 'uv run pytest', 'uv run python3 -m pytest', ...
    

    これにより preflight は human_judgment に昇格し、自動 go を発行できません。

    • AC1: command_not_allowed (baseline-expect: fail)
    • AC2: command_not_allowed (baseline-expect: fail)

    VC Preflight サマリー

    AC 結果 baseline-expect 判断
    AC1 command_not_allowed fail blocked
    AC2 command_not_allowed fail blocked
    AC3 expected_fail (exit 1) fail go
    AC4 skipped (pr_review_only) pass go (deferred)
    AC5 pass (exit 0) pass go

    preflight 総合: human_judgment → human 判定: blocked


    必要なアクション

    1. scripts/ と .claude/skills/ の残存 E501 38 件を別 Issue で解消する(E501 (line-too-long) の段階導入 — line-length=120 基準で残 343 件を cleanup #1138 の cleanup child)
    2. .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.py の 14 件 E501 は worktree 上の未コミット変更に起因している可能性があります。該当 PR のマージ後に 実装: 全領域再検証 + CI global gate 有効化(E501 / #1138 Child 5) #1188 を再 preflight してください。
    3. 全 4 領域で E501 = 0 が確認されてから 実装: 全領域再検証 + CI global gate 有効化(E501 / #1138 Child 5) #1188 の CI gate 有効化を実施してください。

    preflight runner: baseline_vc_preflight/v1 · check_blockers.sh · run_contract_review_once.py

  5. squne121 commented on Jun 28, 2026

    @squne121
    OwnerAuthor

    判定

    条件付き GO。ただし #1188 本文と検証条件は REQUEST_CHANGES 相当で補強必須です。

    #1188 は、.github/workflows/ci.yml の Ruff command から E501 ignore を外す final gate 専用 Issue です。Issue 本文も、変更対象は .github/workflows/ci.yml の 1 行のみ、4 領域の E501 再検証は VC として実行するだけ、と定義しています。

    以前の最大ブロッカーだった「4 領域で E501 が 38 件残存」は、後続の #1213 / PR #1218 によって履歴上は解消済みです。#1213 は #1188 の前提を満たすための残存 E501 cleanup Issue として作られ、#1218 はその 11 ファイル・38 件の E501 修正としてマージ済みです。

    ただし、#1218 の自己申告だけを #1188 の前提証明にしてはいけません。#1218 のコメント履歴には、AC の多くが skip / partial 扱い、独立検証不可、REQUEST_CHANGES コメントが残っています。したがって #1188 実装前に current main 上で全領域 E501=0 / E,F green を再実行してから 1 行変更に進むべきです。

    実装差分はこれだけに限定

    現行 .github/workflows/ci.yml の python-test job は、Ruff step でまだ --ignore E501,E402 を使っています。ここが #1188 の唯一の実装対象です。

    - run_timed ruff_check uv run --locked ruff check --select E,F --ignore E501,E402 .claude/scripts scripts schemas .claude/skills
    + run_timed ruff_check uv run --locked ruff check --select E,F --ignore E402 .claude/scripts scripts schemas .claude/skills

    .github/workflows/ci.yml 以外の Python cleanup が必要になった時点で #1188 は Stop Condition 発火です。#1188 で Python ファイルを直してはいけません。

    敵対的レビュー観点の Blocker / Required Changes

    B1. #1188 の AC3 は弱い

    現在の AC3 は --ignore E402 が含まれることしか見ていません。これは --ignore E501,E402 と --ignore E402 が混在しても pass し得ます。

    必要なのは「期待コマンドが存在すること」と「Ruff command に E501 が残っていないこと」の両方です。

    rg -n -- 'ruff check --select E,F --ignore E402 \.claude/scripts scripts schemas \.claude/skills' .github/workflows/ci.yml
    ! rg -n -- 'ruff check .*--ignore [^[:cntrl:]]*E501' .github/workflows/ci.yml

    B2. AC4 の gh workflow view は green 証明ではない

    gh workflow view は workflow 定義を見るだけで、対象 head SHA の python-test job が成功した証明になりません。GitHub CLI は gh run list / gh run view で headSha、status、conclusion、jobs を JSON 取得できます。([GitHub CLI]1) (GitHub CLI)

    #1188 では、PR head SHA に紐づく ci run を取得し、python-test job の conclusion == success まで確認してください。

    B3. AC5 の HEAD~1 差分確認は不十分

    git diff --name-only HEAD~1 HEAD は、複数コミット PR では最後の 1 コミットしか見ません。#1218 も 3 commits の PR でした。

    #1188 では PR の immutable base/head SHA を使ってください。

    test "$(git diff --name-only "$PR_BASE_SHA" "$PR_HEAD_SHA")" = ".github/workflows/ci.yml"
    git diff --check "$PR_BASE_SHA" "$PR_HEAD_SHA"

    B4. 「全行 120 文字以下」ではなく「Ruff E501 diagnostic 0 件」と書く

    repo の Ruff 設定は line-length = 120 です。 ただし Ruff E501 は物理行長の単純判定ではなく、単一長語、閾値前から始まる URL、pragma、SPDX / copyright などに例外があります。([Astral Docs]3)

    #1188 の成功条件は、固定条件で Ruff E501 diagnostic が 0 件 と表現するべきです。

    B5. Ruff の exit code 2 を「診断 0 件」と混同しない

    Ruff は通常、違反なしなら 0、違反ありなら 1、設定・CLI・内部エラーなら 2 を返します。--exit-zero は診断があっても 0 にするため、gate 証明では使用禁止です。([Astral Docs]4)

    また Ruff は CLI オプションが pyproject.toml より高優先度なので、CI command から E501 を外すこと自体が gate 有効化の本体です。([Astral Docs]4)

    B6. checkout 設定変更は不要

    python-test job はすでに actions/checkout@v6 で fetch-depth: 0 を設定しています。 actions/checkout はデフォルトでは単一コミットのみ取得し、fetch-depth: 0 で全履歴を取得する仕様です。([GitHub]5)

    #1188 で checkout version bump や fetch-depth 変更を入れると、1 行 gate 変更 Issue から逸脱します。

    #1188 用の hardened verification

    set -euo pipefail
    
    BASE_SHA="${PR_BASE_SHA:?}"
    HEAD_SHA="${PR_HEAD_SHA:?}"
    
    # Toolchain evidence
    uv run --locked ruff --version
    
    # 4領域全体で E501 diagnostic が 0 件であること
    uv run --locked ruff check \
      --select E501 \
      --ignore-noqa \
      --output-format json \
      .claude/scripts scripts schemas .claude/skills > e501-final.json
    
    python - <<'PY'
    import json
    with open("e501-final.json", encoding="utf-8") as f:
        diagnostics = json.load(f)
    assert diagnostics == [], diagnostics
    PY
    
    # 実 CI command と同じ rule set で pass
    uv run --locked ruff check \
      --select E,F \
      --ignore E402 \
      .claude/scripts scripts schemas .claude/skills
    
    # workflow command の exact check
    rg -n -- 'ruff check --select E,F --ignore E402 \.claude/scripts scripts schemas \.claude/skills' .github/workflows/ci.yml
    ! rg -n -- 'ruff check .*--ignore [^[:cntrl:]]*E501' .github/workflows/ci.yml
    
    # 差分は ci.yml のみ
    test "$(git diff --name-only "$BASE_SHA" "$HEAD_SHA")" = ".github/workflows/ci.yml"
    git diff --check "$BASE_SHA" "$HEAD_SHA"
    
    # PR head SHA の ci / python-test green 証明
    run_id="$(
      gh run list -R squne121/loop-protocol -w ci.yml -c "$HEAD_SHA" \
        --json databaseId,headSha,status,conclusion,workflowName \
        --jq '.[] | select(.headSha=="'"$HEAD_SHA"'" and .workflowName=="ci" and .status=="completed") | .databaseId' \
        | head -n1
    )"
    test -n "$run_id"
    
    gh run view "$run_id" -R squne121/loop-protocol \
      --json headSha,status,conclusion,jobs \
      --jq '
        .headSha == "'"$HEAD_SHA"'" and
        .status == "completed" and
        .conclusion == "success" and
        ([.jobs[] | select(.name=="python-test") | .conclusion] == ["success"])
      ' | grep -qx true

    貼り付け用レビューコメント

    判定: CONDITIONAL_GO / contract hardening required
    
    #1188 は、#1213 / PR #1218 のマージ後であれば実装可能になっている可能性が高い。ただし、#1218 の自己申告だけでは #1188 の final gate 前提証明として弱いため、current main で 4 領域全体の E501=0 / E,F green を再検証してから着手すること。
    
    Required:
    1. #1188 の実装差分は `.github/workflows/ci.yml` の Ruff command 1 行のみ。
       `--ignore E501,E402` → `--ignore E402`
    2. Python ファイル修正が必要になった場合は #1188 では扱わず、別 cleanup Issue / PR に戻す。
    3. AC3 は `--ignore E402` の存在確認だけでは不十分。期待 Ruff command の exact match と、`E501` が Ruff ignore に残っていないことの negative check を追加する。
    4. AC4 の `gh workflow view` は green 証明ではない。PR head SHA の `ci` run を取得し、`python-test` job の `conclusion == success` を確認する。
    5. AC5 は `HEAD~1` ではなく immutable PR base/head SHA で `.github/workflows/ci.yml` のみ変更を確認する。
    6. 成功条件は「物理的に全行 120 文字以下」ではなく「Ruff fixed condition で E501 diagnostic 0 件」と書く。
    7. `--exit-zero` / `--add-noqa` / `# noqa` / `per-file-ignores` / `exclude` / `line-length` 変更は禁止。
    
    #1188 は「最後の gate switch」であり、「残った E501 を修正する Issue」ではない。

    最終判断

    実装は進めてよいですが、最初の作業は workflow 編集ではなく current main の再検証です。再検証で E501 が 0 件なら 1 行変更へ進む。1 件でも残るなら #1188 は止め、cleanup child を切り直すのが正しいです。

  6. squne121 commented on Jun 28, 2026

    @squne121
    OwnerAuthor
    schema: LOOP_HANDOFF_RESULT_V1
    termination_reason: approved
    issue_number: 1188
    anchor_comment_url: "https://github.com/squne121/loop-protocol/issues/1188#issuecomment-4824448352"
    iterations_consumed: 1
    verdict: approve
    summary: |
      anchor comment (B1〜B6) の全 Required Changes を Issue 本文に反映し、
      issue-reviewer による deterministic check (C1〜C11) が全 pass となった。
    changes_applied:
      - "AC3: positive (exact ruff command match) + negative (! rg E501 check) を単一 # AC3 VC ブロックに統合"
      - "AC4: gh workflow view → gh run list/view + PR head SHA による CI green 証明に変更"
      - "AC5: HEAD~1 → PR base/head SHA 差分確認に変更"
      - "Out of Scope: --exit-zero / --add-noqa / checkout config 変更禁止を追加"
      - "Outcome: 'E501 diagnostic 0 件' 表現に統一"
    next_action: impl_ready
    note: |
      実装着手前に issue-contract-review (--mode execute) で go を取得すること。
      Child 4 (#1187, PR #1202) マージ済みを前提に current main での E501=0 再検証が必須。
  7. squne121 commented on Jun 28, 2026

    @squne121
    OwnerAuthor
    schema: CONTRACT_REVIEW_RESULT_V1
    issue_number: 1188
    repo: squne121/loop-protocol
    status: go
    source: all_checks_pass
    checks:
      readiness: go
      blockers: pass
      product_spec: pass
      vc_preflight: pass
      template_compliance: pass
      state_label: pass
      allowed_paths_present: pass
      vc_present: pass
      stop_conditions_complete: pass
      ac_verifiability: pass
      worktree_branch_collision: pass
      next_action: implement
      blocked_reasons: []

    Contract Snapshot

    Outcome:
    .github/workflows/ci.yml の Ruff command が --select E,F --ignore E402 に変更され、4 領域全体(.claude/scripts / scripts / schemas / .claude/skills)で ruff check --select E501 --ignore-noqa の E501 diagnostic が 0 件となり、GitHub Actions python-test job が green になった PR がマージされた状態。

    Acceptance Criteria:

    • AC1: uv run --locked ruff check --select E501 --ignore-noqa .claude/scripts scripts schemas .claude/skills が exit 0(E501 diagnostic 0 件)
    • AC2: uv run --locked ruff check --select E,F --ignore E402 .claude/scripts scripts schemas .claude/skills が exit 0
    • AC3: .github/workflows/ci.yml に期待 Ruff command が exact match で存在し、かつ E501 が Ruff ignore に残っていない
    • AC4: PR head SHA に紐づく GitHub Actions ci run の python-test job が conclusion == success
    • AC5: PR の base/head SHA 間の差分が .github/workflows/ci.yml のみ

    Allowed Paths:

    • .github/workflows/ci.yml

    Worktree / Branch:

    • Branch: worktree-issue-1188-e501-ci-global-gate
    • Status: 未存在(衝突なし)

    VC Preflight 集約:

    AC scope exit_code decision
    AC1 pr_review_only skipped go
    AC2 pr_review_only skipped go
    AC3 (positive rg) baseline_fail_expected 1 (expected) go ✓
    AC3 (negative !rg) baseline_fail_expected — go ✓
    AC4 pr_review_only skipped go
    AC5 pr_review_only skipped go

    実装時の注意点:

    1. 着手前に current main で uv run --locked ruff check --select E501 --ignore-noqa .claude/scripts scripts schemas .claude/skills を実行し E501=0 を再検証すること
    2. 変更対象は .github/workflows/ci.yml の 1 行のみ: --ignore E501,E402 → --ignore E402
    3. Python ファイルの修正が必要になった場合は Stop Condition 発火(Stop して別 Issue に分離)
    4. AC1/AC2 は pr_review_only(PR review 時に実装者が手動検証)
  8. added a commit that references this issue on Jun 28, 2026
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