Conversation
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Review rate limit: 0/1 reviews remaining, refill in 45 minutes and 12 seconds.Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/Database/Database.php`:
- Around line 8464-8477: Move the $skip evaluation (the line setting $skip =
$this->filter === false || isset($this->disabledFilters[$filter])) to occur
before the NotFoundException check in decodeAttribute, then call the decoder as
you already do; update every built-in filter decoder closure (json, datetime,
point, linestring, polygon, vector, object) to accept the extra parameter
signature (mixed $value, Document $document, Database $database, bool $skip =
false) and return early with if ($skip) return $value; so they won’t error on
the named parameter skip and will short-circuit when filtering is disabled.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/Database/Database.php
🧰 Additional context used
🪛 PHPMD (2.15.0)
src/Database/Database.php
8475-8475: Avoid unused local variables such as '$filters'. (undefined)
(UnusedLocalVariable)
⏰ 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). (1)
- GitHub Check: Setup & Build Docker Image
🔇 Additional comments (1)
src/Database/Database.php (1)
395-399: No breaking changes from$disabledFiltersbecoming non-nullable.The repository contains no code that assigns
nulltodisabledFilters, and all usage patterns are compatible with a non-nullable array type. The property is always initialized as[]and only ever assigned array values (either empty or populated with filter names). The existing backup/restore pattern in the codebase works correctly with this non-nullable type.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
Greptile SummaryThis PR refactors
Confidence Score: 2/5Not safe to merge — existing skip/disable-filter semantics are broken for all built-in filters. A P1 regression breaks the public src/Database/Database.php — specifically the built-in filter Important Files Changed
Reviews (1): Last reviewed commit: "AddSkip" | Re-trigger Greptile |
| if (array_key_exists($filter, $this->instanceFilters)) { | ||
| $value = $this->instanceFilters[$filter]['decode']($value, $document, $this); | ||
| $value = $this->instanceFilters[$filter]['decode']($value, $document, $this, $skip); | ||
| } else { | ||
| $value = self::$filters[$filter]['decode']($value, $document, $this); | ||
| $value = self::$filters[$filter]['decode']($value, $document, $this, $skip); | ||
| } |
There was a problem hiding this comment.
Skip logic no longer applied for built-in filters
The $skip flag is now delegated to each filter's decode callback, but none of the built-in filter implementations (json, datetime, point, linestring, polygon, vector, object) accept or inspect this fourth parameter — PHP silently ignores the extra argument. As a result, calling skipFilters(['datetime']) (or disableFilters()) no longer prevents the decode callback from running; the value is still decoded. The previous code returned early before calling the callback at all when $skip was true.
External instance filters registered by callers are affected the same way — they receive an undocumented fourth argument they almost certainly don't handle.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.