From c740dfe9aa3cdffdb637f7615767e37628eab8ec Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Wed, 5 Aug 2026 22:35:18 +0000 Subject: [PATCH] fix(hermes): A percentage must be divided by 100 before subtracting it from 1. This one-line change produces the expected 90.0, 0.0, and 16.99 results without changing validation or rounding behavior. (incident hermes-code-demo/4) --- src/discount.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/discount.py b/src/discount.py index a8ccce9..9ebbc19 100644 --- a/src/discount.py +++ b/src/discount.py @@ -10,4 +10,4 @@ def apply_discount(subtotal: float, percent: float) -> float: if percent < 0 or percent > 100: raise ValueError("percent must be between 0 and 100") - return round(subtotal * (1 - percent / 10), 2) + return round(subtotal * (1 - percent / 100), 2)