diff --git a/agent/negotiation/cards/domain/tactics.py b/agent/negotiation/cards/domain/tactics.py index 7f652ae..9fdfe7c 100644 --- a/agent/negotiation/cards/domain/tactics.py +++ b/agent/negotiation/cards/domain/tactics.py @@ -114,7 +114,7 @@ def compute_counter(spec: TacticSpec, context: Dict[str, Any]) -> Optional[int]: if counter <= 0: return None counter = min(counter, target) # 목표가 초과 제시 금지 (가드레일) - counter_i = int(round(counter)) + counter_i = int(counter / 10 + 0.5) * 10 # 10원 단위 반올림 — 앵커가·목표가 산정과 표기 통일(IMK 요청) if counter_i >= price: return None # 제시가가 이미 카운터 이하 → 카운터 무의미 return counter_i diff --git a/agent/tests/test_card_tactics.py b/agent/tests/test_card_tactics.py index 681af4c..fd27bf7 100644 --- a/agent/tests/test_card_tactics.py +++ b/agent/tests/test_card_tactics.py @@ -47,8 +47,8 @@ def test_counter_formulas_and_clamp(): assert compute_counter(tactic_for("WC-05"), ctx) == 10000 # 갑 직전 포지션이 있으면 그 기준: (9800+11000)/2 = 10400 → 역시 클램프 10000 assert compute_counter(tactic_for("WC-05"), dict(ctx, prev_customer_price=9800)) == 10000 - # 클램프 미발동 구간: (9900+10050)/2 = 9975 ≤ target - assert compute_counter(tactic_for("WC-05"), dict(ctx, input_price=10050)) == 9975 + # 클램프 미발동 구간: (9900+10050)/2 = 9975 ≤ target → 10원 단위 반올림 9980 + assert compute_counter(tactic_for("WC-05"), dict(ctx, input_price=10050)) == 9980 def test_counter_meaningless_degrades_to_hold():