test: 통합 스냅샷 재생성 스크립트 추가 + 회귀 테스트 갱신 (#29 후속 작업분)
Multi-MDX Regression (IMP-91) / multi-mdx-regression (push) Failing after 9m49s
Multi-MDX Regression (IMP-91) / multi-mdx-regression (push) Failing after 9m49s
- tests/integration/scripts/regenerate_snapshots.py: 스냅샷 일괄 재생성 도구 - 통합 스냅샷 9종 갱신, 회귀/유닛 테스트 7건 보강 - ISSUE_DRAFTS_2026-07-02.md: 7/2 전수 검토 이슈 초안 보존 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -52,26 +52,28 @@ def test_crash_template_is_visual_pending_in_catalog():
|
||||
# ─── mdx04-2.1 — VP frame at rank 1 ─────────────────────────────
|
||||
|
||||
|
||||
def test_mdx04_2_1_excludes_vp_rank_1_from_live_candidates():
|
||||
"""``04-2.1`` rank-1 is the VP crash frame — must NOT appear in live set.
|
||||
|
||||
Every surviving live candidate (if any) must itself be non-VP per catalog;
|
||||
the section may legitimately produce an empty list (all remaining entries
|
||||
are reject), which is the documented ``no_non_reject_v4_candidate`` signal
|
||||
routed to the Step 9 fallback path.
|
||||
"""
|
||||
def test_mdx04_2_1_vp_rank_1_marked_blocked_runtime():
|
||||
"""``04-2.1`` rank-1 VP crash frame — Emergency P2 (2026-05-26) 이후
|
||||
drop 이 아니라 candidate_status='blocked_runtime' 으로 보존·표시된다.
|
||||
crash 방지는 status 기반 라우팅(자동 렌더 제외)이 담당. 구 drop 계약은
|
||||
include_blocked_runtime=False 로 존속."""
|
||||
v4 = load_v4_result()
|
||||
assert _rank1_template_id(v4, "04-2.1") == CRASH_TEMPLATE_ID
|
||||
|
||||
candidates = lookup_v4_candidates(v4, "04-2.1", max_n=6)
|
||||
tids = [c.template_id for c in candidates]
|
||||
by_tid = {c.template_id: c for c in candidates}
|
||||
assert CRASH_TEMPLATE_ID in by_tid
|
||||
assert by_tid[CRASH_TEMPLATE_ID].candidate_status == "blocked_runtime"
|
||||
# VP 후보는 auto_renderable 로 분류되면 안 된다 (crash-path 차단 핵심)
|
||||
for c in candidates:
|
||||
contract = get_contract(c.template_id) or {}
|
||||
if contract.get("visual_pending") is True:
|
||||
assert c.candidate_status == "blocked_runtime"
|
||||
|
||||
assert CRASH_TEMPLATE_ID not in tids
|
||||
for tid in tids:
|
||||
contract = get_contract(tid) or {}
|
||||
assert contract.get("visual_pending") is not True, (
|
||||
f"04-2.1: surviving live candidate {tid} is VP"
|
||||
)
|
||||
legacy = lookup_v4_candidates(
|
||||
v4, "04-2.1", max_n=6, include_blocked_runtime=False,
|
||||
)
|
||||
assert CRASH_TEMPLATE_ID not in [c.template_id for c in legacy]
|
||||
|
||||
|
||||
def test_mdx04_2_1_retains_vp_frame_in_raw_judgments():
|
||||
@@ -84,8 +86,9 @@ def test_mdx04_2_1_retains_vp_frame_in_raw_judgments():
|
||||
# ─── mdx04-2.2 — VP frame at rank 2 ─────────────────────────────
|
||||
|
||||
|
||||
def test_mdx04_2_2_excludes_vp_rank_2_from_live_candidates():
|
||||
"""``04-2.2`` rank-2 is the VP crash frame — rank-1 live frame must win."""
|
||||
def test_mdx04_2_2_vp_rank_2_marked_blocked_runtime():
|
||||
"""``04-2.2`` rank-2 VP crash frame — Emergency P2: 보존 + blocked_runtime.
|
||||
비-VP rank-1 이 선두 유지, VP 는 status 로 자동 렌더에서 제외."""
|
||||
v4 = load_v4_result()
|
||||
rank_1 = _rank1_template_id(v4, "04-2.2")
|
||||
rank_1_contract = get_contract(rank_1) or {}
|
||||
@@ -95,8 +98,15 @@ def test_mdx04_2_2_excludes_vp_rank_2_from_live_candidates():
|
||||
candidates = lookup_v4_candidates(v4, "04-2.2", max_n=6)
|
||||
tids = [c.template_id for c in candidates]
|
||||
|
||||
assert CRASH_TEMPLATE_ID not in tids
|
||||
assert tids[0] == rank_1
|
||||
by_tid = {c.template_id: c for c in candidates}
|
||||
if CRASH_TEMPLATE_ID in by_tid:
|
||||
assert by_tid[CRASH_TEMPLATE_ID].candidate_status == "blocked_runtime"
|
||||
|
||||
legacy = lookup_v4_candidates(
|
||||
v4, "04-2.2", max_n=6, include_blocked_runtime=False,
|
||||
)
|
||||
assert CRASH_TEMPLATE_ID not in [c.template_id for c in legacy]
|
||||
|
||||
|
||||
def test_mdx04_2_2_retains_vp_frame_in_raw_judgments():
|
||||
|
||||
Reference in New Issue
Block a user