Repository navigation
test(aggregator): normalizeResetAt impossible/non-ISO date regressions (#4968) - #6818
Merged
Merged
Conversation
#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
Bot
requested review from
a team and
dezren39
as code owners
November 7, 2026 05:49
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4968.
The behaviour fix for #4968 already landed independently:
normalizeResetAt's string branch has usedparseIsoDatesince 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-29and"March 2, 2026"returnnull, 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:credentialExpiresAtis gated byisIsoDate(with rejection tests in this same file), and the Turso period pair is gated byparseIsoDate(#5091, withwindowSecondsOftests).What was missing — and is the whole diff here — is the acceptance's regression-test item for
normalizeResetAtitself: 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).
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.