Conversation
|
Warning Rate limit exceeded
⌛ 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. 📒 Files selected for processing (27)
📝 WalkthroughWalkthroughCentralizes file permission constants and a generic pointer-equality helper, updates callers to use them, and adds depth-limit warning collection and slog warnings in JSONPath evaluation and reference pruning/stubbing. Tests added/updated for pointer equality and depth-limit warnings. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ 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. Comment |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #348 +/- ##
==========================================
- Coverage 84.78% 84.77% -0.02%
==========================================
Files 193 194 +1
Lines 27255 27246 -9
==========================================
- Hits 23108 23097 -11
- Misses 2828 2829 +1
- Partials 1319 1320 +1
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@fixer/refs_test.go`:
- Around line 907-911: Replace the hard-coded loop count `102` in the test with
the canonical limit constant so the test adapts to configuration changes; in the
block that builds nested maps (the loop that updates `current =
map[string]any{"items": current}` in refs_test.go), use `maxRefCollectionDepth`
(or `maxRefCollectionDepth` +/- an appropriate offset if the test intends to
exercise boundary behavior) instead of `102` so the nesting depth derives from
the authoritative `maxRefCollectionDepth` symbol.
ℹ️ Review info
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (27)
builder/builder.gocmd/oastools/commands/convert.gocmd/oastools/commands/fix.gocmd/oastools/commands/join.gocmd/oastools/commands/overlay.gofixer/oas2.gofixer/oas3.gofixer/refs.gofixer/refs_test.gofixer/stub_missing_refs.gogenerator/writer.gointernal/equalutil/equalutil.gointernal/equalutil/equalutil_test.gointernal/fileutil/fileutil.gointernal/jsonpath/eval.gointernal/jsonpath/jsonpath_test.gointernal/mcpserver/tools_convert.gointernal/mcpserver/tools_fix.gointernal/mcpserver/tools_join.gointernal/mcpserver/tools_overlay.gojoiner/equivalence.gojoiner/joiner.goparser/equals.goparser/equals_helpers_test.goparser/parameters_equals.goparser/paths_equals.goparser/schema_equals.go
💤 Files with no reviewable changes (2)
- parser/equals.go
- parser/equals_helpers_test.go
e81ea3d to
a60dc1c
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@fixer/oas2.go`:
- Around line 191-193: Replace the unstructured calls to slog.Warn by emitting a
static message and attaching the warning string as a structured attribute:
iterate over collector.Warnings and call slog.Warn with a constant message like
"ref collection warning" and include the warning text as an attribute (e.g.,
using slog.String("warning", w)) so tools can aggregate by message while
preserving the specific detail; update the occurrences around collector.Warnings
and slog.Warn to use this structured form.
ℹ️ Review info
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (27)
builder/builder.gocmd/oastools/commands/convert.gocmd/oastools/commands/fix.gocmd/oastools/commands/join.gocmd/oastools/commands/overlay.gofixer/oas2.gofixer/oas3.gofixer/refs.gofixer/refs_test.gofixer/stub_missing_refs.gogenerator/writer.gointernal/equalutil/equalutil.gointernal/equalutil/equalutil_test.gointernal/fileutil/fileutil.gointernal/jsonpath/eval.gointernal/jsonpath/jsonpath_test.gointernal/mcpserver/tools_convert.gointernal/mcpserver/tools_fix.gointernal/mcpserver/tools_join.gointernal/mcpserver/tools_overlay.gojoiner/equivalence.gojoiner/joiner.goparser/equals.goparser/equals_helpers_test.goparser/parameters_equals.goparser/paths_equals.goparser/schema_equals.go
💤 Files with no reviewable changes (2)
- parser/equals_helpers_test.go
- parser/equals.go
… file permissions - Extract generic EqualPtr[T comparable] into internal/equalutil, replacing 5 type-specific pointer-equality functions across parser/ and joiner/ - Add depth-limit warnings: RefCollector.Warnings field in fixer/refs.go, slog.Warn in internal/jsonpath/eval.go (previously silent data truncation) - Centralize file permissions in internal/fileutil (OwnerReadWrite 0o600, ReadableByAll 0o644), replacing hardcoded literals across 12 production files Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
a60dc1c to
30c869c
Compare
Summary
EqualPtr[T comparable]intointernal/equalutil, replacing 5 type-specific pointer-equality functions duplicated acrossparser/andjoiner/RefCollector.Warningsfield infixer/refs.go(withslog.Warnat all 4 call sites), andslog.Warnininternal/jsonpath/eval.gointernal/fileutil(OwnerReadWrite0o600,ReadableByAll0o644), replacing hardcoded literals across 12 production filesDetails
Generic Pointer Equality (
internal/equalutil)equalFloat64Ptrequalutil.EqualPtrequalIntPtrequalutil.EqualPtrequalBoolPtrequalutil.EqualPtrequalPointerFloatequalutil.EqualPtrequalPointerIntequalutil.EqualPtrSilent Limit Warnings
fixer/refs.gocollectRefsFromMapWithDepthreturnat depth 100Warningsfield +slog.Warnat all 4 call sitesinternal/jsonpath/eval.gorecursiveDescendreturn nilat depth 500slog.Warnwith depth contextinternal/jsonpath/eval.gocollectAllDescendantsreturnat depth 500slog.Warnwith depth contextFile Permission Constants (
internal/fileutil)OwnerReadWriteoutputFileMode, literal0600ReadableByAll0644Test plan
make checkpasses (8500 tests — +2 new:TestRefCollector_DepthLimitWarning,TestRecursiveDescentDepthLimit_WarningEmitted)0600/0o600in production code (only tests, docs, help text)go_diagnosticsclean on all 27 modified files🤖 Generated with Claude Code