You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stabilize notification dispatch tests with fixed timestamps - #33698
Notification dispatch tests read the real clock, making their timing-dependent expectations flaky.
Solution
Freeze the test clock to one known time so every test uses predictable timestamps. Add a precise mock return type so CI type checking stays reliable.
ELI5
The tests used to look at the current time, which keeps changing. Now they use the same pretend time every run.
What Changed
Mock Date.now() with a fixed timestamp in notification dispatch tests and restore mocks afterward.
Replace wall-clock timestamp calls with values based on that fixed time.
Remove the resolved flaky-test baseline entry.
Add an explicit return type to the Mimo hook service mock.
Why
Using a fixed clock makes time comparisons repeatable in CI without changing notification behavior.
Linked Issue
Fixes #
Visual Proof
N/A — test-only and mock typing changes have no visual or interaction change.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Review
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
No production behavior changes. Cross-platform, remote SSH, mobile, backwards compatibility, security, and performance impact are N/A.
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
Walkthrough
The notification-dispatch tests now use a fixed timestamp for clock-dependent setup and fixtures. The flaky-test baseline entry for the test file is removed. The mimoHookServiceModuleMock factory now declares its return type; its returned mock object is unchanged.
Priority: Low
Merge Risk: Minimal · up to e9d65
The changes are limited to deterministic test timing and mock typing, with no established production risk.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Description check
The description explains the problem, solution, scope, and lack of visual changes. However, the required linked issue is missing, testing verification is not reported, and required self-review and CI …
Add the actual issue reference after “Fixes #”. Report the automated or manual test results, complete the self-review, and state whether lint, typecheck, test, and build checks passed or will be covered by CI.
Passed checks: 4 passed
Check name
Status
Explanation
Title check
The title clearly and concisely describes the primary change: stabilizing notification dispatch tests with fixed timestamps.
Docstring Coverage
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage
Explanation
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files.
Full details: Description check
Explanation
The description explains the problem, solution, scope, and lack of visual changes. However, the required linked issue is missing, testing verification is not reported, and required self-review and CI checks remain incomplete.
Resolution
Add the actual issue reference after “Fixes #”. Report the automated or manual test results, complete the self-review, and state whether lint, typecheck, test, and build checks passed or will be covered by CI.
Finishing Touches
📝 Generate docstrings
Commit to this branch
Create a new PR
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.
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
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.
Problem
Notification dispatch tests read the real clock, making their timing-dependent expectations flaky.
Solution
Freeze the test clock to one known time so every test uses predictable timestamps. Add a precise mock return type so CI type checking stays reliable.
ELI5
The tests used to look at the current time, which keeps changing. Now they use the same pretend time every run.
What Changed
Date.now()with a fixed timestamp in notification dispatch tests and restore mocks afterward.Why
Using a fixed clock makes time comparisons repeatable in CI without changing notification behavior.
Linked Issue
Fixes #
Visual Proof
N/A — test-only and mock typing changes have no visual or interaction change.
Testing
AI Disclosure
Review
Agent skill upstream boundary
Notes
No production behavior changes. Cross-platform, remote SSH, mobile, backwards compatibility, security, and performance impact are N/A.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)