Repository navigation
Open
Labels
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "#131"
goal_ref: "catalog の positive / negative fixture を追加し、catalog validator と PR body validator の consumer pipeline を pytest で検証する"
change_kind: featureParent Issue
Parent Goal Ref
- Goal: schema governance の consumer pipeline を fixture で再現可能に検証する
- Desired Destination: catalog の正常・異常入力が validator pipeline を通して決定論的に判定される
Current Validated Scope
- 実装: schemas/catalog.yaml 作成と既存 16 schema の初期移行(#131 FU-1) #517 は catalog を導入済み、実装: validate_schema_catalog.py — catalog completeness / consumer consistency check(#131 FU-2) #518 は catalog loader / comparator と unit test を導入済み
schemas/examples/catalog.valid.yamlとschemas/examples/catalog.invalid-missing-consumer.yamlは未存在
Remaining Parent Gaps
- 実装: LP050 拡張 — PR body Schema Consumer Inventory vs catalog 照合(#131 FU-3) #519 が LP050 と catalog の統合を担当する
- GitHub Actions の required check 化は本 Issue の対象外
Outcome
schemas/examples/ の positive / negative catalog fixture と、catalog validator および PR body validator pipeline を通す pytest が追加され、正常入力は pass、consumer 欠落入力は fail-close として検証される。
Background
ADR 0003 の Pact 的検証方針に従い、unit helper だけでなく consumer pipeline を fixture で通す。
In Scope
- positive / negative catalog fixture を
schemas/examples/に追加する - fixture を
validate_schema_catalog.pyと validator pipeline の public entrypoint から検証する pytest を追加する - consumer 欠落を expected failure として確認する
Out of Scope
- catalog schema / loader / comparator の再設計
- LP050 の production integration(実装: LP050 拡張 — PR body Schema Consumer Inventory vs catalog 照合(#131 FU-3) #519)
- GitHub Actions workflow の変更
Acceptance Criteria
- AC1:
schemas/examples/catalog.valid.yamlが存在し validator pytest で pass する - AC2:
schemas/examples/catalog.invalid-missing-consumer.yamlが存在し consumer 欠落として fail-close を確認できる - AC3: fixture test が
validate_schema_catalog.pyと PR body validator pipeline の public entrypoint を通す
Runtime Verification Applicability
decision: not_applicable
applicable_acs: []
reason: "fixture と pytest により決定論的に検証する"Verification Commands
# AC1
$ uv run --locked pytest .claude/skills/open-pr/scripts/tests/test_validate_schema_catalog.py -q
# AC2
$ uv run --locked pytest .claude/skills/open-pr/scripts/tests/test_validate_schema_catalog.py -q
# AC3
$ uv run --locked pytest .claude/skills/open-pr/scripts/tests/test_validate_schema_catalog.py -qAllowed Paths
- schemas/examples/
- .claude/skills/open-pr/scripts/tests/test_validate_schema_catalog.py
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
Required Skills
- Python 3
- pytest
Required Design References
- docs/adr/0003-schema-catalog-adoption.md
- .claude/skills/open-pr/SKILL.md
Scope Delta(任意)
N/A
Delivery Rule(配信ルール)
- 1 Issue = 1 PR で完結する
- worktree:
.claude/worktrees/issue-520-schema-catalog-fixtures - Draft PR を既定とする
Notes for Reviewer(レビュアー向け補足)
- consumer pipeline の確認は 実装: LP050 拡張 — PR body Schema Consumer Inventory vs catalog 照合(#131 FU-3) #519 の production integration を前提にせず、利用可能な public validator entrypoint を通して行う
Activity
fix: overlap_readback_waiver 期限切れの決定を明文化する (#1518) (#1522)