Skip to content

実装: python-test-planをstrict schema化し期限付きquarantine契約を導入する #1761

Closed as not planned

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "python-test plan の全フィールドを fail-closed で検証し、テスト除外を owner・Issue・期限付き quarantine として統治する"
change_kind: schema-and-tooling

Parent Issue

none(#1059 の child にはしない。related: #1059, #1064)

Parent Goal Ref

N/A(親 Issue なし。#1059 は completed で close 済み)

Current Validated Scope

  • 現行 loader が厳格に扱うのは主に targets / ignore / deselect / parallel_exclude / xdist である。
  • secondary_coverage 等の後付けフィールドは同じ強度で検証されていない。
  • raw な deselect には Issue・owner・期限がない。

Remaining Parent Gaps

なし(本 Issue は独立 follow-up。#1059 の Closure には影響しない)

Outcome

python_test_plan/v2 が JSON Schema で定義され、未知キー・型不一致・不正 path・不正 marker を拒否するようになり、raw な恒久 deselect が Issue・owner・reason・導入日・期限・解除条件を持つ構造化 quarantine へ移行した状態になる。

In Scope

  • .github/ci/python-test-plan.schema.json の追加
  • .github/ci/python-test-plan.json の v2 移行
  • scripts/ci/python_test_plan.py の全フィールド検証対応
  • quarantine expiry/nodeid/path 検証
  • generator consumer の v2 対応
  • positive/negative fixture と回帰テスト
  • policy docs 更新

Out of Scope

  • quarantine 対象テスト本体の修正
  • provider job artifact との実行証跡照合
  • 全 test file inventory の一意分類

Acceptance Criteria

  • AC1: schema が additionalProperties: false である
  • AC2: plan の全 top-level field が required または明示的 optional として定義される
  • AC3: secondary_coverage と runtime_verification_only_markers の構造エラーが常に fatal になる
  • AC4: quarantine は Issue・owner・reason_code・introduced_at・expires_at・removal_condition を必須とする
  • AC5: 期限切れ・重複・存在しない nodeid・target scope 外 nodeid を拒否する
  • AC6: unknown property を changed test の有無に関係なく拒否する
  • AC7: technical collection boundary 用の ignore と、失敗 test 隔離用 quarantine が区別される
  • AC8: 既存 plan が意味を変えず v2 へ移行される
  • AC9: loader・workflow・artifact generator が同じ validated plan object を消費する
  • AC10: negative fixture が各 fail-close 経路を検証する

Verification Commands

# AC1
$ test -f .github/ci/python-test-plan.schema.json
# AC2
$ rg -n "additionalProperties" .github/ci/python-test-plan.schema.json
# AC3
$ rg -n "secondary_coverage" scripts/ci/python_test_plan.py
# AC4
$ rg -n "expires_at" .github/ci/python-test-plan.schema.json
# AC5
$ test -f scripts/ci/tests/test_python_test_plan_quarantine.py
# AC6
$ rg -n "unknown" scripts/ci/python_test_plan.py
# AC7
$ rg -n "quarantine" .github/ci/python-test-plan.schema.json
# AC8
$ pnpm build
# AC9
$ rg -n "python_test_plan" .claude/skills/pr-review-judge/scripts/generate_ci_test_selection_artifact.py
# AC10
$ test -f scripts/ci/tests/test_python_test_plan_negative.py

Allowed Paths

  • .github/ci/python-test-plan.json
  • .github/ci/python-test-plan.schema.json
  • scripts/ci/python_test_plan.py
  • scripts/ci/tests/
  • .claude/skills/pr-review-judge/scripts/generate_ci_test_selection_artifact.py
  • .claude/skills/pr-review-judge/scripts/tests/
  • docs/dev/test-lane-policy.md
  • .claude/skills/ci-test-performance/SKILL.md

Stop Conditions

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

Required Skills

なし

Required Design References

なし

Scope Delta(任意)

N/A

Notes for Reviewer

Activity

  1. added
    enhancement
    phase/implementation
    agent/implementer
    on Jul 25, 2026
  2. squne121 commented on Aug 12, 2026

    @squne121
    OwnerAuthor

    Disposition: CLOSED / not_planned

    #1782 の敵対的レビュー(https://github.com/squne121/loop-protocol/issues/1782#issuecomment-5266277591)に基づき close する。

    根拠:

    • 導入: AIエージェント運用をminimal harnessへ縮退し、過剰なcontrol-planeを廃止する #1860 の Owner Decision(個人趣味開発では live Issue/PR・実 diff・実 test・current-head CI・独立 review を authority とし、新しい graph policy / packet schema / ledger / digest / checker / enforcing hook を増やさない)と、本 Issue が提案する「全 field strict schema 化 + unknown-key fatal + owner/Issue/期限/removal condition 必須の quarantine 契約」は方向性が逆行する。
    • hobby repo の統治コストに対して、既存 loader の緩さを是正する具体的な real defect(実際に見逃された false-green 等)は本 Issue 本文に示されていない。
    • 独立確認: 本 Issue に closedByPullRequestsReferences なし・依存する後続実装なし。close しても他 Issue のブロッキングは発生しない。

    具体的な real defect が将来観測された場合は、その instance を直接直す新規 Issue として起票することを推奨する(#1725 と同様のスポットフィックス方針)。

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