Repository navigation
feat(#542): MVP sortie を敵機全滅勝利・30秒終了に変更する - #552
Conversation
- SORTIE_DURATION_MS を 120_000 → 30_000 に変更 - victory 条件を allEnemiesDefeated(enemies.length > 0 ガード含む)に変更 - timer 到達(30秒)を defeat 扱いに変更 - 優先順位 defeat > victory > timeout を実装と JSDoc で明文化 - unit test に AC7–AC12 全終了条件・優先順位・durationMs 検証を追加 - E2E short-sortie fixture テストを timeout→defeat に更新 - docs/product/features/sortie.md の正本を新しい終了条件に更新 - docs/playtest/m2-combat-mvp.md の Manual Checklist を 30秒タイムアウト反映に更新 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
Evidence Check
-
AC coverage: 全 AC カバー済み。AC1/AC3/AC4: VC コマンド結果が PR 本文に記載。AC7–AC12:
pnpm test281 tests pass(CI 確認)。AC14: typecheck/lint/test/build 全 pass(CI 確認)。AC2/AC5/AC6/AC13: 直接 VC コマンドの明示はないが、AC1 の rg 結果・unit test・pnpm test CI pass で間接カバー済み。Runtime Verification decision=immediate の証跡として CI_CHECK_RUN_SCOPED を採用(head SHA 一致・conclusion=success)。 -
Allowed Paths 遵守:
gh pr diff --name-onlyの全 5 ファイルが linked issue の Allowed Paths 内(docs/playtest/m2-combat-mvp.md / docs/product/features/sortie.md / src/systems/SortieSystem.ts / tests/sortie-system.test.ts / tests/e2e/m2-combat-mvp.spec.ts)。src/state/GameState.tsは変更なし(任意パスのため問題なし)。 -
CI Verification: run 26754486370(workflow=ci, head_sha=32979218c4cbaaee00f021e36b5eebda0ca55cf6)— build/lint/typecheck/test/e2e/python-test/validate-generated-artifact 全 7 jobs conclusion=success。CI_CHECK_RUN_SCOPED 条件(head SHA 一致・conclusion=success・skipped/neutral なし)を満たす。TEST_VERDICT_MACHINE コメントは #88 pending のため未投稿(CI_CHECK_RUN_SCOPED による補助証跡で代替)。
-
検証コマンド結果: PR 本文
## Verification Commands Resultsに issue contract 記載の全 VC コマンド出力が記録されている(rg 3 件 + pnpm 4 コマンド)。
Schema/Safety Gate
- Schema Change Applicability:
not_schema_change(SortieResult 型 shape 変更なし)。Schema Consumer Inventory: N/A。 - Safety Claim Matrix: N/A(ゲームロジック state machine 変更のみ。安全境界・権限・MCP 非該当)。
Blockers
なし
Non-blockers(任意改善)
- AC2(120秒記述が残っていないこと)と AC13(playtest checklist 更新)に対応する明示的な rg コマンドを VC に追加すると将来のレビューが楽になる(note_only)。
LOOP_VERDICT
verdict: APPROVE
blockers: []
mergeable: MERGEABLE
mergeStateStatus: BEHIND
reviewed_head_sha: 32979218c4cbaaee00f021e36b5eebda0ca55cf6
recommendations: [update_branch]
follow_up_issue_requests:
- title: "AC2/AC13 向け明示 VC コマンドを issue contract に追加する"
issue_kind: implementation
severity: note_only
source:
kind: pr_review
url: "https://github.com/squne121/loop-protocol/pull/552"
note_id: "1"
dedupe_key: "follow-up:squne121/loop-protocol:pr/552:1"
desired_destination: "AC2(120秒記述除去確認)・AC13(playtest checklist 更新確認)に対応する rg コマンドが VC に追加され、次回 PR レビューで明示証跡が得られる状態"
validated_scope_delta: "docs/product/features/sortie.md および docs/playtest/m2-combat-mvp.md に対する rg 検証コマンドを issue contract template に追記"
origin_skill: pr-review-judge
labels:
- triage-required
Verdict: REQUEST CHANGESPR #552 は そのまま merge 不可です。Issue #542 の主目的である「30秒・敵機全滅 victory・timer 到達 defeat」への変更自体は方向性として妥当ですが、E2E / playtest 証跡 / SortieResult semantics が旧仕様と衝突しています。 なお、こちらの実行環境から GitHub の 主要な確認事項Issue #542 は、MVP 戦闘時間を
固定 timestep による Blocker 1: short-sortie fixture が旧 victory 前提のまま残っているPR #552 は short-sortie fixture を「0.5秒で timeout→defeat」に変更しています。E2E 内にも しかし同じ E2E ファイルには、まだ さらに 修正方針:
Playwright は auto-retrying assertions と Blocker 2: timeout defeat で
|
- timeout defeat(30秒タイムアウト)で playerHpRemaining が 0 に捏造されるバグを修正 isDefeat(player.hp <= 0 の HP 判定のみ)を使い timeout defeat では HP snapshot を保持 - docs/product/features/sortie.md の SortieResult invariant を HP defeat / timeout defeat に分離 - unit test に timeout defeat playerHpRemaining snapshot 検証を追加 - docs/playtest/m2-combat-mvp.md: tested_commit 更新、stale note 修正、test_vitest count 更新 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
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=CLEAN
Evidence Check
AC coverage:
- AC1:
rg "30_000" docs/product/features/sortie.md— 出力あり (複数マッチ) ✅ - AC2:
rg "120_000|120秒生存" docs/product/features/sortie.md— no output ✅ - AC3:
rg "30_000" src/systems/SortieSystem.ts—SORTIE_DURATION_MS = 30_000✅ - AC4:
rg "allEnemiesDefeated"+rg "enemies\.length"— 両方マッチ ✅ - AC5: SortieSystem.ts line 43
timeout: ... treated as defeat、line 77outcome = isDefeat ? 'defeat' : isVictory ? 'victory' : 'defeat'✅ - AC6: line 39-43 JSDoc + line 66 inline comment
Priority: defeat > victory > timeout✅ - AC7-AC12: sortie-system.test.ts に AC7/AC8/AC9/AC10/AC11/AC12 タグ付きテスト全確認 ✅
- AC13:
rg "30秒|timeout defeat" docs/playtest/m2-combat-mvp.md— 複数マッチ ✅ - AC14: CI test/typecheck/lint/build 全 pass ✅
Allowed Paths 遵守: 変更ファイル5件すべて Allowed Paths 内 ✅
docs/playtest/m2-combat-mvp.mddocs/product/features/sortie.mdsrc/systems/SortieSystem.tstests/e2e/m2-combat-mvp.spec.tstests/sortie-system.test.ts
CI Verification (CI_CHECK_RUN_SCOPED):
- run_id: 26755893934, head_sha:
f81ad633578d0aee0359f39889a111ead1ab1012= PR head SHA ✅ - build: success / typecheck: success / test: success / python-test: success / lint: success / e2e: success
- 全6ジョブ conclusion=success(skipped/neutral/cancelled なし)✅
検証コマンド結果: PR 本文 ## Verification Commands Results に AC1-AC4, AC13-AC14 の rg 出力あり ✅
前回 Blocker 解消確認:
- Blocker 1/3 (
__E2E_SHORT_SORTIE__victory 期待): HUD/Canvas E2E テスト2件を timeout defeat に変換済み ✅ - Blocker 2 (
playerHpRemaining=0捏造): SortieSystem.ts line 86-88 でisDefeat = player.hp <= 0のみに修正、line 298 テストでtimeout defeat: playerHpRemaining is HP snapshot, not 0を確認 ✅ - Blocker 3 (playtest stale 証跡):
tested_commit更新・test 名修正・test_vitest 301件に整合 ✅ - Blocker 4 (Victory HUD E2E): follow-up fixture として PR Notes に明示 ✅
Schema Change Applicability: not_schema_change — SortieResult 型 shape 変更なし、根拠が diff と一致 ✅
Safety Claim Matrix: N/A — ゲームロジック state machine 変更のみ、safety-sensitive path に非該当 ✅
Blockers
なし
Non-blockers(任意改善)
- Victory HUD display / Canvas overlay の E2E deterministic fixture が未整備のため、PR Notes が指摘する follow-up Issue の起票を推奨。
LOOP_VERDICT
verdict: APPROVE
blockers: []
mergeable: MERGEABLE
mergeStateStatus: CLEAN
reviewed_head_sha: f81ad633578d0aee0359f39889a111ead1ab1012
recommendations: []
follow_up_issue_requests:
- title: "Victory HUD / Canvas overlay の E2E deterministic fixture を整備する"
issue_kind: implementation
severity: optional_follow_up
source:
kind: pr_body
url: "https://github.com/squne121/loop-protocol/pull/552"
note_id: "1"
dedupe_key: "follow-up:squne121/loop-protocol:https://github.com/squne121/loop-protocol/pull/552:1"
desired_destination: "__E2E_SHORT_SORTIE__ fixture で Victory HUD / Canvas overlay を決定論的に検証できる"
validated_scope_delta: "tests/e2e/ に Victory HUD/overlay を検証する E2E fixture を追加する(#541 視覚実装が前提)"
origin_skill: pr-review-judge
labels:
- triage-required
Summary
SORTIE_DURATION_MSを120_000→30_000に変更(anchor comment #4586254809 の人間判断に基づく)allEnemiesDefeated(enemies.length > 0 && every(e => e.defeated))に変更playerHpRemainingが 0 に捏造されるバグを修正(isDefeat= HP 判定のみ使用)__E2E_SHORT_SORTIE__fixture で victory を期待していた HUD/Canvas E2E テストを timeout defeat に更新docs/product/features/sortie.mdの正本を新しい終了条件・SortieResult invariant(HP defeat / timeout defeat 分離)に更新docs/playtest/m2-combat-mvp.mdの証跡を新仕様に整合(tested_commit 更新・test 名修正・test count 更新)Checks
pnpm typecheck— passpnpm lint— passpnpm test— pass (301 tests, 16 files)pnpm build— passVerification Commands Results
Schema Change Applicability
not_schema_changeSortieResult型のoutcome: "victory" | "defeat"は変更なし。SORTIE_DURATION_MS定数値・victory 判定ロジック・playerHpRemaining計算の修正のみ。型・スキーマ境界への影響なし。Schema Consumer Inventory
N/A —
not_schema_changeのため。SortieResult型の shape は変更なし。Safety Claim Matrix
N/A — 安全境界・権限・サンドボックス・MCP・native tools に触れない。ゲームロジックの state machine 変更のみ。
Notes
__E2E_SHORT_SORTIE__を使う HUD テスト2件を timeout defeat 検証に変換済み