Skip to content

Conversation

@worldInColors
Copy link
Contributor

@worldInColors worldInColors commented Jan 3, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Improved digital release filter tolerance checking to correctly evaluate both past and future release dates using absolute day calculations rather than relative signed values, ensuring more accurate filtering behaviour.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 3, 2026

Walkthrough

The digital release filter tolerance logic has been updated to use an absolute-day delta (daysFromRelease) rather than a signed delta (daysSinceRelease) for tolerance checks. The condition now checks if daysFromRelease is within the tolerance threshold, with log messages updated to include a future flag.

Changes

Cohort / File(s) Summary
Digital Release Filter Tolerance Logic
packages/core/src/streams/filterer.ts
Modified tolerance check to use absolute-day delta (daysFromRelease) instead of signed delta (daysSinceRelease); condition now evaluates daysFromRelease <= tolerance rather than 0 <= daysSinceRelease <= tolerance; updated log message to reflect daysFromRelease and added future flag derived from daysSinceRelease < 0.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • Viren070

Poem

🐰 A tolerance check hops with grace,
From signed deltas to absolute space,
DaysFromRelease now leads the way,
With future flags to light the day! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fix digital release' is directly related to the changeset which fixes the DigitalReleaseFilter logic by correcting the tolerance check mechanism.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 67f9062 and cbb2a80.

📒 Files selected for processing (1)
  • packages/core/src/streams/filterer.ts
🔇 Additional comments (1)
packages/core/src/streams/filterer.ts (1)

462-470: Excellent fix for future releases within tolerance!

The change correctly allows both past and future releases within the tolerance window by using the absolute day delta (daysFromRelease). This fixes the issue where near-future releases were incorrectly blocked even when within the configured tolerance period. The logic properly handles:

  • Past releases within tolerance: allowed
  • Future releases within tolerance: allowed (newly fixed)
  • Future releases outside tolerance: blocked by the check at line 472

The implementation is also consistent with the episode air date logic (lines 508-519).


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

Comment @coderabbitai help to get the list of available commands and usage tips.

@Viren070 Viren070 merged commit de956de into Viren070:main Jan 3, 2026
3 checks passed
@Viren070 Viren070 mentioned this pull request Jan 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants