Skip to content

fix: invoke observer-level incoming call filters - #11507

Merged
ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:rb-fix-honor-observer-call-filters
Oct 15, 2026
Merged

ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:rb-fix-honor-observer-call-filters

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Observer-level incoming call filters run through GrainMethodInvoker, including when no system-wide incoming filters are registered. The pipeline-selection check currently tests the WeakReference wrapper rather than the observer, causing observer-only filters to be skipped.

Check LocalObject.Target for IIncomingGrainCallFilter so dispatch selects the filter pipeline for these observers. Add a focused regression test with no system-wide filters which verifies that the observer filter runs once, receives the observer as its target, and transforms the returned result.

Reported by Ledjon Behluli (@ledjon-behluli).

Microsoft Reviewers: Open in CodeFlow

Copilot AI balanced review requested due to automatic review settings October 14, 2026 22:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused correction uses the existing filter pipeline, and the regression test covers the reported behavior.

0 open findings

What changed in this PR

Fixes observer dispatch so observer-level incoming call filters run even without system-wide filters.

Changes:

  • Checks the observer target rather than its weak-reference wrapper.
  • Adds regression coverage for filter invocation count, target identity, and result transformation.
  • Removes an outdated test-helper comment.

CI coverage results were unavailable.

File Description
test/​Orleans.Core.Tests/​Runtime/​InvokableObjectManagerTests.cs Adds the regression test and configurable fixture observer.
test/​Orleans.Core.Tests/​Runtime/​DrainTestHelpers.cs Removes an outdated fast-path comment.
src/​Orleans.Core/​Runtime/​InvokableObjectManager.cs Corrects filter-pipeline selection.

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown
Contributor

Code coverage

Metric Pull request Current main Variance
Lines 83.44% (118,564 / 142,103) 83.49% (118,643 / 142,103) -0.0556 pp
Branches 73.03% (35,281 / 48,308) 73.07% (35,299 / 48,308) -0.0373 pp

Report-only conclusion: regressed.

The current-main baseline is commit 4d94a394bc and uses the same reviewed coverage matrix.

Coverage combines every CI test matrix job, including providers, CodeGen, .NET 8/10, Linux, Windows, and macOS, using canonical physical source and branch identities.

The comparison remains report-only while normal line and branch variance is calibrated.

Coverage details

@ReubenBond
ReubenBond merged commit f1eea86 into dotnet:main Oct 15, 2026
94 checks passed
@ReubenBond
ReubenBond deleted the rb-fix-honor-observer-call-filters branch October 15, 2026 01:55
ReubenBond added a commit to ReubenBond/orleans that referenced this pull request Oct 22, 2026
(cherry picked from commit f1eea86)

Upstream-PR: dotnet#11507
Upstream-Commit: f1eea86
ReubenBond added a commit that referenced this pull request Oct 23, 2026
(cherry picked from commit f1eea86)

Upstream-PR: #11507
Upstream-Commit: f1eea86
This was referenced Oct 29, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants