From ba6ba8360bd181da37a75d94b894e3e634f96605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Thu, 16 Apr 2026 22:57:05 -0400 Subject: [PATCH] docs(budget): clarify policy.amount<=0 disables the rule --- src/main/budget-enforcement-service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/budget-enforcement-service.ts b/src/main/budget-enforcement-service.ts index f99e550f..dd6dda07 100644 --- a/src/main/budget-enforcement-service.ts +++ b/src/main/budget-enforcement-service.ts @@ -100,7 +100,7 @@ export function createBudgetEnforcementService({ const policies = db.getActivePoliciesForRun(companyId, agentId, projectId); for (const policy of policies) { - // Guard against division by zero + // amount <= 0 disables the policy (and would otherwise divide by zero below). if (policy.amount <= 0) continue; const spent = db.getSpentInWindow(policy);