Repository navigation
ci(#507): add check_input_command_schema.py to python-test job - #510
Conversation
Script was created during #461 contract review and excluded from PR #506. Added to version control ahead of CI integration in #507. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Add `uv run --locked python scripts/check_input_command_schema.py` step to the python-test CI job so that docs/product/game-logic.md InputCommand regressions are detected automatically. Also fix the script docstring to clarify it validates the documented token set rather than parsing src/input/InputMapper.ts. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
f4a61eb to
1282e2f
Compare
squne121
left a comment
There was a problem hiding this comment.
Verdict: REQUEST_CHANGES
Mergeability
- mergeable=MERGEABLE, mergeStateStatus=BLOCKED(CI checks in_progress: python-test, e2e)
Evidence Check
- AC coverage: AC1/AC2/AC3 は PR 本文に自己申告あり。AC4(CI green)は未確認(python-test in_progress)
- Allowed Paths:
.github/workflows/ci.ymlは Issue Allowed Paths 内。scripts/check_input_command_schema.pyは origin/main 非存在のため PR diff では ADDED(34 lines logic + 2 lines docstring 修正)として現れる — Issue の "docstring のみ修正可" との齟齬あり(詳細は Blockers 参照) - CI Verification: python-test / e2e が in_progress。TEST_VERDICT_MACHINE コメントなし。CI_CHECK_RUN_SCOPED 証跡なし。
- 検証コマンド結果: PR 本文に自己申告あり(PR_BODY_SELF_REPORT のみ)
Blockers
-
CI 証跡なし(pending):
mergeStateStatus=BLOCKED、python-test・e2e が in_progress。TEST_VERDICT_MACHINE コメントが存在しない。PR_BODY_SELF_REPORT のみでは APPROVE 不可(PR_BODY_SELF_REPORT_ONLY_APPROVE_PROHIBITED)。CI 完了後に再レビュー依頼。 -
Safety Claim Matrix 欠如:
.github/workflows/ci.ymlの変更は safety-sensitive path (.github/workflows/**) に該当する。PR 本文に## Safety Claim Matrixセクションが存在しない(APPROVE 禁止)。workflows の変更は最小限(1 step 追加)で安全性上の懸念は低いが、skill の判定ルール上必須。 -
Allowed Paths 逸脱の可能性: Issue #507 の Allowed Paths は
scripts/check_input_command_schema.pyについて "docstring のみ修正可" と定義している。しかし origin/main には同ファイルが存在しないため、PR diff では 34 lines のロジックを含む新規ファイルとして現れる。Issue background では "commit 9463f37 にて main に追加済み" と説明しているが、当該コミットは origin/main に未マージ。PR が chore commit37ce8a3を取り込んでいるのはその workaround と見られるが、Allowed Paths 定義との整合性が未確認。chore commit が origin/main にマージ済みか、または PR 本文で経緯の説明と Allowed Paths からの明示的な除外・注記が必要。
Non-blockers
- なし
LOOP_VERDICT
verdict: REQUEST_CHANGES
confidence: high
blockers:
- ci_pending_no_test_verdict_machine
- safety_claim_matrix_missing
- allowed_paths_ambiguity_script_added_not_docstring_only
warnings: []
mergeable: MERGEABLE
mergeStateStatus: BLOCKED
reviewed_head_sha: 1282e2ff2d0ae37b91a280c23c9d7cb4c605caac
recommendations: []
follow_up_issue_requests: []
squne121
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Mergeability
- mergeable=MERGEABLE, mergeStateStatus=CLEAN
Evidence Check
- AC coverage: AC1 PASS(python-test job step 9 "Check InputCommand docs schema" が CI run 26680175257 で conclusion=success)、AC2 PASS(docstring に "does not parse src/input/InputMapper.ts" を明示)、AC3 PASS(CI run で exit 0 確認、runtime_only)、AC4 PASS(CI run 26680175257 python-test job conclusion=success、head_sha=1282e2ff2d0ae37b91a280c23c9d7cb4c605caac 一致)
- Allowed Paths: 遵守(.github/workflows/ci.yml、scripts/check_input_command_schema.py の 2 ファイルのみ。scripts/ の新規追加は Issue 本文で origin/main 未存在のため新規追加として扱う旨を説明済み)
- CI Verification: CI_CHECK_RUN_SCOPED 条件を満たす。run 26680175257 / workflow=ci / job=python-test / step 9 "Check InputCommand docs schema" / conclusion=success / head_sha=1282e2ff2d0ae37b91a280c23c9d7cb4c605caac(PR head SHA と一致)。TEST_VERDICT_MACHINE コメントなし(#88 pending 状態)だが CI_CHECK_RUN_SCOPED が全条件を満たすため補助証跡として有効
- Schema Change Applicability: CI yaml と docstring のみ変更。consumer 境界をまたぐ contract 変更なし(not_schema_change)
- Safety Claim Gate: .github/workflows/ci.yml 変更を含むため safety-sensitive。PR 本文に Safety Claim Matrix セクションが存在し、両変更について bounded claim が記載されている。Not controlled 列は非空だが無限定の "safe" 主張なし(行レベルで根拠付き)
Blockers
- なし
Non-blockers
- なし
LOOP_VERDICT
verdict: APPROVE
confidence: high
blockers: []
warnings: []
mergeable: MERGEABLE
mergeStateStatus: CLEAN
reviewed_head_sha: 1282e2ff2d0ae37b91a280c23c9d7cb4c605caac
recommendations: []
follow_up_issue_requests: []
Verdict: REQUEST_CHANGESこのPRは そのままマージ不可。理由は「CIステップ追加」自体ではなく、PR #510 が前提にしている docs 修正が main に入っていない可能性が高いためです。 BlockersB1. PR #510 は #506 / #461 の成果に依存しているが、main 側ではまだ drift が残っているIssue #507 は、 しかし PR #510 の Files changed は 現時点で raw つまり、PR #510 を単体で main に入れると、追加された CI が main の既存 docs に対して即 fail する構造に見えます。PR #510 のCIが green なのは、PR head 側では 修正要求:
このまま「CI green だからOK」と判断するのは危険です。 B2. Issue #507 の Allowed Paths と実差分の説明がまだ弱いIssue #507 の Allowed Paths では、 しかし PR #510 の first commit は これは実務上は理解できますが、契約レビューとしては “docstring のみ” ではない。PR本文の説明だけでなく、Issue #507 側に「origin/main に存在しないため、既レビュー済みスクリプトの新規追跡を許容する」と明記しないと、Allowed Paths の意味が崩れます。 修正要求:
B3. GitHub UI が hidden / bidirectional Unicode 警告を出しているPR files view で、変更ファイルに対して “hidden or bidirectional Unicode text” 警告が表示されています。少なくとも CI workflow と実行スクリプトは safety-sensitive です。GitHub Actions では ただし、hidden / bidi 警告が出ている状態で workflow / script を通すのはレビュー上許容しにくいです。見た目と実際の解釈がズレる余地があるためです。 修正要求:
Non-blockers / quality issuesN1.
|
Response to REQUEST_CHANGESB1 について: main の docs は既に更新済みご指摘ありがとうございます。調査の結果、B1 の前提は現在の状況と相違があります。
```bash 出力: type: 'move'; axisX ... / type: 'aim' ... / type: 'fire'``` 古い token(MoveIntent/AimIntent/FireIntent 等)は main に残っていません:
B2 について: Allowed Paths と実差分の乖離 → Issue に scope amendment を追加Issue #507 の Allowed Paths「docstring のみ修正可」は、スクリプトが Issue #507 に scope amendment コメントを追加します。 B3 について: Unicode 調査結果対象ファイルの双方向 Unicode control / zero-width 文字を検査しました。 ```python python3 で unicodedata.bidirectional を全文字に対してチェック結果: .github/workflows/ci.yml: 0 suspicious charsscripts/check_input_command_schema.py: 0 suspicious chars``` 意図しない bidi control 文字・zero-width 文字は含まれていません。GitHub UI の警告は誤検出または別の原因と考えられます。 N1/N2 の修正(非ブロッカー)N1( |
…ommand_schema.py
N1: read_text() now uses encoding="utf-8" explicitly.
N2: Regex is now anchored to ## 入力 / Input section to avoid picking up
TypeScript blocks from later sections.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
squne121
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Mergeability
- mergeable=MERGEABLE, mergeStateStatus=BEHIND
- BEHIND is not a blocker per SKILL.md. Routing signal:
update_branch.
Evidence Check
- AC coverage: All 4 ACs satisfied.
- AC1: ci.yml diff shows
uv run --locked python scripts/check_input_command_schema.pystep added to python-test job. CI step "Check InputCommand docs schema" ran and passed. - AC2 (pr_review_only): docstring reads "It does not parse src/input/InputMapper.ts." — no misrepresentation.
- AC3 (runtime_only): CI "Check InputCommand docs schema" step conclusion=success on head SHA bd725ff.
- AC4 (runtime_only): python-test job conclusion=success in CI run 26680952389 on same head SHA.
- AC1: ci.yml diff shows
- Allowed Paths: Changed files are
.github/workflows/ci.ymlandscripts/check_input_command_schema.py. Both are in Allowed Paths. Scope amendment comment (#507 (comment)) authorizes new-file addition for the script. - CI Verification (CI_CHECK_RUN_SCOPED): CI run 26680952389, head SHA bd725ff matches PR headRefOid. All jobs pass. python-test job step "Check InputCommand docs schema" conclusion=success. CI_CHECK_RUN_SCOPED conditions satisfied.
- Scope: No extra files changed.
- Safety Claim Gate:
.github/workflows/ci.ymltriggers safety-sensitive check. PR has a Safety Claim Matrix with bounded claims ("read-only step", "file write なし"). No overclaim detected. - Schema Change Applicability: not_schema_change. Changes are ci.yml step addition and Python script — no consumer-boundary schema contract touched.
Blockers
なし
Non-blockers
なし
LOOP_VERDICT
verdict: APPROVE
confidence: high
blockers: []
warnings: []
mergeable: MERGEABLE
mergeStateStatus: BEHIND
reviewed_head_sha: bd725ff51b7753395bd3b43de2d270fd4df9293b
recommendations: [update_branch]
follow_up_issue_requests: []
Summary
.github/workflows/ci.ymlのpython-testjob にscripts/check_input_command_schema.py実行ステップを追加scripts/check_input_command_schema.pyの docstring を修正(src/input/InputMapper.tsを parse しているように誤解させない表現に)スクリプトファイルについて
scripts/check_input_command_schema.pyは PR #506 で実装されたが、origin/mainには未マージのため本 PR で新規追加として含まれる。ロジックは PR #506 での実装と同一(docstring のみ修正)。Issue #507 の Allowed Paths で「docstring のみ修正可」と記載されていたが、ファイルがorigin/main未存在のため新規追加として扱う必要があった。Closes #507
Safety Claim Matrix
.github/workflows/ci.ymlへの step 追加python-testjob に既存スクリプトを実行する read-only ステップを追加するのみ。失敗時は非 0 exit で CI が fail する(意図通り)。continue-on-error: trueなしscripts/check_input_command_schema.pydocs/product/game-logic.mdを読んで token を確認する read-only スクリプト。ファイル書き込みなし。sys.exitのみ使用Contract Snapshot
#507 (comment)
Verification Results
AC4(CI green)は PR マージ後の CI run で確認。
🤖 Generated with Claude Code