diff --git a/plugins/ndf/scripts/supervise_lib/release_templates.py b/plugins/ndf/scripts/supervise_lib/release_templates.py index ed22eba17..7fec4762a 100644 --- a/plugins/ndf/scripts/supervise_lib/release_templates.py +++ b/plugins/ndf/scripts/supervise_lib/release_templates.py @@ -245,7 +245,9 @@ def release_verify_step(sprint: str, refs: str, record_pr: str) -> dict: "stage": "リリース後テスト", "timeout": 3600, "prompt": f"/ndf:release-verification スプリント {sprint}({refs})。配布の記録は Pull Request #{record_pr} にある。" - "リリース後テストの記録をその Pull Request へコメントで書く。課題は閉じない(次の close が閉じる)。" + "受け入れ条件ごとに確かめ、スプリントの Pull Request の「手動確認」でリリース後テストへ回した項目と、" + "マージ前に未検証として残した項目も行として載せて、リリース後テストの記録をその Pull Request へコメントで書く。" + "課題は閉じない(次の close が閉じる)。" "番号が 0 なら本番へ出ていないため、何もせずに終える。", "next": "close", } @@ -259,7 +261,9 @@ def _release_verify_steps(a, v: str, dev: bool, repo: str | None, ref: str, rts: { "id": "verify", "type": "run", - "stage": "配布" if dev else "リリース後テスト", + # 導入の確認だけを流すため、本番でも「リリース後テスト」と記録しない。受け入れ条件ごとの確認と + # 配布の記録の PR への記録は、まとめの release-verify(release_verify_step)が担う(#2288) + "stage": "配布", "timeout": 1500, "cwd": repo, "cmd": f"sh -c 'git pull -q --ff-only origin {a.base} && {VERIFY_PY} verify-install --ref {ref} --expect {v} --runtimes {rts}'", diff --git a/plugins/ndf/scripts/tests/fixtures/supervise-contract/plans/close/3-release-prod.json b/plugins/ndf/scripts/tests/fixtures/supervise-contract/plans/close/3-release-prod.json index e4a59670a..b817949ba 100644 --- a/plugins/ndf/scripts/tests/fixtures/supervise-contract/plans/close/3-release-prod.json +++ b/plugins/ndf/scripts/tests/fixtures/supervise-contract/plans/close/3-release-prod.json @@ -95,7 +95,7 @@ { "id": "verify", "type": "run", - "stage": "リリース後テスト", + "stage": "配布", "timeout": 1500, "cwd": "/repo", "cmd": "sh -c 'git pull -q --ff-only origin main && python3 /scripts/release-verification-steps.py verify-install --ref main --expect 1.2.0 --runtimes claude'", diff --git a/plugins/ndf/scripts/tests/fixtures/supervise-contract/plans/close/4-close.json b/plugins/ndf/scripts/tests/fixtures/supervise-contract/plans/close/4-close.json index ef1922b9a..1442d2423 100644 --- a/plugins/ndf/scripts/tests/fixtures/supervise-contract/plans/close/4-close.json +++ b/plugins/ndf/scripts/tests/fixtures/supervise-contract/plans/close/4-close.json @@ -79,7 +79,7 @@ "kind": "リリース後テスト", "stage": "リリース後テスト", "timeout": 3600, - "prompt": "/ndf:release-verification スプリント m9(#15)。配布の記録は Pull Request #{queue_pr:release-prod} にある。リリース後テストの記録をその Pull Request へコメントで書く。課題は閉じない(次の close が閉じる)。番号が 0 なら本番へ出ていないため、何もせずに終える。", + "prompt": "/ndf:release-verification スプリント m9(#15)。配布の記録は Pull Request #{queue_pr:release-prod} にある。受け入れ条件ごとに確かめ、スプリントの Pull Request の「手動確認」でリリース後テストへ回した項目と、マージ前に未検証として残した項目も行として載せて、リリース後テストの記録をその Pull Request へコメントで書く。課題は閉じない(次の close が閉じる)。番号が 0 なら本番へ出ていないため、何もせずに終える。", "next": "close" }, { diff --git a/plugins/ndf/scripts/tests/fixtures/supervise-contract/plans/sprint/10-release-prod.json b/plugins/ndf/scripts/tests/fixtures/supervise-contract/plans/sprint/10-release-prod.json index 09c8fa976..801c31119 100644 --- a/plugins/ndf/scripts/tests/fixtures/supervise-contract/plans/sprint/10-release-prod.json +++ b/plugins/ndf/scripts/tests/fixtures/supervise-contract/plans/sprint/10-release-prod.json @@ -90,7 +90,7 @@ { "id": "verify", "type": "run", - "stage": "リリース後テスト", + "stage": "配布", "timeout": 1500, "cwd": "/repo", "cmd": "sh -c 'git pull -q --ff-only origin main && python3 /scripts/release-verification-steps.py verify-install --ref main --expect 1.2.0 --runtimes claude'", diff --git a/plugins/ndf/scripts/tests/test_supervise.py b/plugins/ndf/scripts/tests/test_supervise.py index a77bb6b61..2236b03f5 100644 --- a/plugins/ndf/scripts/tests/test_supervise.py +++ b/plugins/ndf/scripts/tests/test_supervise.py @@ -1451,6 +1451,7 @@ def test_new_release_dev_and_prod(tmp_path): assert st["facts"]["presentation_to"] == "issues/approval-ndf-v10.17.11.md" assert st["facts"]["gate_next"] == "explain" and st["verify"]["cwd"] == "/r" assert "--ref develop" in st["verify"]["cmd"] and "--channel dev" in st["release"]["cmd"] + assert st["verify"]["stage"] == "配布" # 開発版の導入の確認は「配布」(#2288 の AC2) p = cli( "new", @@ -1484,7 +1485,9 @@ def test_new_release_dev_and_prod(tmp_path): "fix", "judge-record", ] - assert "--ref main" in st["verify"]["cmd"] and st["verify"]["stage"] == "リリース後テスト" + # 導入の確認だけのステップは「リリース後テスト」と記録しない。それは仕上げの release-verify が担う(#2288 の AC1) + assert "--ref main" in st["verify"]["cmd"] and st["verify"]["stage"] == "配布" + assert not [s for s in plan["steps"] if s.get("stage") == "リリース後テスト"] assert st["verify"]["next"] == "cleanup" and "facts" not in st # 先頭の approve が開発版の facts の出力から承認したコミットを読む(#1426 の AC9) assert "approve --approval issues/approval-ndf-v10.17.11.md --facts-from '{queue_state?:release}' --by user" in st["approve"]["cmd"] diff --git a/plugins/ndf/scripts/tests/test_supervise_pace_verify.py b/plugins/ndf/scripts/tests/test_supervise_pace_verify.py index 90de1fe16..61d86defe 100644 --- a/plugins/ndf/scripts/tests/test_supervise_pace_verify.py +++ b/plugins/ndf/scripts/tests/test_supervise_pace_verify.py @@ -301,6 +301,8 @@ def test_close_of_the_promote_route_reads_the_promote_pr(tmp_path): assert ids.index("release-verify") == ids.index("close") - 1 rv = steps[ids.index("release-verify")] assert rv["type"] == "work" and rv["prompt"].startswith("/ndf:release-verification") and "{queue_pr:promote}" in rv["prompt"] + # 「リリース後テスト」と記録するのは、受け入れ条件ごとに確かめて記録を書くこのステップだけ(#2288 の AC1) + assert [s["id"] for s in steps if s.get("stage") == "リリース後テスト"] == ["release-verify"] PRD_ON_BASE = {**PRD, "trigger": "develop へのマージ", "branch": "develop"} # ベースブランチへのマージで本番へ届く