From 775984fe489852b66912521842d945085a305654 Mon Sep 17 00:00:00 2001 From: Mina Choi Date: Thu, 30 Jul 2026 15:20:01 +0900 Subject: [PATCH] =?UTF-8?q?[fix]=20negosium:=20=ED=98=91=EC=83=81=EC=B9=B4?= =?UTF-8?q?=EB=93=9C=20=EC=B9=B4=EC=9A=B4=ED=84=B0=EA=B0=80=2010=EC=9B=90?= =?UTF-8?q?=20=EB=8B=A8=EC=9C=84=20=EB=B0=98=EC=98=AC=EB=A6=BC=20=E2=80=94?= =?UTF-8?q?=20=EC=95=B5=EC=BB=A4=C2=B7=EB=AA=A9=ED=91=9C=EA=B0=80=EC=99=80?= =?UTF-8?q?=20=ED=91=9C=EA=B8=B0=20=ED=86=B5=EC=9D=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- agent/negotiation/cards/domain/tactics.py | 2 +- agent/tests/test_card_tactics.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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():