-
-
Notifications
You must be signed in to change notification settings - Fork 149
limit the age gap between events to 1 hr #1411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
limit the age gap between events to 1 hr #1411
Conversation
WalkthroughAdds a new CLI option Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Caller
participant Validator as validate_time_partition
participant RefStore as REFERENCE_TIMESTAMP (Mutex)
Caller->>Validator: validate(field, raw_ts, limit_days, max_age_hours)
Validator->>RefStore: lock & read()
alt No reference set
Validator->>Validator: parse raw_ts -> parsed_ts
Validator->>Validator: check parsed_ts >= now - limit_days
alt Too old (absolute)
Validator-->>Caller: Err TimestampTooOld(field, raw_ts, parsed_ts)
else Valid
Validator->>RefStore: store parsed_ts as reference
Validator-->>Caller: Ok
end
else Reference exists
Validator->>Validator: parse raw_ts -> parsed_ts
Validator->>Validator: check parsed_ts >= reference - max_age_hours
alt Too old (relative)
Validator-->>Caller: Err TimestampTooOldRelative(field, raw_ts, parsed_ts, reference)
else Valid
Validator-->>Caller: Ok
end
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested labels
Suggested reviewers
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
d418218
to
e75dd59
Compare
Summary by CodeRabbit
New Features
Bug Fixes
Tests