전 저장소 리팩터링과 SSOT 정비
This commit is contained in:
parent
14ecbd4e7d
commit
3dfddcac6f
173 changed files with 19679 additions and 6952 deletions
|
|
@ -80,24 +80,74 @@ class LiveCoachQuotaRechargeTest(unittest.TestCase):
|
|||
self.assertTrue(should_recharge)
|
||||
self.assertIn("개방도", reason)
|
||||
|
||||
# 성과 없음(개방도 하락) + 페이싱 주기 아님 → 미충전
|
||||
should_recharge, _ = turn_runtime.should_recharge_live_coach_credit(
|
||||
{"appropriateness": "pos", "rapport_signal": 0.45},
|
||||
before,
|
||||
state_machine.SessionState(
|
||||
stage=state_machine.Stage.RAPPORT,
|
||||
turn_seq=3,
|
||||
effective_openness=0.16,
|
||||
effective_openness=0.14,
|
||||
),
|
||||
)
|
||||
self.assertFalse(should_recharge)
|
||||
|
||||
should_recharge, _ = turn_runtime.should_recharge_live_coach_credit(
|
||||
def test_recharge_allows_neutral_with_strong_rapport_and_gain(self) -> None:
|
||||
before = state_machine.SessionState(
|
||||
stage=state_machine.Stage.RAPPORT,
|
||||
turn_seq=2,
|
||||
effective_openness=0.15,
|
||||
)
|
||||
after = state_machine.SessionState(
|
||||
stage=state_machine.Stage.RAPPORT,
|
||||
turn_seq=3,
|
||||
effective_openness=0.19,
|
||||
)
|
||||
should_recharge, reason = turn_runtime.should_recharge_live_coach_credit(
|
||||
{"appropriateness": "neutral", "rapport_signal": 0.8},
|
||||
before,
|
||||
after,
|
||||
)
|
||||
self.assertTrue(should_recharge)
|
||||
self.assertIn("라포", reason)
|
||||
|
||||
def test_recharge_warn_turn_does_not_recharge_off_cycle(self) -> None:
|
||||
before = state_machine.SessionState(
|
||||
stage=state_machine.Stage.RAPPORT,
|
||||
turn_seq=2,
|
||||
effective_openness=0.15,
|
||||
)
|
||||
after = state_machine.SessionState(
|
||||
stage=state_machine.Stage.RAPPORT,
|
||||
turn_seq=3,
|
||||
effective_openness=0.19,
|
||||
)
|
||||
should_recharge, _ = turn_runtime.should_recharge_live_coach_credit(
|
||||
{"appropriateness": "warn", "rapport_signal": 0.1},
|
||||
before,
|
||||
after,
|
||||
)
|
||||
self.assertFalse(should_recharge)
|
||||
|
||||
def test_pacing_recharge_every_n_turns_even_without_evaluation(self) -> None:
|
||||
before = state_machine.SessionState(
|
||||
stage=state_machine.Stage.RAPPORT,
|
||||
turn_seq=5,
|
||||
effective_openness=0.15,
|
||||
)
|
||||
after = state_machine.SessionState(
|
||||
stage=state_machine.Stage.RAPPORT,
|
||||
turn_seq=turn_runtime._LIVE_COACH_PACING_RECHARGE_EVERY_TURNS,
|
||||
effective_openness=0.14,
|
||||
)
|
||||
should_recharge, reason = turn_runtime.should_recharge_live_coach_credit(
|
||||
None,
|
||||
before,
|
||||
after,
|
||||
)
|
||||
self.assertTrue(should_recharge)
|
||||
self.assertIn("턴", reason)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue