Skip to content

Do not auto-resolve refunds with zero or negative amounts #3

Description

@royalpinto007

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions