Skip to content

実装: baseline-expect annotation の pytest テストを CI required ジョブに追加し regression gate 化する #901

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "889"
goal_ref: "PR #893 で追加した annotation 関連テスト(test_baseline_vc_preflight.py / test_contract_readiness.py / test_repair_issue_contract.py)を CI required gate として明示的に位置付け、annotation grammar の退行を自動検出できるようにする"
change_kind: config_and_docs
dedupe_key: "follow-up:squne121/loop-protocol:pr/893:ci-annotation-gate"

Parent Issue

Issue #889(baseline-expect VC annotation と deterministic repair pass で issue-refinement-loop 反復失敗を防ぐ)

Parent Goal Ref

  • Goal: baseline-expect annotation grammar の退行防止
  • Desired Destination: annotation 関連テストが CI required ジョブで常時実行される状態

Background

PR #893(Issue #889 の実装)は以下の annotation 関連テストを追加した:

  • .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.py
  • .claude/skills/issue-contract-review/scripts/tests/test_contract_readiness.py
  • .claude/skills/issue-refinement-loop/scripts/tests/test_repair_issue_contract.py

これらは python-test CI ジョブのディレクトリ走査に含まれており、python-test はブランチ保護の required check として設定済みである(required_status_checks.contexts に python-test が存在することを確認済み)。

ただし Issue #889 の Remaining Parent Gaps として「CI での regression gate 化は follow-up Issue 化」と明記されており、以下が未対応である:

  1. ci_test_selection artifact の pytest_args に annotation テストが明示的にリストされていない(ディレクトリ走査に含まれているが artifact 設計上の可視性が低い)
  2. docs/dev/ci-operations.md が存在せず、annotation test gate の位置付けが文書化されていない

Current Validated Scope

  • .github/workflows/ci.yml の python-test ジョブに annotation テスト(test_baseline_vc_preflight.py / test_contract_readiness.py / test_repair_issue_contract.py)が CI の走査対象に含まれていることを確認し、不足があれば明示的な pytest 呼び出し行を追加する
  • docs/dev/ci-operations.md を新規作成し、required / advisory / evidence ジョブの区分と annotation test gate の位置付けを記載する(Issue 実装: CI 運用設計を docs/dev/ci-operations.md で定義し required / advisory / evidence の責務を分離する #894 の成果物に annotation gate を明示するセクションを含める)
  • ci_test_selection artifact 生成スクリプトの pytest_args リストに annotation テストパスが含まれているか確認し、不足があれば追記する

Out of Scope

Acceptance Criteria

  • AC1: python-test が GitHub branch protection の required check に含まれている(現状確認、または修正)
  • AC2: ci.yml の python-test ジョブが test_baseline_vc_preflight.py / test_contract_readiness.py / test_repair_issue_contract.py を走査する
  • AC3: docs/dev/ci-operations.md が存在し、annotation test gate の位置付けが明記されている
  • AC4: annotation テスト 3 ファイルすべてが CI で pass する(ローカル uv run pytest で確認)

Verification Commands

# AC1: python-test が required check に含まれているか確認
# baseline-expect: pass
$ gh api repos/squne121/loop-protocol/branches/main --jq '.protection.required_status_checks.contexts[]' | rg "python-test"
# AC2: ci.yml に annotation テストのディレクトリが含まれているか確認
# baseline-expect: pass
$ rg "issue-contract-review/scripts/tests\|issue-refinement-loop/scripts/tests\|issue-refinement-loop/tests" .github/workflows/ci.yml
# AC3: ci-operations.md の存在確認
# baseline-expect: fail
$ test -f docs/dev/ci-operations.md
# AC4: annotation テストのローカル実行
# baseline-expect: fail
$ uv run pytest .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.py .claude/skills/issue-contract-review/scripts/tests/test_contract_readiness.py .claude/skills/issue-refinement-loop/scripts/tests/test_repair_issue_contract.py -q

Runtime Verification Applicability

rva:
  status: deferred
  reason: "ci-operations.md 作成と ci.yml 修正は実装後 CI 実行を待つ必要がある"
  deferred_trigger: "PR が main にマージされ CI が green になった時点"

Source

Allowed Paths

  • .github/workflows/ci.yml
  • .claude/skills/pr-review-judge/scripts/generate_ci_test_selection_artifact.py
  • scripts/ci/python_test_plan.py
  • docs/dev/ci-operations.md

Activity

  1. added
    enhancement
    phase/implementation
    on Jun 14, 2026
  2. squne121 commented on Jun 19, 2026

    @squne121
    OwnerAuthor

    Issue #900 の PR #1004 評価で、python-test の新規失敗を確認しました。失敗は edit-issue スキル側の C4/C9/hygiene 回帰で、 と が新規に該当しています。

    本件の follow-up として同 PR から除外可能か確認お願いします。

  3. squne121 commented on Jun 19, 2026

    @squne121
    OwnerAuthor

    Issue #900 の PR #1004 のレビューで発生した CI 失敗を追記します。

    • run: 27828507380
    • failed job: python-test (82358988274)
    • 失敗 9 件は edit-issue 側に集約:
      • test_issue_contract_hygiene_autofix.py
      • test_guard_issue_body.py

    原因候補として、C4/C5 の回帰と LP010/LP011 の整合不一致が疑われます。必要に応じて PR #1004 から除外可能かも合わせて確認ください。

  4. squne121 commented on Jul 18, 2026

    @squne121
    OwnerAuthor

    #1562 overlap preflight の整理としてユーザー指示によりクローズ

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

    enhancementphase/implementation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions