Skip to content

conflicting_keys

A policy diagnostic from deedglass policy lint and the policy routes.

Severity: error

Two keys can’t be used together. A budget limits either calls (max_calls) or spending (max_spend), not both, and measure only works with max_spend.

deedglass: policy/v1
name: refunds
defaults:
decision: deny
reason: No rule allows this action.
budgets:
- id: refunds-per-day
match: { tool: stripe.create_refund }
window: day
max_calls: 100
max_spend: "500.00 usd"
✕ policy.yaml:11:16 · conflicting_keys
Budget "refunds-per-day" sets both max_calls and max_spend.
hint: Keep one; use two budgets to limit both.

Fix: use two budgets.

budgets:
- id: refund-calls-per-day
match: { tool: stripe.create_refund }
window: day
max_calls: 100
- id: refund-spend-per-day
match: { tool: stripe.create_refund }
window: day
max_spend: "500.00 usd"