Skip to content

REFUND_AUTO_LIMIT=abc parses to NaN and every refund auto-resolves (fail-open) #6

Description

@royalpinto007

Problem

REFUND_AUTO_LIMIT="abc" parses to NaN, and since x > NaN is always false, the over-limit escalate branch never fires: every refund auto-resolves (fail-open).

Where

lib/policy.ts (Number(process.env.REFUND_AUTO_LIMIT ?? "50"), no finite check; existing tests cover only "10" and default).

Acceptance

Add a failing test first with REFUND_AUTO_LIMIT="abc", asserting a $640 refund escalates (or falls back to $50) instead of resolving. Then fix.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions