Problem
The refund policy auto-resolves any amount where amount <= REFUND_AUTO_LIMIT. That includes 0, negative numbers, NaN, and potentially other invalid numeric values.
Relevant code: lib/policy.ts.
Expected behavior
Only finite refund amounts greater than zero and at or below the configured limit should be auto-resolved. Invalid or non-positive amounts should be escalated for human review.
Acceptance criteria
- Require the refund amount to be finite and greater than zero before auto-resolution.
- Escalate zero, negative, and non-finite amounts with a clear reason.
- Add focused policy tests for valid, zero, negative, and non-finite amounts.
- Preserve the current behavior for valid refunds above and below the limit.
Problem
The refund policy auto-resolves any amount where
amount <= REFUND_AUTO_LIMIT. That includes0, negative numbers,NaN, and potentially other invalid numeric values.Relevant code:
lib/policy.ts.Expected behavior
Only finite refund amounts greater than zero and at or below the configured limit should be auto-resolved. Invalid or non-positive amounts should be escalated for human review.
Acceptance criteria