Skip to content

feat(ci): Ruff設定をpyprojectへ集約 - #1784

Merged
squne121 merged 10 commits into
mainfrom
worktree-issue-1764-ruff-config-ssot
Jul 26, 2026
Merged

squne121 merged 10 commits into
mainfrom
worktree-issue-1764-ruff-config-ssot

Conversation

@squne121

@squne121 squne121 commented Jul 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

Issue #1764 の Ruff 設定 authority を pyproject.toml に集約し、CI の対象 path 集合を維持した変更です。本文中の証跡は current head 19a8c50bb941f61903d4431c95ada9227345e807 と base 56a4f10db4086de72d3e67dbccc20e9f2ea05821 に束縛しています。

受け入れ条件の達成状況

  • AC1: [tool.ruff.lint].select は E/F のみを設定 authority として定義します(確認済み)。
  • AC2: workflow の Ruff step は CLI の --select と global --ignore E402 を持たず、対象 path 集合を維持します(確認済み)。
  • AC3: global E402 ignore はなく、例外は具体的 file path に限定します(確認済み)。
  • AC4: verifier と fixture-driven negative tests は authority、CLI override、対象 path、不正な E402 exception を stable failure key で拒否します(確認済み)。
  • AC5: current-head verifier、56 件の verifier pytest、Ruff gate、型検査・lint・test・build は PASS です(確認済み)。
  • AC6: canonical CI skill の Ruff 実行例は設定由来の実行形へ更新済みです(確認済み)。

検証コマンド結果

  • uv run --locked python3 scripts/ci/verify_ruff_configuration.py --root .: PASS
  • uv run --locked pytest scripts/ci/tests/test_verify_ruff_configuration.py -q: PASS(56 passed)
  • uv run --locked ruff check .claude/scripts scripts schemas .claude/skills: PASS
  • pnpm typecheck: PASS
  • pnpm lint: PASS
  • pnpm test: PASS(100 files, 1829 tests)
  • pnpm build: PASS
  • ローカル actionlint: 未導入のため UNAVAILABLE。CI run 30205351181 の actionlint: SUCCESS。
    検証結果はすべて成功です。

各コマンドは期待どおり成功し、詳細は current-head TEST_VERDICT を参照してください。

current-head TEST_VERDICT(最新証跡): #1784 (comment)

Allowed Paths 遵守

Issue #1764 の Allowed Paths と current diff は一致しています。current diff は次の 5 ファイルだけです。

  • .claude/skills/ci-test-performance/SKILL.md
  • .github/workflows/ci.yml
  • pyproject.toml
  • scripts/ci/tests/test_verify_ruff_configuration.py
  • scripts/ci/verify_ruff_configuration.py
    許可パスは全件確認済みです。

これらは contract で許可された 5 つの変更パスです。上記以外のパスは current diff に含まれません。TEST_VERDICT の ALLOWED_PATHS_GATE_RESULT_V1.status は ok です。

Checks

CI run 30205351181 は current head 19a8c50bb941f61903d4431c95ada9227345e807 と base 56a4f10db4086de72d3e67dbccc20e9f2ea05821 に束縛され、completed / success です。required checks、actionlint、python-test、ci-verdict-summary はすべて SUCCESS です。

live artifact ci_test_selection を readback しました。ci_test_selection/v1 の pr_head_sha と head_sha は current head、diff_status.base_sha は current base と一致します。変更されたテストファイルは scripts/ci/tests/test_verify_ruff_configuration.py の 1 件で、scope_excluded_changed_files: [] と uncovered_changed_test_files: [] を確認しました。

Schema Change Applicability

  • decision: not_schema_change
  • reason: Ruff の静的解析設定、workflow invocation、verifier とそのテストを変更するものであり、producer-consumer 間の machine-readable schema は変更しません。

Schema Consumer Inventory

N/A(機械可読 schema の変更はありません)
reason: machine-readable schema を変更しないため、schema consumer の移行は不要です。

Safety Claim Matrix

Claim Implemented? Not controlled Evidence Follow-up
CI root verifier は .github/workflows/ci.yml から scripts/ci/verify_ruff_configuration.py --root . を起動し、Ruff 設定 authority と対象 path を repository root で検証する yes N/A current-head TEST_VERDICT、CI run 30205351181 の python-test と actionlint SUCCESS N/A
CI の Ruff invocation は pyproject.toml を rule authority とし、対象 path 集合を保ったまま CLI rule/config override を使わない yes N/A current-head verifier PASS、56 件の verifier pytest PASS、CI run 30205351181 SUCCESS N/A
変更された verifier test は current-head ci_test_selection/v1 artifact の python-test 選択に含まれ、除外・未カバーがない yes N/A artifact ci_test_selection(run 30205351181、id 8632933978)の changed test 1 件、excluded 0 件、uncovered 0 件 N/A

Notes

CI_TEST_PERFORMANCE_DECISION_V1:
  schema: CI_TEST_PERFORMANCE_DECISION_V1
  issue_number: 1764
  pr_number: 1784
  decision_scope: ci_change
  changed_paths:
    - .claude/skills/ci-test-performance/SKILL.md
    - .github/workflows/ci.yml
    - pyproject.toml
    - scripts/ci/tests/test_verify_ruff_configuration.py
    - scripts/ci/verify_ruff_configuration.py
  lane_classification:
    fast_static:
      applicable: true
      evidence:
        - current-head Ruff gate passed
        - current-head typecheck and lint passed
      required_commands:
        - uv run --locked ruff check .claude/scripts scripts schemas .claude/skills
        - pnpm typecheck
        - pnpm lint
    python_unit:
      applicable: true
      evidence:
        - verifier pytest passed: 56 tests
        - CI python-test succeeded on workflow run 30205351181
      required_commands:
        - uv run --locked pytest scripts/ci/tests/test_verify_ruff_configuration.py -q
    contract_artifact:
      applicable: true
      evidence:
        - CI root verifier passed with --root .
        - ci_test_selection/v1 artifact is current-head bound
      required_commands:
        - uv run --locked python3 scripts/ci/verify_ruff_configuration.py --root .
    integration:
      applicable: true
      evidence:
        - pnpm test passed: 100 files, 1829 tests
        - pnpm build passed
        - required CI checks succeeded on workflow run 30205351181
      required_commands:
        - pnpm test
        - pnpm build
  baseline_inputs:
    ci_runtime_baseline_v1_available: true
    run_count: 1
    p50_p95_ready: false
  artifact_consistency:
    ci_test_selection_v1_checked: true
    measured:
      artifact: ci_test_selection
      artifact_id: 8632933978
      artifact_digest: sha256:eff09001303f81cd7f8fa3f23682796456e14ec57c03ec73865354c2d68c3117
      workflow_run_id: 30205351181
      schema_version: ci_test_selection/v1
      job: python-test
      pr_head_sha: 19a8c50bb941f61903d4431c95ada9227345e807
      base_sha: 56a4f10db4086de72d3e67dbccc20e9f2ea05821
      changed_test_files:
        - scripts/ci/tests/test_verify_ruff_configuration.py
      scope_excluded_changed_files: []
      uncovered_changed_test_files: []
    missing_pytest_args: []
  risk_flags:
    - local_actionlint_unavailable; current-head CI actionlint succeeded
    - one current CI run is correctness evidence, not a P50/P95 performance baseline
  reviewer_gate:
    approve_allowed: false
    status: pending independent current-head review
    required_evidence:
      - https://github.com/squne121/loop-protocol/pull/1784#issuecomment-5083834974
      - https://github.com/squne121/loop-protocol/actions/runs/30205351181
  follow_up_required: []

この PR のマージで Issue #1764 をクローズします。Closes #1764

@github-actions

github-actions Bot commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

Preview URL

Preview removed (PR #1784 closed).

@squne121

Copy link
Copy Markdown
Owner Author
TEST_VERDICT:
  schema: TEST_VERDICT_MACHINE/v2
  producer_kind: test-runner
  repository: squne121/loop-protocol
  issue_number: 1764
  pr_number: 1784
  head_sha: 87adeea7f3614bf78e792a406c24e364da5456c4
  reviewed_head_sha: 87adeea7f3614bf78e792a406c24e364da5456c4
  diff_head_sha: 87adeea7f3614bf78e792a406c24e364da5456c4
  contract_body_sha256: sha256:daf3040eddfeeda5b39ff4defc2a4e66943385a8ebe07527409e34cb42f7a642
  run_id: 30184879817
  run_url: https://github.com/squne121/loop-protocol/actions/runs/30184879817
  workflow_run_id: 30184879817
  workflow_run_attempt: 1
  check_run_id: 89747973439
  artifact:
    name: ci-verdict-summary-v2-binding-30184879817-1
    artifact_digest: sha256:d065616a2fd291c7aa3ad57447378672e43c7bbdfbb2d238959033c0980c1166
    url: https://github.com/squne121/loop-protocol/actions/runs/30184879817/artifacts/8626732640
  artifact_payload:
    issue_number: 1764
    pr_number: 1784
    head_sha: 87adeea7f3614bf78e792a406c24e364da5456c4
    reviewed_head_sha: 87adeea7f3614bf78e792a406c24e364da5456c4
    diff_head_sha: 87adeea7f3614bf78e792a406c24e364da5456c4
    contract_body_sha256: sha256:daf3040eddfeeda5b39ff4defc2a4e66943385a8ebe07527409e34cb42f7a642
    command_hashes:
      - sha256:50081dfc367f3a6cf0a49b379d1c021e715fc103327b1fd28be3141bc01595e8
      - sha256:a28ab80588511dd25c7d2dab1ca8d91bcebfdc252ffe838b29c2b740a5bdd6d9
      - sha256:131cf8eefe3aa8c76d5bd38557b659c145b60a64360d4497dc53dbde62a7a63f
      - sha256:882821b574f403e978e77bad1fdc612560bc062f9ae50002d3cb59307dbd83fc
      - sha256:593749b6d33fdad28810f129c0aed74c15db7e3deb0c36b3664d88a93d7a2fef
  artifact_payload_sha256: sha256:f621d912750e68b86aa7ee2ddbbbfd1770d576e3804a5145c810431d31eef51a
  result: PASS
  mergeable: MERGEABLE
  merge_state_status: CLEAN
  branch_behind_main: false
  baseline_only: false
  verification_commands_pass: 5
  verification_commands_fail: 0
  verification_skipped_count: 0
  runtime_ac_results:
    - ac: AC1
      command: uv run --locked python3 scripts/ci/verify_ruff_configuration.py --root .
      command_hash: sha256:50081dfc367f3a6cf0a49b379d1c021e715fc103327b1fd28be3141bc01595e8
      exit_code: 0
      status: pass
      fallback_detected: false
      artifact_present: not_required
      human_review_required: false
      stop_condition_triggered: false
      notes: PASS
    - ac: AC2
      command: uv run --locked pytest scripts/ci/tests/test_verify_ruff_configuration.py::test_rejects_workflow_cli_rule_override
      command_hash: sha256:a28ab80588511dd25c7d2dab1ca8d91bcebfdc252ffe838b29c2b740a5bdd6d9
      exit_code: 0
      status: pass
      fallback_detected: false
      artifact_present: not_required
      human_review_required: false
      stop_condition_triggered: false
      notes: 1 passed
    - ac: AC3
      command: uv run --locked pytest scripts/ci/tests/test_verify_ruff_configuration.py::test_rejects_global_e402_ignore
      command_hash: sha256:131cf8eefe3aa8c76d5bd38557b659c145b60a64360d4497dc53dbde62a7a63f
      exit_code: 0
      status: pass
      fallback_detected: false
      artifact_present: not_required
      human_review_required: false
      stop_condition_triggered: false
      notes: 1 passed
    - ac: AC4
      command: uv run --locked pytest scripts/ci/tests/test_verify_ruff_configuration.py::test_rejects_changed_target_paths
      command_hash: sha256:882821b574f403e978e77bad1fdc612560bc062f9ae50002d3cb59307dbd83fc
      exit_code: 0
      status: pass
      fallback_detected: false
      artifact_present: not_required
      human_review_required: false
      stop_condition_triggered: false
      notes: 1 passed
    - ac: AC5
      command: uv run --locked ruff check .claude/scripts scripts schemas .claude/skills
      command_hash: sha256:593749b6d33fdad28810f129c0aed74c15db7e3deb0c36b3664d88a93d7a2fef
      exit_code: 0
      status: pass
      fallback_detected: false
      artifact_present: not_required
      human_review_required: false
      stop_condition_triggered: false
      notes: All checks passed

@squne121 squne121 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOOP_VERDICT_V2

LOOP_VERDICT_V2:
  verdict: APPROVE
  reviewed_head_sha: "87adeea7f3614bf78e792a406c24e364da5456c4"
  merge_ready: false
  mergeability:
    mergeable: "MERGEABLE"
    merge_state_status: "BEHIND"
  blockers: []
  required_auto_actions:
    - kind: update_branch
      executor: implementation-worker
      skill: implement-issue.update_branch
      mechanical: true
      blocking_merge_ready: true
      expected_head_sha: "87adeea7f3614bf78e792a406c24e364da5456c4"
  auto_fix_applied: []
  follow_up_issue_requests: []
  allowed_paths_gate:
    status: ok
    changed_files_source: github_pull_request_files_api_with_previous_filename
    changed_files:
      - .github/workflows/ci.yml
      - pyproject.toml
      - scripts/ci/tests/test_verify_ruff_configuration.py
      - scripts/ci/verify_ruff_configuration.py
  allowed_paths_gate_source: review_subagent

@squne121

Copy link
Copy Markdown
Owner Author
TEST_VERDICT:
  schema: TEST_VERDICT_MACHINE/v2
  producer_kind: test-runner
  repository: squne121/loop-protocol
  issue_number: 1764
  pr_number: 1784
  head_sha: f3ec7aadf2309e341d57cbc803a7baf21afa57a0
  reviewed_head_sha: f3ec7aadf2309e341d57cbc803a7baf21afa57a0
  diff_head_sha: f3ec7aadf2309e341d57cbc803a7baf21afa57a0
  contract_body_sha256: sha256:daf3040eddfeeda5b39ff4defc2a4e66943385a8ebe07527409e34cb42f7a642
  run_id: 30185215580
  run_url: https://github.com/squne121/loop-protocol/actions/runs/30185215580
  workflow_run_id: 30185215580
  workflow_run_attempt: 1
  check_run_id: 89748850037
  artifact:
    name: ci-verdict-summary-v2-binding-30185215580-1
    artifact_digest: sha256:22c14545841f28a29fd44c4ca326c90cb1837a22b66ea6d28385c41c939f02a9
    url: https://github.com/squne121/loop-protocol/actions/runs/30185215580/artifacts/8626823107
  artifact_payload:
    issue_number: 1764
    pr_number: 1784
    head_sha: f3ec7aadf2309e341d57cbc803a7baf21afa57a0
    reviewed_head_sha: f3ec7aadf2309e341d57cbc803a7baf21afa57a0
    diff_head_sha: f3ec7aadf2309e341d57cbc803a7baf21afa57a0
    contract_body_sha256: sha256:daf3040eddfeeda5b39ff4defc2a4e66943385a8ebe07527409e34cb42f7a642
    command_hashes: [sha256:50081dfc367f3a6cf0a49b379d1c021e715fc103327b1fd28be3141bc01595e8, sha256:a28ab80588511dd25c7d2dab1ca8d91bcebfdc252ffe838b29c2b740a5bdd6d9, sha256:131cf8eefe3aa8c76d5bd38557b659c145b60a64360d4497dc53dbde62a7a63f, sha256:882821b574f403e978e77bad1fdc612560bc062f9ae50002d3cb59307dbd83fc, sha256:593749b6d33fdad28810f129c0aed74c15db7e3deb0c36b3664d88a93d7a2fef]
  artifact_payload_sha256: sha256:65745bb6eac03c055a82e6b6850f452243be1c84719a001fcefaed7d458084e7
  result: PASS
  mergeable: MERGEABLE
  merge_state_status: CLEAN
  branch_behind_main: false
  baseline_only: false
  verification_commands_pass: 5
  verification_commands_fail: 0
  verification_skipped_count: 0
  runtime_ac_results:
    - {ac: AC1, command_hash: sha256:50081dfc367f3a6cf0a49b379d1c021e715fc103327b1fd28be3141bc01595e8, exit_code: 0, status: pass, fallback_detected: false, artifact_present: not_required, human_review_required: false, stop_condition_triggered: false}
    - {ac: AC2, command_hash: sha256:a28ab80588511dd25c7d2dab1ca8d91bcebfdc252ffe838b29c2b740a5bdd6d9, exit_code: 0, status: pass, fallback_detected: false, artifact_present: not_required, human_review_required: false, stop_condition_triggered: false}
    - {ac: AC3, command_hash: sha256:131cf8eefe3aa8c76d5bd38557b659c145b60a64360d4497dc53dbde62a7a63f, exit_code: 0, status: pass, fallback_detected: false, artifact_present: not_required, human_review_required: false, stop_condition_triggered: false}
    - {ac: AC4, command_hash: sha256:882821b574f403e978e77bad1fdc612560bc062f9ae50002d3cb59307dbd83fc, exit_code: 0, status: pass, fallback_detected: false, artifact_present: not_required, human_review_required: false, stop_condition_triggered: false}
    - {ac: AC5, command_hash: sha256:593749b6d33fdad28810f129c0aed74c15db7e3deb0c36b3664d88a93d7a2fef, exit_code: 0, status: pass, fallback_detected: false, artifact_present: not_required, human_review_required: false, stop_condition_triggered: false}

@squne121 squne121 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOOP_VERDICT_V2

LOOP_VERDICT_V2:
  verdict: APPROVE
  reviewed_head_sha: "f3ec7aadf2309e341d57cbc803a7baf21afa57a0"
  merge_ready: true
  mergeability:
    mergeable: "MERGEABLE"
    merge_state_status: "CLEAN"
  blockers: []
  required_auto_actions: []
  auto_fix_applied: []
  follow_up_issue_requests: []
  allowed_paths_gate:
    status: ok
    changed_files_source: github_pull_request_files_api_with_previous_filename
    changed_files:
      - .github/workflows/ci.yml
      - pyproject.toml
      - scripts/ci/tests/test_verify_ruff_configuration.py
      - scripts/ci/verify_ruff_configuration.py
  allowed_paths_gate_source: review_subagent

@squne121

Copy link
Copy Markdown
Owner Author

結論

Request changes 相当です。CI は最新 head f3ec7aad... で成功し、変更パスも Issue #1764 の許可範囲内ですが、中心命題である「pyproject.toml が Ruff 設定の唯一の正本」という保証を verifier が実現できていません。

Findings

1. Blocker: pyproject.toml が実際に唯一の設定元であることを検証していない

新 verifier はルートの pyproject.toml と .github/workflows/ci.yml しか読みません。ruff.toml、.ruff.toml、対象ディレクトリ配下の別設定、tool.ruff.extend を一切確認していません。

Ruff は次の挙動を持ちます。

  • .ruff.toml は ruff.toml より優先される。
  • ruff.toml は pyproject.toml より優先される。
  • サブディレクトリでは最も近い設定ファイルが使われ、親設定とは暗黙にはマージされない。
  • extend による別設定の継承も可能。

したがって、現在の verifier が PASS しても、CI の各対象ファイルがルート pyproject.toml の設定で lint されるとは限りません。([Astral Docs]1)

必要な修正

  • リポジトリ全体、少なくとも EXPECTED_TARGET_PATHS 配下で .ruff.toml と ruff.toml を探索し、存在したら fail-close する。

  • [tool.ruff].extend も禁止または明示的に検証する。

  • 可能なら各対象パスに対して ruff check --show-settings <representative-file> を使い、resolved configuration source と lint.select を検証する。

  • 以下の negative test を追加する。

    • ルートに .ruff.toml が存在する。
    • ルートに ruff.toml が存在する。
    • scripts/ 配下にネストした pyproject.toml または ruff.toml が存在する。
    • pyproject.toml が extend を指定する。

現状では、AC1 の「設定 authority」とPRタイトルの「pyprojectへ集約」を機械的に証明できていません。


2. High: --config による設定上書きを見逃す

RULE_OVERRIDE_OPTIONS は --select、--ignore、--per-file-ignores 等だけを列挙し、--config を検出しません。

Ruff の --config は、設定ファイルの指定だけでなく、次のようなインライン設定上書きにも使用できます。

ruff check ... --config 'lint.select=["ALL"]'
ruff check ... --config 'lint.ignore=["E402"]'

公式仕様でも、--config による設定値は検出された設定ファイルを上書きするとされています。([Astral Docs]1)

現在の verifier はこれを workflow_cli_rule_override として拒否しません。コマンド末尾に追加すれば、別の workflow_ruff_target_paths_changed にはなる可能性がありますが、設定上書きとパス変更を正しく区別できず、コマンド構造を少し変更すれば検出ロジック自体が不安定になります。

必要な修正

  • --config と --config=... を rule/config authority override として拒否する。
  • --isolated も拒否する。これは設定ファイルを無視するため、SSOT契約と正面から衝突する。
  • 将来のCLIオプション追加を考慮し、許可リスト方式にする。すなわち、prefix と4対象パス以外のトークンを原則拒否する。

3. High: E402例外が「実在する具体的ファイル」であることを保証していない

PR本文は「実在する対象ファイルごとの明示的な設定」と説明していますが、verifier の _is_specific_path() はワイルドカード文字がないことしか確認しません。ファイルの存在、対象パス内であること、通常ファイルであること、Pythonファイルであることを確認していません。

次の設定はいずれも現在の verifier を通過します。

[tool.ruff.lint.per-file-ignores]
"deleted/file.py" = ["E402"]
"../../outside.py" = ["E402"]
"README.md" = ["E402"]
"unlinted-directory/example.py" = ["E402"]

これでは、削除済みファイルの例外が永久に残る、対象外ファイルへの例外が蓄積する、誤記を検出できない、といった設定腐敗を防げません。

必要な修正

各 path について次を検証してください。

candidate = root / path
candidate.is_file()
candidate.suffix in {".py", ".pyi"}
candidate.resolve().is_relative_to(root.resolve())
any(candidate.resolve().is_relative_to((root / target).resolve())
    for target in EXPECTED_TARGET_PATHS)

さらに、実リポジトリの例外一覧について「現在本当にE402を発生させるか」を確認するテストも有効です。少なくとも存在確認の fixture test は必須です。


4. Medium: 「path集合」を検証するはずが、順序付き引数列を固定している

Issue とPR本文は対象 集合 を維持すると定義しています。

しかし実装は次のように完全一致するタプルを要求します。

tuple(tokens[len(expected_prefix):]) == EXPECTED_TARGET_PATHS

したがって、意味的に同一な以下のコマンドを拒否します。

ruff check scripts schemas .claude/scripts .claude/skills

これは安全側ではありますが、failure key 名の target_paths_changed と契約文言の「集合」に反しています。意図が「コマンド文字列も固定」であるなら Issue を修正すべきです。集合を守るなら、重複も考慮して Counter または重複拒否+set 比較にするべきです。


5. Medium: select = ["F", "E"] を不正扱いする

AC1 は「E と F だけ」を要求していますが、実装は順序まで ("E", "F") に固定します。

Ruffにおける select は有効化する rule selector のリストであり、このケースで順序に意味はありません。([Astral Docs]2)

厳密な正規表現として順序を固定する設計も可能ですが、その場合は「E/Fだけ」という意味検証ではなく「canonical representation」の検証であることを契約に明示すべきです。現状は不要な false positive です。


6. Medium: リポジトリ内の Required Skill が新方針と矛盾している

Issue #1764 は .claude/skills/ci-test-performance/SKILL.md を Required Design Reference としています。

しかし同 Skill は Ruff の「正しい使用法」として、今回禁止するCLI上書きを引き続き記載しています。

uv run --locked ruff check --select E,F .claude/scripts scripts schemas .claude/skills

これは単なる古い説明ではありません。AGENTS.md は .claude/skills/**/SKILL.md をエージェントスキルの正本と定義しています。

結果として、PRマージ後も実装エージェントが正本の指示に従って --select E,F を復活させる可能性があります。「Ruff設定のSSOT化」としては未完了です。

Issueの Allowed Paths には Skill が含まれないため、次のどちらかが必要です。

  1. Issue 実装: Ruff設定をpyproject.tomlへ集約し対象path集合を維持する #1764 の Allowed Paths を更新して同PRで修正する。
  2. 依存する follow-up Issue を作成し、このPRをその完了まで merge-block する。

「Out of Scopeだから放置」は不適切です。正本同士の矛盾を残したままSSOT化完了とは判断できません。


7. Low: テストが内部実装に密結合し、CLI契約をほぼ検証していない

テストは collect_violations() を直接 import し、返された key の集合だけを評価しています。

未検証なのは次の部分です。

  • CLIの終了コード。
  • FAILURE_KEY: の標準出力形式。
  • TOML/YAML parse error。
  • workflow step が0件または複数件の場合。
  • shell quote error。
  • --option=value 形式。
  • extend-ignore と extend-per-file-ignores。
  • 実在しないper-file ignore。
  • ネストしたRuff設定。
  • --config / --isolated。
  • 対象パスの重複。

AC4 が「安定した failure key」を要求する以上、少なくとも subprocess 経由のブラックボックステストを数件追加すべきです。

CI・レビュー状態

最新head f3ec7aad... では ci、日本語検査、hook integrity、session manifest、Pages deploy がすべて成功しています。

また、最新headに対する内部レビューは APPROVE / merge_ready: true で、未解決のinline review threadもありません。ただし、その判定は上記のRuff設定探索・--config・Skill正本矛盾を検出していません。

PR内の TEST_VERDICT_MACHINE は旧head 87adeea7... に紐づく記録です。最新headへのレビュー判定は存在しますが、PR本文の performance decision では pr_number: null、approve_allowed: false のままであり、機械証跡の表示は整理不足です。

推奨判定

REQUEST_CHANGES

最低限、以下をmerge条件にするべきです。

  1. .ruff.toml、ruff.toml、ネスト設定、extend を検出する。
  2. --config と --isolated を拒否する。
  3. per-file E402 path の実在性・対象範囲・Pythonファイル性を検証する。
  4. .claude/skills/ci-test-performance/SKILL.md の古いCLI例を更新するか、明示的なblocking follow-upを作る。
  5. 上記すべてにnegative fixture testを追加する。
  6. 最新headに紐づく TEST_VERDICT_MACHINE を再発行する。

@squne121

Copy link
Copy Markdown
Owner Author

判定

REQUEST_CHANGES です。

作業ログ終了時点では、PR #1784 の head は 9a196ad… で、test_issue_393_snapshot_fixture_processed が二度とも90秒でタイムアウトし、PRはDraft・未承認・未マージのままでした。

現在は状況が変わっています。

したがって、旧CI障害は現在のマージ阻害要因ではありません。しかし、Ruff設定SSOTを恒久的に保証する実装としては、まだ設計上のブロッカーがあります。

敵対的レビュー

P0: verifierが実リポジトリに対するCIゲートになっていない

現在のCIにあるRuff関連ステップは、設定由来の ruff check を実行するだけです。新設された verify_ruff_configuration.py --root . の実行ステップはありません。

一方、テストはすべて tmp_path に小さな模擬リポジトリを生成し、そのfixtureに対してverifierを呼び出しています。

つまり、今後実リポジトリへ .ruff.toml、ネストしたRuff設定、extend-selectなどが追加されても、

  1. fixtureテストは従来どおり成功する
  2. 実リポジトリ向けverifierはCIで呼ばれない
  3. Ruff自体が新しい設定を読み込む

というfalse-greenが成立します。

最低限、CIへ次の独立ステップが必要です。

- name: Verify Ruff configuration authority
  run: uv run --locked python3 scripts/ci/verify_ruff_configuration.py --root .

さらに、pytest側にも実リポジトリrootを対象とするcontract testを置き、CIステップ削除と設定ドリフトの双方を別経路で検出すべきです。

P0: 「E/Fだけ」という契約を実効ルール集合で検証していない

現在のverifierは、select が E と F であることは確認しますが、グローバル設定について拒否するのは実質的に次だけです。

  • [tool.ruff].extend
  • global ignore内のE402
  • 別Ruff設定ファイル

そのため、次はいずれも現在のverifierを通過します。

[tool.ruff.lint]
select = ["E", "F"]
extend-select = ["I"]
[tool.ruff.lint]
select = ["E", "F"]
ignore = ["F401"]

前者はE/F以外を追加し、後者はFルールを部分的に無効化します。Ruff公式仕様でも、extend-selectは有効ルールを追加し、ignoreやextend-ignoreはルール集合を変更すると定義されています。([Astral Docs]1)

したがって、静的に少なくとも以下を拒否する必要があります。

  • extend-select
  • global ignore
  • extend-ignore
  • E402以外を含むすべてのglobal/per-file suppression
  • 実効E/F集合を変化させるpreview等の設定

可能なら、locked Ruffの--show-settingsを設定解決のoracleとして併用し、対象ファイル群で実効設定が同じroot authorityに解決されることも確認すべきです。Ruff自身が--show-settingsと--show-filesを提供しています。([Astral Docs]1)

P1: Ruffの設定探索仕様と自作探索が一致していない

現在の実装は、リポジトリ内の**すべてのネストしたpyproject.toml**をRuff設定ソースとして拒否します。

しかしRuffは、[tool.ruff]を含まないpyproject.tomlを設定探索時に無視します。また、ファイルごとに最も近い設定を選び、親設定とは暗黙にマージしません。([Astral Docs]1)

現在の実装では、将来Pythonツールやサブプロジェクト用にRuffと無関係なpyproject.tomlを置いただけでCIを壊します。

修正方針は次です。

  • .ruff.tomlとruff.tomlは、対象path配下なら拒否
  • ネストしたpyproject.tomlはTOMLとして読み、[tool.ruff]がある場合だけ拒否
  • lint対象外のfixture/vendor領域は、実効設定に影響しない限り対象外
  • Ruffの--show-settings <file>で代表ファイルまたは全対象ファイルの解決元を検証

P1: 35件のE402例外が「必要」であることを証明していない

pyproject.tomlには35件の明示的E402例外が追加されています。

現在のverifierが確認するのは、各例外が以下を満たすことだけです。

  • wildcardではない
  • ["E402"]だけ
  • ファイルが存在する
  • 対象path配下のPythonファイルである

そのファイルが現在も本当にE402を発生させるかは検査していません。このままでは、不要になった例外が永久に残ります。

各例外について、診断用に次のような実行を行い、JSON出力にE402が最低1件存在することを確認すべきです。

uv run --locked ruff check \
  --isolated \
  --no-cache \
  --select E402 \
  --output-format json \
  <exception-file>

このCLI overrideは、CIの通常Ruff gateではなく「例外の必要性を検証するverifier内部の診断」として限定します。

P0: 現在のheadに束縛されたレビュー証跡が不足している

PR本文は現在も以下の古い情報を含んでいます。

  • verifierテスト「7件成功」
  • changed pathsが4件だけで、変更済みSkillを未記載
  • pr_number: null
  • ci_test_selection_v1_checked: false
  • reviewer_gate.approve_allowed: false
  • actionlint未実行との記述。ただし現在のCIではactionlint成功

リポジトリのpr-review-judgeは、TEST_VERDICT_MACHINEを最優先とし、headがstaleならAPPROVE禁止と定義しています。PR本文の自己申告だけではAPPROVEできません。

現在のhead 9a98388… に束縛されたfreshな以下が必要です。

  • TEST_VERDICT_MACHINE
  • CI_CHECK_RUN_SCOPED
  • ALLOWED_PATHS_GATE_RESULT_V1
  • LOOP_VERDICT_V2
  • 更新済みPR本文

P2: 90秒タイムアウトは解消ではなく直列隔離

現在のテストプランには、GitHub-hosted runner上の4-way xdistで90.10秒に達したため、test_baseline_vc_preflight.py全体を直列レーンへ移したと記録されています。

これはPR #1784を進めるには十分ですが、次は別Issueにすべきです。

  • subprocess VCをテスト単位で分離できる設計
  • 90秒固定timeoutへの依存除去
  • 実コマンド群ではなくfixture executorを注入する構造
  • ファイル全体の直列化を解除するための終了条件

P2: publish hook問題は#1688へ分離済み

ログではcanonical pushがremote_write_requires_approvalで拒否され、人間代行pushが必要でした。

この問題を扱うIssue #1688は既にOpenです。trusted execution-host contextをcontrolled executorから注入し、canonical pushだけを一度許可する契約になっています。PR #1784へ混入させるべきではありません。

actionlintはGitHub Actionsの構文、式、action input、shell script等の静的検査には有効ですが、今回の「rootのRuff設定だけがauthorityである」というリポジトリ固有の意味論は証明しません。したがって、actionlintとcustom verifierの両方が必要です。(GitHub)

Claude Code / Codex CLI 実行プロンプト

対象リポジトリ: squne121/loop-protocol
対象Issue: #1764
対象PR: #1784

PR #1784を現在のheadから継続し、Ruff設定SSOT化を設計・実装・検証・レビュー証跡更新まで完了してください。固定SHAや過去ログの状態を信用せず、GitHubとローカルworktreeから現在値を再取得してください。

実行方針

  • メインセッションはcontrol-planeに限定する。

  • top-level SubAgentを用途別に使用する。

    • codebase-investigator: Issue、PR、diff、設定探索、CI wiringの事実確認
    • web-researcher: Ruffとactionlintの公式一次情報確認
    • implementation-worker: Allowed Paths内の実装
    • test-runner: 独立検証と証跡生成
    • pr-reviewer: 実装者の自己申告に依存しないcurrent-head review
  • SubAgent自身に別SubAgentを起動させない。

  • 破壊的操作、秘密情報、外部課金、権限不足だけを外部停止条件とする。

  • Allowed Paths外の変更が必要な場合は#1764へ混入させず、既存Issueを検索し、存在しなければ別Issueを起票して#1764側はfail-closedにする。

  • raw git add、raw git commit、force push、raw gh pr review、hook迂回は禁止する。

  • staging、commit、publish、review投稿はリポジトリのcontrolled executor/sanctioned laneを使用する。

1. 必須preflight

最初に以下を実行する。

uv run python3 scripts/check_local_main_branch_state.py --json

次に、read-only probeはraw gitよりリポジトリ提供scriptを優先し、以下を動的に取得する。

rtk gh issue view 1764 --comments
rtk gh pr view 1784 --json state,isDraft,headRefName,headRefOid,baseRefName,mergeable,mergeStateStatus,body,statusCheckRollup
rtk gh pr diff 1784

以下を読む。

  • AGENTS.md
  • CLAUDE.md
  • .claude/rules/project-constitution.md
  • docs/dev/workflow.md
  • docs/dev/test-lane-policy.md
  • docs/dev/hook-boundaries.md
  • docs/dev/agent-runtime-ops.md
  • .claude/skills/impl-review-loop/SKILL.md
  • .claude/skills/impl-review-loop/steps/preparation.md
  • .claude/skills/impl-review-loop/steps/step-1-implementation.md
  • .claude/skills/impl-review-loop/steps/step-2-verification.md
  • .claude/skills/impl-review-loop/steps/step-4-pr-review.md
  • .claude/skills/impl-review-loop/steps/step-5-feedback-and-termination.md
  • .claude/skills/pr-review-judge/SKILL.md
  • .claude/skills/ci-test-performance/SKILL.md
  • .claude/skills/issue-contract-review/SKILL.md
  • .claude/agents/codebase-investigator.md
  • .claude/agents/web-researcher.md
  • .claude/agents/pr-reviewer.md
  • .claude/settings.json
  • .codex/hooks.json
  • .codex/rules/default.rules
  • scripts/agent-guards/git_mutation_command_policy.py

Issue #1764のlatest CONTRACT_REVIEW_RESULT_V1 status: go、特にコメント #5082505941のcontract fingerprintとAllowed Pathsをcurrent stateに対して検証する。stale、欠落、競合なら実装せずcontract refresh経路へ送る。

PRコメント #5082479566を最低fix deltaとして扱う。ただし、過去head向けの判定をcurrent-head証跡として再利用しない。

2. 現在状態の再判定

以下を確認して構造化して報告する。

  • current PR head SHA
  • base SHA
  • current changed files
  • current contract snapshot SHA
  • current CI jobsとconclusion
  • current-headに束縛されたTEST_VERDICT_MACHINEの有無
  • current-headに束縛されたLOOP_VERDICT_V2の有無
  • PR本文のchecks、changed_paths、test count、pr_number、reviewer_gateの鮮度
  • Issue #1764のAllowed Pathsと実diffの一致
  • Issue #1688の状態。publish問題を#1764へ混ぜない
  • 以前失敗したbaseline VCテストが現在serial laneへ移された経緯
  • serial隔離の根本修正を扱う既存Issueの有無

既存Issueがない場合だけ、baseline VCテストの90秒timeout/ファイル全体serial隔離を解消するfollow-up Issueをcreate-issue skillで起票する。#1764の変更には含めない。

3. 必須修正

A. verifierをCIの実リポジトリrootへ接続する

.github/workflows/ci.ymlのRuff step直前に、少なくとも次を追加する。

- name: Verify Ruff configuration authority
  run: uv run --locked python3 scripts/ci/verify_ruff_configuration.py --root .

このstepの欠落・重複・コマンド変更をstable failure keyで拒否する。

さらに、scripts/ci/tests/test_verify_ruff_configuration.pyへ実リポジトリrootを対象にしたintegration contract testを追加する。fixtureテストだけで完了扱いにしない。

例:

def test_repository_root_satisfies_ruff_configuration_contract():
    repository_root = Path(__file__).resolve().parents[3]
    assert checker.collect_violations(repository_root) == []

repository root計算は実際のディレクトリ階層を確認して決定する。

B. E/Fだけという実効ルール契約を強化する

現在の静的検査に加え、少なくとも以下を拒否する。

  • [tool.ruff.lint].extend-selectの非空値
  • global ignore
  • global extend-ignore
  • E402以外のper-file ignore
  • E/F以外を有効化し得る設定
  • category selector E / Fの一部を無効化する設定
  • contractで明示していないpreview ruleの有効化
  • workflowまたはSkill内の--config、--isolated、--select、--extend-select、--ignore、--extend-ignore、--per-file-ignores、--extend-per-file-ignores

locked Ruffの実出力を調査し、ruff check --show-settings <file>を設定解決のoracleとして利用できるか確認する。テキスト出力の安定性がlocked versionで十分なら、対象ファイルのresolved settingsがroot pyproject.toml由来かつ契約どおりであることを検証する。

独自実装でRuffの全設定解決ロジックを再実装しない。

C. Ruff公式のconfig discovery semanticsへ合わせる

現在の「すべてのネストしたpyproject.tomlを拒否」は修正する。

  • .ruff.tomlとruff.tomlは、lint対象pathまたはその設定解決経路に存在すれば拒否
  • ネストしたpyproject.tomlはTOMLとして解析し、[tool.ruff]が存在する場合だけRuff authority競合として拒否
  • [tool.ruff]を含まないnested pyprojectは許可
  • lint対象外のfixture、vendor、temporary領域にある設定ファイルは、Ruffの実効設定へ影響しない限り拒否しない
  • [tool.ruff].extendは引き続き拒否
  • 同一ディレクトリでの.ruff.toml、ruff.toml、pyproject.tomlの優先順位をnegative fixtureで確認する

D. E402例外の必要性を証明する

各per-file-ignoresエントリについて、次を検証する。

  • concrete path
  • .pyまたは.pyi
  • lint対象path配下
  • code listは正確に["E402"]
  • ファイルが存在する
  • suppressionを外した診断で実際にE402が発生する

診断では、通常CIのRuff commandとは分離して、例外ごとに次のような実行を行う。

uv run --locked ruff check \
  --isolated \
  --no-cache \
  --select E402 \
  --output-format json \
  <file>

期待する挙動:

  • exit 1かつJSON内にcode=E402が1件以上: 例外は必要
  • exit 0またはE402なし: ruff_per_file_e402_exception_stale
  • exit 2、JSON不正、timeout: ruff_per_file_e402_exception_probe_failed

subprocessには明示timeoutを設定する。診断用途のCLI overrideを、通常workflowやSkillのcanonical commandへ持ち込まない。

E. workflow解析を強化する

  • "Ruff check (timed)"というstep名だけをauthorityにしない
  • ci.yml内のすべてのrun stepを調べ、ruff check呼び出しを列挙する
  • canonical Ruff invocationがちょうど1件であることを確認
  • verifier invocationがちょうど1件であることを確認
  • 別名stepやshell wrapper経由の追加Ruff invocationを拒否
  • canonical target path集合は順序非依存だが、重複・欠落・余剰を拒否
  • ruff check @argfile、shell変数、command substitution等で検査を回避できないようfail-closedにする

F. negative testsを追加する

最低限、以下を追加する。

  1. extend-select = ["I"]を拒否
  2. ignore = ["F401"]を拒否
  3. extend-ignore = ["F841"]を拒否
  4. nested pyproject without [tool.ruff]は許可
  5. nested pyproject with [tool.ruff]は拒否
  6. nested .ruff.tomlは拒否
  7. canonical Ruff step以外の追加Ruff invocationを拒否
  8. verifier CI step欠落を拒否
  9. verifier CI step重複を拒否
  10. stale E402 exceptionを拒否
  11. E402 probe失敗/timeoutをstable failure keyで拒否
  12. actual repository root contractが成功
  13. CLIがfailure keyと非ゼロ終了を返す
  14. valid root configでは成功

既存failure keyの意味を変更しない。新しいfailure keyは安定したsnake_caseで追加する。

4. Allowed Paths

変更は最新contract snapshotのAllowed Pathsに限定する。現在想定される対象は以下。

  • pyproject.toml
  • .github/workflows/ci.yml
  • scripts/ci/verify_ruff_configuration.py
  • scripts/ci/tests/test_verify_ruff_configuration.py
  • .claude/skills/ci-test-performance/SKILL.md

これ以外が必要なら勝手に変更せず、contractを再確認して別Issueへ分離する。

Issue #1788 / PR #1790で導入されたpython-test-planのserial隔離は、#1764では変更しない。

Issue #1688のpublish guard修復も、#1764では変更しない。

5. 検証

変更後、少なくとも以下を実行する。

uv run --locked pytest scripts/ci/tests/test_verify_ruff_configuration.py -q
uv run --locked python3 scripts/ci/verify_ruff_configuration.py --root .
uv run --locked ruff check .claude/scripts scripts schemas .claude/skills
pnpm typecheck
pnpm lint
pnpm test
pnpm build

workflow変更について以下も実行する。

actionlint .github/workflows/ci.yml

actionlintがローカルに存在しない場合、未実行を成功扱いにせず、CIのcurrent-head actionlint checkを証拠として取得する。

pytest full laneを実行する場合は.github/ci/python-test-plan.jsonのloaderを使い、手書きで対象集合を複製しない。

テスト結果は、コマンド、exit code、件数、実行head SHA、contract snapshot fingerprintを構造化artifactへ記録する。

6. Commit・publish

  • raw git add / git commitは禁止
  • controlled_git_change_exec.pyを使用
  • current remote head、local verified head、Allowed Paths gateを拘束する
  • existing branchへのcanonical publish laneを使用
  • force、tag、delete、mirror、all、raw GitHub Ref APIは禁止
  • remote_write_requires_approvalで停止した場合は迂回しない
  • Issue #1688へ状態を集約し、必要なbinding付き人間代行コマンドだけを提示する
  • publish後にremote headをreadbackし、期待SHAと一致することを確認する

7. PR本文と証跡の更新

current headに合わせ、PR本文を更新する。

  • 実際の変更ファイル5件をすべて記載
  • 実際のテスト件数へ修正
  • pr_number: 1784
  • changed_pathsへSkillを含める
  • ci_test_selection_v1_checkedを実測値へ更新
  • actionlintのcurrent-head結果を反映
  • reviewer_gateをfresh evidenceに基づき再生成
  • Safety Claim Matrixを新しい保証範囲へ更新
  • 「verifierがCIから実行される」ことの証拠を追加
  • Closes #1764を維持
  • 過去headのSHA、CI URL、TEST_VERDICTをcurrent evidenceとして再利用しない

current remote headに対し、freshな以下を生成・投稿する。

  • TEST_VERDICT_MACHINE
  • CI_CHECK_RUN_SCOPED
  • ALLOWED_PATHS_GATE_RESULT_V1
  • LOOP_VERDICT_V2

pr-reviewerにはimplementation-workerの推論・自己評価をcanonical evidenceとして渡さない。Issue contract、current diff、machine test manifest、CI check run、public-safe artifactだけで独立レビューさせる。

レビュー条件:

  • blockerあり: REQUEST_CHANGES
  • stale head: REQUEST_CHANGES
  • verifierがCI root gateでない: REQUEST_CHANGES
  • actual rule setがE/Fだけと証明できない: REQUEST_CHANGES
  • 不要なE402例外が残る: REQUEST_CHANGES
  • current-head evidence不足: REQUEST_CHANGES
  • 全条件成立、CI成功、required_auto_actions空: APPROVE相当のCOMMENT
  • self-authored PRではGitHubのAPPROVE eventを使わない
  • mergeは行わず、人間の最終判断に残す
  • Issue #1764はPRのCloses #1764によるmergeで閉じる。手動closeしない

8. 最終報告

最後に以下を報告する。

RESULT:
  issue: 1764
  pr: 1784
  base_sha: <sha>
  reviewed_head_sha: <sha>
  contract_snapshot: <url-or-id>
  changed_files: []
  adversarial_findings_fixed: []
  tests:
    - command: ...
      exit_code: ...
      result: ...
  ci:
    current_head_bound: true | false
    required_checks_passed: true | false
  evidence:
    test_verdict_machine: <url-or-null>
    ci_check_run_scoped: <url-or-null>
    loop_verdict_v2: <url-or-null>
  allowed_paths_gate: ok | fail_closed | stale_snapshot | indeterminate
  publish_status: published | blocked
  remaining_followups: []
  final_status: draft_pr_ready | request_changes | blocked

不明な項目を推測で埋めない。確認できない場合はnullまたはblockedとし、停止理由を具体的に記載する。

このプロンプトはClaude CodeとCodex CLIの双方で使用でき、リポジトリ固有のskill・hook・controlled executorを優先する構成です。

@squne121

Copy link
Copy Markdown
Owner Author

Current-head verification

TEST_VERDICT_MACHINE:
  schema: TEST_VERDICT_MACHINE/v2
  producer_kind: test-runner
  issue_number: 1764
  pr_number: 1784
  reviewed_head_sha: "0107e32db2e0562f5d07e669680e9fd5ac806883"
  contract_snapshot_url: "https://github.com/squne121/loop-protocol/issues/1764#issuecomment-5083515176"
  contract_body_sha256: "sha256:dd147b8f6471487b43d3dc91b107d4ee97136eb82c417b7f65228abfe4b13b55"
  overall_result: PASS
  local_verification:
    verifier_root: PASS
    targeted_negative_fixture_pytest: PASS
    ruff_gate: PASS
    pnpm_typecheck: PASS
    pnpm_lint: PASS
    pnpm_test: PASS
    pnpm_build: PASS
    actionlint_local: UNAVAILABLE
  CI_CHECK_RUN_SCOPED:
    workflow_run_id: 30202791964
    head_sha: "0107e32db2e0562f5d07e669680e9fd5ac806883"
    required_checks: PASS
    actionlint: SUCCESS
    python_test: SUCCESS
    ci_verdict_summary: SUCCESS
  ALLOWED_PATHS_GATE_RESULT_V1:
    status: ok
    changed_paths:
      - .claude/skills/ci-test-performance/SKILL.md
      - .github/workflows/ci.yml
      - pyproject.toml
      - scripts/ci/tests/test_verify_ruff_configuration.py
      - scripts/ci/verify_ruff_configuration.py

@squne121

Copy link
Copy Markdown
Owner Author

Current-head verification

TEST_VERDICT_MACHINE:
  schema: TEST_VERDICT_MACHINE/v2
  producer_kind: test-runner
  issue_number: 1764
  pr_number: 1784
  reviewed_head_sha: "f2187d07da259bcd47e7259ad841b2b07c019131"
  base_sha: "4d336ed9dc35e30c9e29426506a5b011c304686d"
  contract_snapshot_url: "https://github.com/squne121/loop-protocol/issues/1764#issuecomment-5083607296"
  contract_source_id: 5083607296
  contract_body_sha256: "sha256:dd147b8f6471487b43d3dc91b107d4ee97136eb82c417b7f65228abfe4b13b55"
  overall_result: PASS
  local_verification:
    verifier_root: PASS
    verifier_pytest: PASS (43 passed)
    ruff_gate: PASS
    pnpm_typecheck: PASS
    pnpm_lint: PASS
    pnpm_test: PASS (100 files, 1826 tests)
    pnpm_build: PASS
    actionlint_local: UNAVAILABLE
  CI_CHECK_RUN_SCOPED:
    workflow_run_id: 30203327555
    head_sha: "f2187d07da259bcd47e7259ad841b2b07c019131"
    required_checks: PASS
    actionlint: SUCCESS
    python_test: SUCCESS
    ci_verdict_summary: SUCCESS
  ALLOWED_PATHS_GATE_RESULT_V1:
    status: ok
    changed_paths:
      - .claude/skills/ci-test-performance/SKILL.md
      - .github/workflows/ci.yml
      - pyproject.toml
      - scripts/ci/tests/test_verify_ruff_configuration.py
      - scripts/ci/verify_ruff_configuration.py

CI verifierの実行順序、shell indirection、Ruff設定探索を契約どおりに検証する。
@squne121

Copy link
Copy Markdown
Owner Author

Current-head verification

TEST_VERDICT_MACHINE:
  schema: TEST_VERDICT_MACHINE/v2
  producer_kind: test-runner
  issue_number: 1764
  pr_number: 1784
  reviewed_head_sha: "778c0131c76be75c359d9ffa25e65d57a490be15"
  base_sha: "4d336ed9dc35e30c9e29426506a5b011c304686d"
  contract_snapshot_url: "https://github.com/squne121/loop-protocol/issues/1764#issuecomment-5083607296"
  contract_body_sha256: "sha256:dd147b8f6471487b43d3dc91b107d4ee97136eb82c417b7f65228abfe4b13b55"
  overall_result: PASS
  local_verification:
    verifier_root: PASS
    verifier_pytest: PASS (56 passed)
    ruff_gate: PASS
    pnpm_typecheck: PASS
    pnpm_lint: PASS
    pnpm_test: PASS (100 files, 1826 tests)
    pnpm_build: PASS
    actionlint_local: UNAVAILABLE
  CI_CHECK_RUN_SCOPED:
    workflow_run_id: 30204398030
    head_sha: "778c0131c76be75c359d9ffa25e65d57a490be15"
    required_checks: PASS
    actionlint: SUCCESS
    python_test: SUCCESS
    ci_verdict_summary: SUCCESS
  ALLOWED_PATHS_GATE_RESULT_V1:
    status: ok
    changed_paths:
      - .claude/skills/ci-test-performance/SKILL.md
      - .github/workflows/ci.yml
      - pyproject.toml
      - scripts/ci/tests/test_verify_ruff_configuration.py
      - scripts/ci/verify_ruff_configuration.py

@squne121

Copy link
Copy Markdown
Owner Author

Current-head verification

TEST_VERDICT_MACHINE:
  schema: TEST_VERDICT_MACHINE/v2
  producer_kind: test-runner
  issue_number: 1764
  pr_number: 1784
  reviewed_head_sha: "19a8c50bb941f61903d4431c95ada9227345e807"
  base_sha: "56a4f10db4086de72d3e67dbccc20e9f2ea05821"
  contract_snapshot_url: "https://github.com/squne121/loop-protocol/issues/1764#issuecomment-5083829175"
  contract_source_id: 5083829175
  contract_body_sha256: "sha256:dd147b8f6471487b43d3dc91b107d4ee97136eb82c417b7f65228abfe4b13b55"
  overall_result: PASS
  local_verification:
    verifier_root: PASS
    verifier_pytest: PASS (56 passed)
    ruff_gate: PASS
    pnpm_typecheck: PASS
    pnpm_lint: PASS
    pnpm_test: PASS (100 files, 1829 tests)
    pnpm_build: PASS
    actionlint_local: UNAVAILABLE
  CI_CHECK_RUN_SCOPED:
    workflow_run_id: 30205351181
    head_sha: "19a8c50bb941f61903d4431c95ada9227345e807"
    required_checks: PASS
    actionlint: SUCCESS
    python_test: SUCCESS
    ci_verdict_summary: SUCCESS
  ALLOWED_PATHS_GATE_RESULT_V1:
    status: ok
    changed_paths:
      - .claude/skills/ci-test-performance/SKILL.md
      - .github/workflows/ci.yml
      - pyproject.toml
      - scripts/ci/tests/test_verify_ruff_configuration.py
      - scripts/ci/verify_ruff_configuration.py

@squne121

Copy link
Copy Markdown
Owner Author

Current-head 独立レビュー結果

LOOP_VERDICT_V2:
  verdict: COMMENT
  approval_equivalent: true
  reviewed_head_sha: 19a8c50bb941f61903d4431c95ada9227345e807
  reviewed_base_sha: 56a4f10db4086de72d3e67dbccc20e9f2ea05821
  merge_ready: true
  required_auto_actions: []
  allowed_paths_gate: ok
  evidence:
    contract_snapshot: https://github.com/squne121/loop-protocol/issues/1764#issuecomment-5083829175
    test_verdict_machine: https://github.com/squne121/loop-protocol/pull/1784#issuecomment-5083834974
    ci_check_run_scoped: https://github.com/squne121/loop-protocol/actions/runs/30205351181
    ci_checks: passed_14_failed_0

current diff、Issue contract、machine test artifact、CI、PR本文を独立に照合しました。draft PR の GitHub review API は 422 で COMMENT event を受け付けないため、controlled PR conversation comment として記録します。merge は人間の最終判断に残します。

@squne121
squne121 marked this pull request as ready for review July 26, 2026 14:24
@squne121
squne121 merged commit 36be5ec into main Jul 26, 2026
23 checks passed
@squne121
squne121 deleted the worktree-issue-1764-ruff-config-ssot branch July 26, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

実装: Ruff設定をpyproject.tomlへ集約し対象path集合を維持する

1 participant