Skip to content

Small optimization for stream handlers - #1774

Merged
msridhar merged 1 commit into
masterfrom
stream-handled-method-name-prefilter
Aug 30, 2026
Merged

msridhar merged 1 commit into
masterfrom
stream-handled-method-name-prefilter

Conversation

@msridhar

@msridhar msridhar commented Aug 29, 2026 •

Copy link
Copy Markdown
Collaborator

Do a check to see if a method name matches some handled method before going deeper into type-based checks.

These stream handler methods have shown up in profiles before.

Summary by CodeRabbit

  • Bug Fixes
    • Improved stream method analysis by requiring configured models before applying nullability handling.
    • Enhanced detection of modeled stream operations across method overloads.
    • Improved validation when processing filters, pass-through chains, and initial stream invocations.

This was referenced Aug 29, 2026
@coderabbitai

coderabbitai Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8d77d7b6-8fbe-45b6-8fe5-8bdd0d6652f5

📥 Commits

Reviewing files that changed from the base of the PR and between 66a7822 and 3c84b47.

📒 Files selected for processing (2)
  • nullaway/src/main/java/com/uber/nullaway/handlers/StreamNullabilityPropagator.java
  • nullaway/src/main/java/com/uber/nullaway/handlers/stream/StreamTypeRecord.java

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


Walkthrough

StreamTypeRecord now indexes modeled method names from simple-name and signature-based definitions. It exposes hasModelForMethod for overload-independent model checks. StreamNullabilityPropagator now requires explicit method models during invocation handling, null-rejecting filter detection, and pass-through chain traversal. Receiver-type and operation-specific checks remain part of processing.

Merge Risk: 🔵 Low · up to 3c84b

The change speeds stream-handler analysis by filtering methods before deeper type checks. It is otherwise localized, but custom stream models with malformed signature strings may now fail during setup and require correction, so merge is appropriate with explicit owner awareness of that compatibility requirement.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 42.86% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The description explains the method-name check and its performance purpose. It directly matches the changeset and objectives.
Title check ✅ Passed The title concisely identifies an optimization to the stream handlers. It matches the main change in the pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch stream-handled-method-name-prefilter

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.67%. Comparing base (7c15725) to head (effcc75).

Files with missing lines Patch % Lines
...ber/nullaway/handlers/stream/StreamTypeRecord.java 91.66% 1 Missing and 1 partial ⚠️
...nullaway/handlers/StreamNullabilityPropagator.java 83.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1774   +/-   ##
=========================================
  Coverage     87.66%   87.67%           
- Complexity     3281     3289    +8     
=========================================
  Files           109      109           
  Lines         11052    11079   +27     
  Branches       2239     2244    +5     
=========================================
+ Hits           9689     9713   +24     
- Misses          640      641    +1     
- Partials        723      725    +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@msridhar
msridhar force-pushed the disable-jacoco-by-default branch from 66a7822 to 6398cb3 Compare August 29, 2026 20:48
@msridhar
msridhar force-pushed the stream-handled-method-name-prefilter branch from 3c84b47 to 7e5b94f Compare August 29, 2026 20:49
@seemantasaha
seemantasaha self-requested a review August 29, 2026 23:02
@msridhar
msridhar force-pushed the disable-jacoco-by-default branch from 6398cb3 to c39d4cb Compare August 30, 2026 01:46
@msridhar
msridhar force-pushed the stream-handled-method-name-prefilter branch from 7e5b94f to b70c527 Compare August 30, 2026 01:46
@msridhar
msridhar force-pushed the disable-jacoco-by-default branch from c39d4cb to 5b585c0 Compare August 30, 2026 13:50
Base automatically changed from disable-jacoco-by-default to master August 30, 2026 14:04
Do a check to see if a method name matches some handled method before going deeper into type-based checks.

These stream handler methods have shown up in profiles before.
@msridhar
msridhar force-pushed the stream-handled-method-name-prefilter branch from b70c527 to effcc75 Compare August 30, 2026 14:04
@msridhar
msridhar merged commit 1924f0d into master Aug 30, 2026
11 of 14 checks passed
@msridhar
msridhar deleted the stream-handled-method-name-prefilter branch August 30, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants