Skip to content

test(aggregator): normalizeResetAt impossible/non-ISO date regressions (#4968) - #6818

Merged
developing-today[bot] merged 1 commit into
mainfrom
queue/4968-normalize-resetat-tests
Nov 7, 2026
Merged

developing-today[bot] merged 1 commit into
mainfrom
queue/4968-normalize-resetat-tests

Conversation

@developing-today

@developing-today developing-today Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Closes #4968.

The behaviour fix for #4968 already landed independently: normalizeResetAt's string branch has used parseIsoDate since 96c43b5 (#2579, ~1h after the issue's evidence commit), and a bun probe at current main confirms every acceptance case — 2026-02-30, 2026-04-31, 2026-02-29 and "March 2, 2026" return null, while ISO strings, 2024-02-29, and epoch s/ms are unchanged. The related sites the issue named are also already on the same contract: credentialExpiresAt is gated by isIsoDate (with rejection tests in this same file), and the Turso period pair is gated by parseIsoDate (#5091, with windowSecondsOf tests).

What was missing — and is the whole diff here — is the acceptance's regression-test item for normalizeResetAt itself: its describe block covered epoch/ISO/junk but none of the refused string cases. This PR adds them:

  • impossible and non-ISO date strings are null (#4968) — 2026-02-30, 2026-04-31, 2026-02-29 (non-leap year), "March 2, 2026";
  • valid date-only and leap-day strings pass (#4968) — 2026-03-02, 2024-02-29.

Verification: bun test test/quota-gather-map.test.ts test/clinepass-adapter.test.ts test/feed.test.ts — 149 pass, 0 fail.

🤖 Queue worker lane code-t, fallback mode (queue backend down, #6619).


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

#4968)

The behaviour already landed in 96c43b5 (#2579): the string branch uses parseIsoDate. These are the acceptance regression tests for the refused cases (2026-02-30, 2026-04-31, 2026-02-29, March 2 2026 -> null) and the passing controls (date-only, leap day). bun test quota-gather-map + clinepass-adapter + feed: 149 pass, 0 fail.
@developing-today
developing-today Bot requested review from a team and dezren39 as code owners November 7, 2026 05:49
@coderabbitai

coderabbitai Bot commented Nov 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c1461ba9-62d4-4df4-9d07-44bf1c875a52

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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

Labels

None yet

Projects

None yet

0 participants