feat(core-B): 운영자 sync/verify CLI + cold-start onboarding (BAT-051, REQ-105/106, PR #32)
dcy-034 마지막 조각. sync(슬롯 qty←브로커+warning해제+OQ-A 전이엣지+FR-7 평단seed)/verify(C 재대조·강제해제없음). core-A QC minor 2건 정리 동봉. QC(opus) PASS, 683 passed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHtM5Ws1HKCKQ4JGi6GRb5
This commit is contained in:
@@ -503,13 +503,21 @@ def test_slot_state_enum_unchanged():
|
||||
assert {s.value for s in SlotState} == expected
|
||||
|
||||
|
||||
def test_allowed_transitions_unchanged():
|
||||
"""ALLOWED_TRANSITIONS set must not have new entries from BAT-050."""
|
||||
def test_allowed_transitions_count():
|
||||
"""ALLOWED_TRANSITIONS count: 7 base + 4 to_error + 2 from_error
|
||||
+ 1 sync-onboarding (BAT-051 REQ-105 OQ-A: INACTIVE→HOLDING) = 14.
|
||||
|
||||
BAT-050 did not add transitions; BAT-051 added exactly 1 (INACTIVE→HOLDING)
|
||||
for cold-start onboarding (actor=sync, wire contract unchanged).
|
||||
SlotState enum remains 5 values.
|
||||
"""
|
||||
from trex_core.domain.slot.state import ALLOWED_TRANSITIONS, SlotState
|
||||
# Canonical count: 7 base + 4 to_error + 2 from_error = 13
|
||||
assert len(ALLOWED_TRANSITIONS) == 13
|
||||
# Spot-check: no new reconcile-warning-related transition
|
||||
assert (SlotState.INACTIVE, SlotState.HOLDING) not in ALLOWED_TRANSITIONS
|
||||
# 14 = 7 base + 4 to_error + 2 from_error + 1 sync-onboarding (BAT-051)
|
||||
assert len(ALLOWED_TRANSITIONS) == 14
|
||||
# BAT-051 REQ-105 OQ-A: INACTIVE→HOLDING is now allowed (sync-only actor)
|
||||
assert (SlotState.INACTIVE, SlotState.HOLDING) in ALLOWED_TRANSITIONS
|
||||
# SlotState enum still 5 values — wire contract unchanged
|
||||
assert len(list(SlotState)) == 5
|
||||
|
||||
|
||||
# NFR-2: short-term instance normal scenario (slot qty == broker qty) => no warn
|
||||
|
||||
Reference in New Issue
Block a user