GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test(reminders): add lifecycle conformance scenarios by ReubenBond · Pull Request #10896 · dotnet/orleans

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Aug 28, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Problem

Reminder provider conformance currently verifies table operations but leaves service startup, local ownership, recovery, and topology churn to provider-specific suites. That permits lifecycle semantics to drift and makes timing failures difficult to diagnose.

Solution

Add a shared deterministic lifecycle runner and in-process harness covering readiness, single-owner registration, in-place updates, removal quiescence, exact-due recovery, stale-owner reconciliation, one-silo join/leave transfer, and cleanup isolation. The harness centralizes fake-time advancement, per-instance diagnostic ownership, explicit startup events, and membership/range-reconciliation barriers. Dedicated setup-only adapters run the same inherited scenarios for in-memory, Azure Table, Cosmos, SQL Server, PostgreSQL, MySQL, Redis, DynamoDB, and Firestore providers. Fault-injection self-tests prove duplicate local instances, owner restarts, and cancellation-safe cleanup are detected.

Rationale

Keeping identities, schedules, assertions, churn orchestration, and independently bounded scenario cleanup in TestKit limits provider code to backend configuration, produces exact owner/tick diagnostics, and prevents provider-specific retries, whole-table clearing, or timing allowances from concealing semantic failures.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Copilot AI lite review requested due to automatic review settings August 28, 2026 05:55
Copilot started reviewing on behalf of ReubenBond August 28, 2026 05:56
View session
Copilot AI reviewed Aug 28, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Lite
Findings: 2 Medium severity

New issues introduced by this change (2)
Severity Finding
Medium severity test/​Orleans.Testing.Reminders/​ReminderServiceLifecycleHarness.cs — WaitForOwnerCountAsync mixes two different owner-count notions: the fast-path uses GetOwners()…
Medium severity src/​Orleans.Reminders.TestKit/​ReminderServiceLifecycleTestRunner.cs — The "no local owner before entering the loading window" assertion only checks immediately after…
What changed in this PR

Adds a shared, deterministic reminder-service lifecycle conformance suite to reduce provider-specific drift and make ownership/recovery/churn semantics verifiable with consistent diagnostics across providers.

Changes:

  • Introduces ReminderServiceLifecycleTestRunner + IReminderServiceLifecycleHarness for deterministic lifecycle/churn scenarios in Orleans.Reminders.TestKit.
  • Adds an in-process ReminderServiceLifecycleHarness and extends ReminderDiagnosticObserver to track local start/stop and schedule-change counts needed by the new scenarios.
  • Wires the new scenarios into existing reminder provider test bases and adds TestKit self-tests (including fault-injection “oracle” checks).
File Description
test/​Orleans.Testing.Reminders/​ReminderServiceLifecycleHarness.cs New harness adapting InProcessTestCluster + ReminderTestClock + diagnostics to the shared lifecycle runner.
test/​Orleans.Testing.Reminders/​ReminderDiagnosticObserver.cs Adds lifecycle counters and a schedule-change waiter to support deterministic lifecycle assertions.
test/​Orleans.Testing.Reminders/​Orleans.Testing.Reminders.csproj Adds a project reference to Orleans.Reminders.TestKit so test utilities can use the shared runner/harness contract.
test/​Orleans.Reminders.Tests/​TimerTests/​ReminderTestsBase.cs Integrates lifecycle conformance scenarios into provider reminder suites via a per-provider runner.
test/​Orleans.Reminders.TestKit.Tests/​ReminderServiceLifecycleConformanceTests.cs New TestKit conformance tests for lifecycle scenarios plus fault-injection self-tests.
src/​Orleans.Reminders/​Orleans.Reminders.csproj Adds InternalsVisibleTo for Orleans.Testing.Reminders to enable test-only range-reconciliation barriers.
src/​Orleans.Reminders.TestKit/​ReminderServiceLifecycleTestRunner.cs New shared deterministic lifecycle/churn runner and harness contract used by provider suites and TestKit tests.
src/​Orleans.Reminders.TestKit/​README.md Documents the new lifecycle runner and harness usage pattern.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread test/Orleans.Testing.Reminders/ReminderServiceLifecycleHarness.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/Orleans.Reminders.TestKit/ReminderServiceLifecycleTestRunner.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Copilot AI review requested due to automatic review settings August 28, 2026 07:24
Copilot started reviewing on behalf of ReubenBond August 28, 2026 07:25
View session
Copilot AI reviewed Aug 28, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Lite
Findings: 1 High severity · 3 Low severity

New issues introduced by this change (4)
Severity Finding
Low severity test/​Orleans.Testing.Reminders/​ReminderDiagnosticObserver.cs — The XML docs say "started for an identity", but this API is keyed by (grainId, reminderName) and…
Low severity src/​Orleans.Reminders.TestKit/​ReminderServiceLifecycleTestRunner.cs — These interface docs mention "for an identity", but the harness methods are keyed by (grainId,…
Low severity src/​Orleans.Reminders.TestKit/​README.md — The lifecycle README example creates a separate ReminderDiagnosticObserver, but ReminderTestClock…
High severity test/​Orleans.Testing.Reminders/​ReminderDiagnosticObserver.cs — ownerFilter is invoked while holding the observer's private lock. Since ownerFilter is…
Issues resolved since last review (2)
Severity Finding
Medium severity src/​Orleans.Reminders.TestKit/​ReminderServiceLifecycleTestRunner.cs — The "no local owner before entering the loading window" assertion only checks immediately after… View resolved comment
Medium severity test/​Orleans.Testing.Reminders/​ReminderServiceLifecycleHarness.cs — WaitForOwnerCountAsync mixes two different owner-count notions: the fast-path uses GetOwners()… View resolved comment
Suppressed comments (4)

test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs:263

  • The XML docs say "stopped for an identity", but this API counts stops for the (grainId, reminderName) reminder, not for a particular identity instance.
    /// <summary>Gets the number of local reminder instances stopped for an identity.</summary>

test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs:272

  • The XML docs say "schedule changes for an identity", but the method counts schedule-change events for the reminder (grainId + reminderName) rather than for a particular identity.
    /// <summary>Gets the number of local schedule changes for an identity.</summary>

test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs:281

  • The XML docs say schedule-change waits are "for an identity", but the waiter is keyed by (grainId, reminderName) and waits for schedule changes for the reminder overall.
    /// <summary>Waits for the requested number of local schedule changes for an identity.</summary>

src/Orleans.Reminders.TestKit/ReminderServiceLifecycleTestRunner.cs:62

  • These interface docs mention "for an identity", but the methods are keyed by (grainId, reminderName) and count events for the reminder overall.
    /// <summary>Gets the number of local reminder instances stopped for an identity.</summary>
    int GetLocalStopCount(GrainId grainId, string reminderName);

    /// <summary>Gets the number of local schedule changes for an identity.</summary>
    int GetScheduleChangeCount(GrainId grainId, string reminderName);

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/Orleans.Reminders.TestKit/ReminderServiceLifecycleTestRunner.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/Orleans.Reminders.TestKit/README.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Copilot AI review requested due to automatic review settings August 28, 2026 07:46
@ReubenBond
ReubenBond force-pushed the rb-expand-reminder-lifecycle-conformance branch from baf92fa to 22e6d4b Compare August 28, 2026 07:46
Copilot started reviewing on behalf of ReubenBond August 28, 2026 07:47
View session
Copilot AI reviewed Aug 28, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Lite
Findings: 2 High severity · 3 Low severity

New issues introduced by this change (1)
Severity Finding
High severity test/​Extensions/​Orleans.AdoNet.Tests/​Reminders/​ReminderServiceLifecycleTests_AdoNet.cs — using UnitTests.General; is unused in this file and will trigger IDE0005 (remove unnecessary…
Pre-existing issues (4)
Severity Finding
High severity test/​Orleans.Testing.Reminders/​ReminderDiagnosticObserver.cs — ownerFilter is invoked while holding the observer's private lock. Since ownerFilter is… View comment
Low severity src/​Orleans.Reminders.TestKit/​README.md — The lifecycle README example creates a separate ReminderDiagnosticObserver, but ReminderTestClock… View comment
Low severity src/​Orleans.Reminders.TestKit/​ReminderServiceLifecycleTestRunner.cs — These interface docs mention "for an identity", but the harness methods are keyed by (grainId,… View comment
Low severity test/​Orleans.Testing.Reminders/​ReminderDiagnosticObserver.cs — The XML docs say "started for an identity", but this API is keyed by (grainId, reminderName) and… View comment
Suppressed comments (5)

test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs:254

  • The XML summary says this count is "for an identity", but the method signature (and underlying key) only scopes by (grainId, reminderName). This is misleading for consumers and for debugging lifecycle scenarios.
    /// <summary>Gets the number of local reminder instances started for an identity.</summary>

test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs:263

  • The XML summary says this count is "for an identity", but the method does not accept an identity and aggregates by (grainId, reminderName). Update the summary to match the actual behavior.
    /// <summary>Gets the number of local reminder instances stopped for an identity.</summary>

test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs:272

  • The XML summary refers to schedule changes "for an identity", but the count is keyed only by (grainId, reminderName). This can confuse readers trying to interpret the diagnostics.
    /// <summary>Gets the number of local schedule changes for an identity.</summary>

test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs:281

  • The XML summary says this waits for schedule changes "for an identity", but the API aggregates by (grainId, reminderName). Please align the documentation with what is actually being waited on.
    /// <summary>Waits for the requested number of local schedule changes for an identity.</summary>

src/Orleans.Reminders.TestKit/README.md:189

  • The README sample creates a ReminderDiagnosticObserver but never disposes it. Since the observer subscribes to global diagnostic streams, the sample should either use using var or use clock.DiagnosticObserver (which is disposed with the clock) to avoid leaking subscriptions in real-world usage.
var observer = ReminderDiagnosticObserver.Create(); // create before deployment

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread test/Extensions/Orleans.AdoNet.Tests/Reminders/ReminderServiceLifecycleTests_AdoNet.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Copilot AI review requested due to automatic review settings August 28, 2026 08:20
Copilot started reviewing on behalf of ReubenBond August 28, 2026 08:20
View session
Copilot AI reviewed Aug 28, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Lite
Findings: 2 High severity · 3 Low severity

Pre-existing issues (5)
Severity Finding
High severity test/​Extensions/​Orleans.AdoNet.Tests/​Reminders/​ReminderServiceLifecycleTests_AdoNet.cs — using UnitTests.General; is unused in this file and will trigger IDE0005 (remove unnecessary… View comment
High severity test/​Orleans.Testing.Reminders/​ReminderDiagnosticObserver.cs — ownerFilter is invoked while holding the observer's private lock. Since ownerFilter is… View comment
Low severity src/​Orleans.Reminders.TestKit/​README.md — The lifecycle README example creates a separate ReminderDiagnosticObserver, but ReminderTestClock… View comment
Low severity src/​Orleans.Reminders.TestKit/​ReminderServiceLifecycleTestRunner.cs — These interface docs mention "for an identity", but the harness methods are keyed by (grainId,… View comment
Low severity test/​Orleans.Testing.Reminders/​ReminderDiagnosticObserver.cs — The XML docs say "started for an identity", but this API is keyed by (grainId, reminderName) and… View comment
Suppressed comments (4)

Previously missed (3) — in code that hasn't changed since the last review.

test/Orleans.Testing.Reminders/ReminderServiceLifecycleHarness.cs:159

  • IsActiveSilo currently allocates a new ActiveSilos array on every predicate invocation (ActiveSilos => Order().ToArray()), which can add significant overhead since the predicate is evaluated repeatedly while waiters poll counts. You can avoid the per-call allocation by checking the cluster’s active-silo lookup directly.
    private bool IsActiveSilo(SiloAddress? siloAddress)
        => siloAddress is not null && ActiveSilos.Contains(siloAddress);

test/Orleans.Reminders.TestKit.Tests/ReminderServiceLifecycleConformanceTests.cs:122

  • If fixture.InitializeAsync() throws (e.g., deployment failure), DisposeAsync() is never called because initialization happens before the try/finally. Moving InitializeAsync inside the try ensures cleanup on partial initialization (same pattern applies to RunFaultAsync).
        var fixture = new ReminderServiceLifecycleFixture();
        await fixture.InitializeAsync();
        try

src/Orleans.Reminders.TestKit/ReminderServiceLifecycleTestRunner.cs:59

  • These APIs don’t accept a local reminder identity and appear to be counted per (grainId, reminderName). The XML docs currently say “for an identity”, which is misleading for consumers of the harness contract.

This issue also appears on line 61 of the same file.

    /// <summary>Gets the number of local reminder instances started for an identity.</summary>
    int GetLocalStartCount(GrainId grainId, string reminderName);

    /// <summary>Gets the number of local reminder instances stopped for an identity.</summary>
    int GetLocalStopCount(GrainId grainId, string reminderName);

src/Orleans.Reminders.TestKit/ReminderServiceLifecycleTestRunner.cs:62

  • The XML docs currently say “for an identity”, but this count is keyed by (grainId, reminderName). Consider updating the wording to match the actual parameters.
    /// <summary>Gets the number of local schedule changes for an identity.</summary>
    int GetScheduleChangeCount(GrainId grainId, string reminderName);

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Copilot AI review requested due to automatic review settings August 28, 2026 08:52
Copilot started reviewing on behalf of ReubenBond August 28, 2026 08:52
View session
Copilot AI reviewed Aug 28, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Lite
Findings: 2 High severity · 3 Low severity

Pre-existing issues (5)
Severity Finding
High severity test/​Extensions/​Orleans.AdoNet.Tests/​Reminders/​ReminderServiceLifecycleTests_AdoNet.cs — using UnitTests.General; is unused in this file and will trigger IDE0005 (remove unnecessary… View comment
High severity test/​Orleans.Testing.Reminders/​ReminderDiagnosticObserver.cs — ownerFilter is invoked while holding the observer's private lock. Since ownerFilter is… View comment
Low severity src/​Orleans.Reminders.TestKit/​README.md — The lifecycle README example creates a separate ReminderDiagnosticObserver, but ReminderTestClock… View comment
Low severity src/​Orleans.Reminders.TestKit/​ReminderServiceLifecycleTestRunner.cs — These interface docs mention "for an identity", but the harness methods are keyed by (grainId,… View comment
Low severity test/​Orleans.Testing.Reminders/​ReminderDiagnosticObserver.cs — The XML docs say "started for an identity", but this API is keyed by (grainId, reminderName) and… View comment
Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

src/Orleans.Reminders.TestKit/ReminderServiceLifecycleTestRunner.cs:162

  • Most lifecycle scenarios assume the reminder service is already started, but they never call _harness.WaitForStartupReadinessAsync(cancellationToken) before registering/updating reminders. Since xUnit does not guarantee running the StartupReadiness fact first, and BaseInProcessTestClusterFixture.DeployAsync does not await ReminderServiceStarted events, other scenarios can race reminder-service startup and intermittently time out/flap under load or slower providers.

Consider adding a startup-readiness barrier at the start of every RunReminderService_* scenario (or centralizing it in a helper) so scenario order cannot affect determinism.

            async () =>
            {
                var expectedStart = _harness.UtcNow.UtcDateTime + due;
                await grain.RegisterOrUpdateAsync(Name, due, Period).WaitAsync(cancellationToken);
                await _harness.WaitForOwnerCountAsync(grain.GetGrainId(), Name, 1, cancellationToken);

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Copilot AI review requested due to automatic review settings August 28, 2026 10:00
Copilot started reviewing on behalf of ReubenBond August 28, 2026 10:01
View session
Copilot AI reviewed Aug 28, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Lite
Findings: 2 High severity · 3 Low severity

Pre-existing issues (5)
Severity Finding
High severity test/​Extensions/​Orleans.AdoNet.Tests/​Reminders/​ReminderServiceLifecycleTests_AdoNet.cs — using UnitTests.General; is unused in this file and will trigger IDE0005 (remove unnecessary… View comment
High severity test/​Orleans.Testing.Reminders/​ReminderDiagnosticObserver.cs — ownerFilter is invoked while holding the observer's private lock. Since ownerFilter is… View comment
Low severity src/​Orleans.Reminders.TestKit/​README.md — The lifecycle README example creates a separate ReminderDiagnosticObserver, but ReminderTestClock… View comment
Low severity src/​Orleans.Reminders.TestKit/​ReminderServiceLifecycleTestRunner.cs — These interface docs mention "for an identity", but the harness methods are keyed by (grainId,… View comment
Low severity test/​Orleans.Testing.Reminders/​ReminderDiagnosticObserver.cs — The XML docs say "started for an identity", but this API is keyed by (grainId, reminderName) and… View comment
Suppressed comments (2)

Previously missed (2) — in code that hasn't changed since the last review.

test/Orleans.Testing.Reminders/ReminderServiceLifecycleHarness.cs:160

  • IsActiveSilo allocates and enumerates ActiveSilos (which calls GetActiveSilos().ToArray()) every time the predicate is invoked. Since this predicate is evaluated under ReminderDiagnosticObserver's lock (e.g., while processing LocalReminderStarted/Stopped events via GetActiveReminderCountCore), calling back into the cluster and allocating arrays inside that lock can add avoidable overhead and increases the risk of lock contention during churn-heavy scenarios.
    private bool IsActiveSilo(SiloAddress? siloAddress)
        => siloAddress is not null && ActiveSilos.Contains(siloAddress);

test/Orleans.Testing.Reminders/ReminderTestClock.cs:33

  • ReminderTestClock now always creates a ReminderDiagnosticObserver (Replay() buffer + subscriptions) even for tests which already create their own observer, resulting in duplicate buffering/subscription overhead. For example, ReminderTestKitClusterIntegrationTests creates both ReminderTestClock.Attach(...) and ReminderDiagnosticObserver.Create() (test/Orleans.Reminders.TestKit.Tests/ReminderTestKitClusterIntegrationTests.cs:172-177). Consider making observer creation opt-in or allowing an observer to be supplied so existing tests can reuse one observer instead of instantiating two.
    {
        TimeProvider = new FakeTimeProvider(initialTime);
        DiagnosticObserver = ReminderDiagnosticObserver.Create();
        MinimumReminderPeriod = minimumReminderPeriod;
        RefreshReminderListPeriod = refreshReminderListPeriod;

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ReubenBond

ReubenBond commented Aug 28, 2026

Copy link
Copy Markdown
Member Author

The current CI failures are deterministic and specific to the reminder lifecycle scenarios added by this PR. Across Windows/Linux and multiple provider matrices, ReminderService_OneSiloJoinLeaveTransfersOwnership and ReminderService_UpdateDoesNotRestartLocalOwner time out after two minutes with TaskCanceledException from ReminderServiceLifecycleTestRunner (including lines 464 and 209). This needs a branch synchronization/timeout fix before another retry. Failed run: https://github.com/dotnet/orleans/actions/runs/33161717052

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Copilot AI review requested due to automatic review settings August 28, 2026 10:38
Copilot started reviewing on behalf of ReubenBond August 28, 2026 10:39
View session
Copilot AI reviewed Aug 28, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Lite
Findings: 2 High severity · 3 Low severity

Pre-existing issues (5)
Severity Finding
High severity test/​Extensions/​Orleans.AdoNet.Tests/​Reminders/​ReminderServiceLifecycleTests_AdoNet.cs — using UnitTests.General; is unused in this file and will trigger IDE0005 (remove unnecessary… View comment
High severity test/​Orleans.Testing.Reminders/​ReminderDiagnosticObserver.cs — ownerFilter is invoked while holding the observer's private lock. Since ownerFilter is… View comment
Low severity src/​Orleans.Reminders.TestKit/​README.md — The lifecycle README example creates a separate ReminderDiagnosticObserver, but ReminderTestClock… View comment
Low severity src/​Orleans.Reminders.TestKit/​ReminderServiceLifecycleTestRunner.cs — These interface docs mention "for an identity", but the harness methods are keyed by (grainId,… View comment
Low severity test/​Orleans.Testing.Reminders/​ReminderDiagnosticObserver.cs — The XML docs say "started for an identity", but this API is keyed by (grainId, reminderName) and… View comment
Suppressed comments (2)

Previously missed (1) — in code that hasn't changed since the last review.

src/Orleans.Reminders.TestKit/ReminderServiceLifecycleTestRunner.cs:650

  • RemovePersistedRowAsync uses row.ETag! when calling IReminderTable.RemoveRow. ReminderEntry.ETag is nullable, so a provider which returns a null/empty ETag (or a partially-initialized row during failure) will cause a NullReferenceException/ArgumentNullException during cleanup, which is harder to diagnose than a structured conformance failure.
        if (!await _harness.ReminderTable.RemoveRow(grainId, name, row.ETag!).WaitAsync(cancellationToken))

test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs:255

  • The XML summaries for GetLocalStartCount/GetLocalStopCount/GetScheduleChangeCount say "for an identity", but these counters are keyed by (grainId, reminderName) and do not accept an instance identity argument. This wording is ambiguous given the LocalReminderStarted/Stopped events also carry an identity object.
    /// <summary>Gets the number of local reminder instances started for an identity.</summary>
    public int GetLocalStartCount(GrainId grainId, string reminderName)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ReubenBond ReubenBond mentioned this pull request Aug 28, 2026
ReminderTableRetryPolicy test timeouts become flaky under load #10906
Closed
Copilot AI review requested due to automatic review settings August 28, 2026 12:17
Copilot started reviewing on behalf of ReubenBond August 28, 2026 12:18
View session
Copilot AI reviewed Aug 28, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Lite
Findings: 1 High severity

New issues introduced by this change (1)
Severity Finding
High severity src/​Orleans.Reminders.TestKit/​ReminderServiceLifecycleTestRunner.cs — This adds new public API surface (IReminderServiceLifecycleHarness and…
Issues resolved since last review (5)
Severity Finding
High severity test/​Extensions/​Orleans.AdoNet.Tests/​Reminders/​ReminderServiceLifecycleTests_AdoNet.cs — using UnitTests.General; is unused in this file and will trigger IDE0005 (remove unnecessary… View resolved comment
High severity test/​Orleans.Testing.Reminders/​ReminderDiagnosticObserver.cs — ownerFilter is invoked while holding the observer's private lock. Since ownerFilter is… View resolved comment
Low severity src/​Orleans.Reminders.TestKit/​README.md — The lifecycle README example creates a separate ReminderDiagnosticObserver, but ReminderTestClock… View resolved comment
Low severity src/​Orleans.Reminders.TestKit/​ReminderServiceLifecycleTestRunner.cs — These interface docs mention "for an identity", but the harness methods are keyed by (grainId,… View resolved comment
Low severity test/​Orleans.Testing.Reminders/​ReminderDiagnosticObserver.cs — The XML docs say "started for an identity", but this API is keyed by (grainId, reminderName) and… View resolved comment
Suppressed comments (3)

Previously missed (1) — in code that hasn't changed since the last review.

test/Orleans.Reminders.TestKit.Tests/ReminderServiceLifecycleConformanceTests.cs:123

  • If fixture.InitializeAsync() throws, the fixture is never disposed because it's called before the try/finally. Moving InitializeAsync inside the try ensures partial cluster resources are cleaned up even when deployment fails.

This issue also appears in the following locations of the same file:

  • line 163
  • line 188
        var fixture = new ReminderServiceLifecycleFixture();
        await fixture.InitializeAsync();
        try
        {
            using var cancellation = CancellationTokenSource.CreateLinkedTokenSource(

test/Orleans.Reminders.TestKit.Tests/ReminderServiceLifecycleConformanceTests.cs:166

  • Same disposal hole here: if fixture.InitializeAsync() throws, the fixture won't be disposed. Wrapping InitializeAsync in the existing try/finally ensures cleanup even on partial initialization failures.
        var fixture = new ReminderServiceLifecycleFixture();
        await fixture.InitializeAsync();
        try
        {

test/Orleans.Reminders.TestKit.Tests/ReminderServiceLifecycleConformanceTests.cs:191

  • Same pattern in RunFaultAsync: fixture.InitializeAsync() is outside the try/finally, so a failure during initialization can leak the in-process cluster. Put InitializeAsync inside the try so fixture.DisposeAsync() always runs.
        var fixture = new ReminderServiceLifecycleFixture();
        await fixture.InitializeAsync();
        try
        {

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/Orleans.Reminders.TestKit/ReminderServiceLifecycleTestRunner.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Copilot AI review requested due to automatic review settings August 28, 2026 12:43
@ReubenBond

ReubenBond commented Aug 28, 2026

Copy link
Copy Markdown
Member Author

Follow-up on run 33161717052: the missing transitions were causal, not timeout-budget issues. A grain call can persist registration/update/removal on a silo which is not the reminder's ring owner, so the owner transition is only observable after the next reminder-table refresh. The runner now arms the owner/schedule wait before advancing exactly one refresh. Join/leave had also consumed one refresh before its final delivery advance, so advancing the original due time overshot the persisted first due; it now advances only the exact remaining interval. Cleanup removes only scenario rows by current ETag and advances one refresh for quiescence. Controlled TestKit regressions gate update reconciliation on that refresh and assert the join/leave advance sequence reaches, rather than passes, the due boundary. The later full matrix run is green across Windows/Linux and all provider jobs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Copilot started reviewing on behalf of ReubenBond August 28, 2026 12:44
View session
This was referenced Sep 9, 2026
Bump the dotnet group with 7 updates IvanMarkitan/dotnet-docs#846
Open
Bump the dotnet group with 5 updates BillWagner/docs#9804
Closed
Bump the dotnet group with 4 updates BillWagner/docs#9805
Closed
Bump the dotnet group with 4 updates BillWagner/docs#9806
Closed
Bump the dotnet group with 5 updates BillWagner/docs#9807
Closed
Bump the dotnet group with 7 updates zbalkan/docs#2339
Closed
Bump the dotnet group with 5 updates zbalkan/docs#2340
Closed
Bump the dotnet group with 6 updates zbalkan/docs#2341
Closed
Bump the dotnet group with 10 updates zbalkan/docs#2347
Open
chore(deps): Bump the nuget-patch-and-minor group with 25 updates petesramek/microservices-vs-virtual-actors#9
Closed
chore(deps): Bump Meziantou.Analyzer and 12 others petesramek/microservices-vs-virtual-actors#10
Closed
chore: Bump ManagedCode.Orleans.RateLimiting.Server and 4 others managedcode/Communication#160
Closed
Bump the dotnet group with 4 updates IvanMarkitan/dotnet-docs#869
Open
Bump the dotnet group with 6 updates IvanMarkitan/dotnet-docs#870
Open
Bump the dotnet group with 7 updates IvanMarkitan/dotnet-docs#877
Open
This was referenced Sep 16, 2026
Bump the dotnet group with 7 updates zbalkan/docs#2373
Open
Bump the dotnet group with 5 updates zbalkan/docs#2377
Open
Bump the dotnet group with 6 updates zbalkan/docs#2393
Open
Bump Microsoft.Orleans.Reminders and Microsoft.Orleans.Sdk en-gen/Wayfinder#266
Open
Bump Microsoft.Orleans.Reminders from 10.2.2 to 10.3.1 en-gen/Wayfinder#267
Closed
Bump Microsoft.Orleans.Reminders and Microsoft.Orleans.Reminders.AzureStorage en-gen/Wayfinder#268
Open
chore: Bump the orleans group with 2 updates pathosDev/actor-ts#1607
Closed
chore: Bump the minor-and-patch group with 3 updates pathosDev/actor-ts#1608
Merged
chore(deps): Bump the nuget-patch-and-minor group with 26 updates petesramek/microservices-vs-virtual-actors#11
Merged
chore(deps): Bump Meziantou.Analyzer and 24 others petesramek/microservices-vs-virtual-actors#12
Merged
Bump Microsoft.Orleans.Streaming from 10.2.0 to 10.3.1 Mystikweb/Orleans.Streams.Confluent#32
Merged
Bump the dotnet group with 7 updates IvanMarkitan/dotnet-docs#999
Closed
This was referenced Sep 23, 2026
Bump the dotnet group with 10 updates zbalkan/docs#2533
Closed
Bump the nuget group with 10 updates dotnet/docs#56226
Merged
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@ReubenBond
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.