Conversation
Reduce batch size to lower timeout risk on large Android binary scans. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Warning Review limit reached
Next review available in: 2 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Android scanner replaces its PostgreSQL-based OSS lookup with chunked HTTP requests to ChangesHTTP Binary Match Integration
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant AndroidAnalysis
participant get_oss_info_from_db
participant ldb_service
AndroidAnalysis->>get_oss_info_from_db: pass deduplicated bin_info_list
get_oss_info_from_db->>ldb_service: POST chunk to /binary/match
ldb_service-->>get_oss_info_from_db: return binary match results
get_oss_info_from_db-->>AndroidAnalysis: return enriched bin_info_list
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/fosslight_android/_binary_db_controller.py`:
- Line 18: Update the DEFAULT_KB_URL constant to use the HTTPS scheme for the
Fosslight KB endpoint, preserving the existing host and trailing slash.
- Line 21: Validate BINARY_MATCH_CHUNK_SIZE when initializing _CHUNK_SIZE,
rejecting non-integer and non-positive values before scanner startup. Preserve
the existing default for an unset variable and ensure invalid configuration
fails with a clear validation error instead of producing unusable chunking
behavior.
- Around line 107-111: Update the response handling in the binary matching flow
around _post_binary_match so a successful response is accepted only when its
results field is a list; treat a missing or non-list results value like an API
failure and return the original bin_info_list without marking items as new.
Preserve the existing empty-list behavior for valid responses that explicitly
contain results: [].
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: f0eee34e-3ebc-4094-8609-51837ff3fc36
📒 Files selected for processing (3)
pyproject.tomlsrc/fosslight_android/_binary_db_controller.pysrc/fosslight_android/android_binary_analysis.py
💤 Files with no reviewable changes (1)
- pyproject.toml
Log reachable/unreachable status for fosslight-kb so operators can see connection outcome in the log file without relying on debug level.
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/fosslight_android/_binary_db_controller.py (1)
117-119: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winNarrow the broad exception boundaries.
Both catches turn programming, schema, and parsing defects into a normal “return original list” path, allowing OSS enrichment to silently disappear. Catch only expected transport/JSON failures and preserve traceback or re-raise unexpected errors. Please verify the intended exception set against the project’s supported Python target.
Also applies to: 164-166
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/fosslight_android/_binary_db_controller.py` around lines 117 - 119, In the exception handlers surrounding the binary match API calls in the relevant controller methods, replace broad Exception catches with the specific transport and JSON/parsing exceptions supported by the project’s Python versions. Preserve the existing fallback list behavior only for those expected failures, while allowing programming, schema, and other unexpected errors to propagate with their traceback.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/fosslight_android/_binary_db_controller.py`:
- Around line 156-159: Update the warning in the binary match request
error-handling path to avoid logging the full body variable. Log only the HTTP
status code and a bounded, sanitized summary derived from ex.reason, preserving
the existing reachable-but-match-failed context.
---
Nitpick comments:
In `@src/fosslight_android/_binary_db_controller.py`:
- Around line 117-119: In the exception handlers surrounding the binary match
API calls in the relevant controller methods, replace broad Exception catches
with the specific transport and JSON/parsing exceptions supported by the
project’s Python versions. Preserve the existing fallback list behavior only for
those expected failures, while allowing programming, schema, and other
unexpected errors to propagate with their traceback.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 39778b36-b7d7-4ad9-ae2b-3afc05ad7183
📒 Files selected for processing (1)
src/fosslight_android/_binary_db_controller.py
Skip only the failed chunk and keep going; stop remaining chunks only when KB is unreachable so partial match results are still applied.
No description provided.