Skip to content

実装: python-test-plan に edit-issue tests directory coverage を追加する #1303

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "#1287"
goal_ref: "PR #1301 の ci_test_selection/v1 uncovered changed test blocker を解消するため、python-test-plan が edit-issue tests directory 全体を python-test lane coverage として扱う状態にする"
change_kind: workflow
dependency_policy:
  unblocks_pr: "#1301"

Parent Issue

#1287

Parent Goal Ref

Current Validated Scope

  • .github/ci/python-test-plan.json の python-test targets を更新し、.claude/skills/edit-issue/tests/ ディレクトリ全体を python-test lane の coverage として扱う
  • 既存の個別 target .claude/skills/edit-issue/tests/test_guard_issue_body.py と .claude/skills/edit-issue/tests/test_issue_contract_hygiene_autofix.py は、同じディレクトリ target との重複実行を避ける形へ整理する
  • PR feat: add edit-issue transaction helper (#1287) #1301 head d1fbd5df17e3659ffef115eaad015565499334b7 で発生した ci_test_selection/v1 の Uncovered tests: 1 blocker を解消するための CI lane 設定だけを扱う

Remaining Parent Gaps

Outcome

.github/ci/python-test-plan.json が .claude/skills/edit-issue/tests/ 全体を python-test lane coverage として含み、PR #1301 の .claude/skills/edit-issue/tests/test_edit_issue_txn.py 追加が ci_test_selection/v1 で uncovered changed test にならない状態。

Background

PR #1301 は Issue #1287 の実装 PR で、最新 head d1fbd5df17e3659ffef115eaad015565499334b7 では Issue #1287 の Verification Commands が 9/9 PASS している。一方、required CI の python-test は ci_test_selection/v1 artifact generation で Collected nodeids: 6220, Changed tests: 1, Uncovered tests: 1 を出し、.claude/skills/edit-issue/tests/test_edit_issue_txn.py を uncovered changed test として fail している。node-backed-hook-tests でも同じ changed test が uncovered として検出されている。

現行 .github/ci/python-test-plan.json は .claude/skills/edit-issue/tests/test_guard_issue_body.py と .claude/skills/edit-issue/tests/test_issue_contract_hygiene_autofix.py を個別 target として持つが、edit-issue tests ディレクトリ全体は target に含んでいない。そのため PR #1301 で新規追加された test_edit_issue_txn.py が python-test lane coverage から漏れている。

決定論的修正として、python-test-plan の target を .claude/skills/edit-issue/tests/ に寄せる。workflow の workaround、PR #1301 側のテスト削除、ci_test_selection gate の緩和は採用しない。

In Scope

  • .github/ci/python-test-plan.json の targets を更新し、.claude/skills/edit-issue/tests/ を python-test lane に含める
  • 同じディレクトリ内の個別 target が重複する場合は削除または置換し、pytest target set と ci_test_selection/v1 artifact の整合を保つ
  • notes の説明が個別 target 前提で古い場合は、同じ JSON 内で必要最小限に更新する

Out of Scope

  • .github/workflows/ci.yml の変更
  • .claude/skills/pr-review-judge/scripts/generate_ci_test_selection_artifact.py の変更
  • PR feat: add edit-issue transaction helper (#1287) #1301 の implementation diff 変更
  • node-backed hook tests の対象 nodeid 変更
  • ci_test_selection/v1 の fail-closed policy 緩和
  • pytest-xdist worker 数や scheduler の変更

Acceptance Criteria

  • AC1: .github/ci/python-test-plan.json の targets に .claude/skills/edit-issue/tests/ が含まれている
  • AC2: .github/ci/python-test-plan.json で .claude/skills/edit-issue/tests/test_guard_issue_body.py と .claude/skills/edit-issue/tests/test_issue_contract_hygiene_autofix.py がディレクトリ target と重複していない
  • AC3: python-test plan loader が parallel run argv を生成でき、.claude/skills/edit-issue/tests/ を argv に含める
  • AC4: PR feat: add edit-issue transaction helper (#1287) #1301 相当の changed test .claude/skills/edit-issue/tests/test_edit_issue_txn.py が ci_test_selection/v1 generator で uncovered changed test にならない
  • AC5: ci_test_selection/v1 の fail-closed policy と node-backed hook split policy は緩和されていない

Verification Commands

# AC1
$ uv run --locked pytest scripts/ci/tests -k python_test_plan
# AC2
$ rg -n '"\.claude/skills/edit-issue/tests/",' .github/ci/python-test-plan.json
# AC3
$ uv run --locked pytest .claude/skills/pr-review-judge/scripts/tests -k ci_test_selection
# AC4
$ uv run --locked pytest .claude/skills/pr-review-judge/tests/test_generate_ci_test_selection_artifact.py
# AC5
$ uv run --locked pytest .claude/skills/pr-review-judge/scripts/tests .claude/skills/pr-review-judge/tests

Allowed Paths

  • .github/ci/python-test-plan.json

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
  • .github/workflows/ci.yml の変更が必要になった場合
  • generate_ci_test_selection_artifact.py の policy 緩和が必要になった場合
  • PR feat: add edit-issue transaction helper (#1287) #1301 側の implementation test を削除または移動する必要が判明した場合

Required Skills

なし

Scope Delta(任意)

source decision
PR #1301 LOOP_VERDICT_V2 required CI の python-test / node-backed-hook-tests が ci_test_selection/v1 uncovered changed test で fail したため、#1287 Allowed Paths 外の CI plan 修正として分割
.github/ci/python-test-plan.json workflow ではなく python-test-plan SSOT を変更する

Delivery Rule

Runtime Verification Applicability

runtime_verification:
  decision: not_applicable
  required: false
  reason: "本 Issue は CI lane plan の静的 JSON 設定と pytest/generator による artifact consistency 検証で完結し、browser/UI/runtime smoke を要求しない"
  applicable_acs: []
  deferred_destination: null
  artifact_requirements: []

Notes for Reviewer

Activity

  1. added
    phase/implementation
    agent/implementer
    enhancement
    triage-required
    on Jul 3, 2026
  2. squne121 commented on Jul 3, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-07-03T16:18:53Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/1303
      body_sha256: "sha256:577fab94305e2e73f18edd114e3e2156714bef7e94eb38cb6bb7a2cfb212ceb9"
      checks:
        readiness: go
        blockers: pass
        product_spec: pass
        vc_preflight: pass
      source: ensure_contract_snapshot_auto
  3. squne121 commented on Jul 3, 2026

    @squne121
    OwnerAuthor

    impl-review-loop: 完了 (2026-07-03T16:41:00Z)

    IMPL_REVIEW_LOOP_RESULT_V1:
      schema_version: 1
      status: draft_pr_ready
      draft_pr_ready: true
      github_merge_ready: false
      github_merge_state_status: CLEAN
      pr_url: "https://github.com/squne121/loop-protocol/pull/1307"
      head_sha: "052b955243b6e0529132f428a7c73746921ac5b5"
      issue_number: 1303
      human_next_action: mark_ready_for_review_or_merge
      required_auto_actions: []
    
    FOLLOW_UP_MATERIALIZATION_RESULT_V1:
      schema_version: 1
      materialized_by: impl-review-loop
      follow_up_issues: []
      note_only_observations:
        - dedupe_key: "1303-edit-issue-tests-directory-regression-test"
          source_url: "https://github.com/squne121/loop-protocol/pull/1307#issuecomment-4878072676"
          source_note_id: "non_blocker_1"
          summary: "edit-issue/tests directory coverage の恒久回帰テスト(2件)は Issue #1303 Allowed Paths 外のため本 PR では追加していない。後続 Issue 化は任意判断とする。"
        - dedupe_key: "1303-edit-issue-tests-lane-policy-doc"
          source_url: "https://github.com/squne121/loop-protocol/pull/1307#issuecomment-4878072676"
          source_note_id: "non_blocker_2"
          summary: ".claude/skills/edit-issue/tests/ 配下は pure pytest / hermetic unit test のみという運用を明文化する提案。任意の follow-up。"
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/implementationtriage-required

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions