Repository navigation
aggregator: freshness() future-stamp bound — stale beyond 1-day tolerance (#1568) - #2939
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 15 minutes. View limit details
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. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
ebc02e9 to
90fed14
Compare
|
Branch hygiene note (queue task 1839, lane B): the branch was initially based on the laptop primary clone's local snapshot main, which pulled unrelated |
Fixes #1568 (per triage task 1644's decision).
freshness()inpm-stack/aggregator/src/derive.tsclamped negative ages to 0 in both branches, so a future-datedmeasuredAtrendered "today" and could never go stale until its date arrived — one skewed stamp pinned a hub card fresh for weeks.FRESHNESS_FUTURE_TOLERANCE_MS = 86_400_000(1 day). A stamp more than 1 day in the future — date-only branch (parsed UTC-midnight instant vs startOfToday) or datetime branch (parsed instant vs now) — returns{ stale: true, ageDays: null }, the same honest unknown-age shape garbage/null already produce, sofreshnessStamprenders the stale badge (stale — as of <date>) instead of "today".Tests (
bun test test/usage.test.tson the laptop — pm-stack has no CI workflow): 26/26 pass, including 3 new #1568 tests:{ stale: false, ageDays: 0 }; past controls (1d ago, 8d ago stale) unchangedfreshnessStampon a +30d stamp contains the stale badge and never "· today"Full aggregator suite: 527 pass / 7 fail — the 7 failures are identical on clean main (pre-existing pages-manifest breakage, filed as #2580).
Queue task 1839 · branch
queue/1839-1568-freshness-future-boundNeed help on this PR? Tag
@codesmith-botwith what you need.