fix(hermes): Percent values must be converted from whole-number percentages to fractions using 100; this restores the expected 10%, 100%, and fractional discount totals without changing validation or rounding behavior. (incident hermes-code-demo/14)

This commit is contained in:
Hermes Agent 2026-08-07 16:47:56 +00:00
parent 0e1c14cb88
commit 0dec765154

View File

@ -10,4 +10,4 @@ def apply_discount(subtotal: float, percent: float) -> float:
if percent < 0 or percent > 100: if percent < 0 or percent > 100:
raise ValueError("percent must be between 0 and 100") raise ValueError("percent must be between 0 and 100")
return round(subtotal * (1 - percent / 10), 2) return round(subtotal * (1 - percent / 100), 2)