Skip to content

Quality focused updates#3

Merged
jsedlak merged 4 commits into
mainfrom
feature/durable
Mar 3, 2026
Merged

Quality focused updates#3
jsedlak merged 4 commits into
mainfrom
feature/durable

Conversation

@jsedlak

@jsedlak jsedlak commented Mar 3, 2026

Copy link
Copy Markdown
Owner
  • Updates Durable to 10.x lib
  • Fixes in how outbox processing happens
  • Adds optional cleanup method for recipients
  • Internal unit testing fixes

@jsedlak jsedlak requested a review from Copilot March 3, 2026 12:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR upgrades Strata and its test suite to Orleans/Durable 10.x and adjusts grain lifecycle/outbox behavior, along with test-host configuration updates to support the new persistence approach.

Changes:

  • Bumps Strata package/library version to 1.1.0 and updates Orleans journaling dependency to 10.x.
  • Refactors JournaledGrain lifecycle wiring and adds optional recipient cleanup hook.
  • Updates journaling tests to use default in-memory grain storage and adjusts grains/state usage accordingly.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/Strata/Strata.csproj Version bump to 1.1.0 and Orleans.Journaling upgrade to 10.x
src/Strata/JournaledGrain.cs Lifecycle/outbox processing changes + recipient cleanup hook
src/Strata/CHANGELOG.md Adds 1.1.0 release notes
CHANGELOG.md Adds 1.1.0 release notes (root)
.changes/.version Bumps tracked version to 1.1.0
src/Strata.Journaling.Tests/Strata.Journaling.Tests.csproj Adds memory persistence package dependency
src/Strata.Journaling.Tests/JournalingTests/JournalingTestFixture.cs Configures default memory grain storage for tests
src/Strata.Journaling.Tests/JournalingTests/Grains/DelayedAccountGrain.cs Updates usings for Orleans 10.x changes
src/Strata.Journaling.Tests/JournalingTests/Grains/AccountViewModelGrain.cs Switches to [PersistentState] and modifies activation behavior
src/Strata.Journaling.Tests/JournalingTests/Grains/AccountGrain.cs Updates usings, comments out lifecycle overrides, and updates view-model on balance changes
Comments suppressed due to low confidence (1)

src/Strata.Journaling.Tests/JournalingTests/Grains/AccountViewModelGrain.cs:40

  • The state initialization on activation has been commented out, but both GetBalance() and UpdateBalance() dereference _state.State. If no record exists, _state.State can be null (since AccountViewModel is a class), causing a NullReferenceException. Restore proper initialization (e.g., set _state.State = new AccountViewModel() and write it when !_state.RecordExists) and remove the commented-out code block.
    // public override async Task OnActivateAsync(CancellationToken cancellationToken)
    // {
    //     await base.OnActivateAsync(cancellationToken);
// 
    //     if(!_state.RecordExists)
    //     {
    //         _state.State = new();
    //         //await _state.WriteStateAsync();
    //     }
    //     
    // }

    public Task<double> GetBalance() => Task.FromResult(_state.State.Balance);

    public async Task UpdateBalance(double newBalance)
    {
        _logger.LogInformation("Receiving balance update for account {0} to {1}", this.GetPrimaryKeyString(), newBalance);
        _state.State.Balance = newBalance;
        await _state.WriteStateAsync();

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Strata/JournaledGrain.cs
Comment thread src/Strata.Journaling.Tests/JournalingTests/Grains/AccountGrain.cs Outdated
Comment thread src/Strata/JournaledGrain.cs Outdated
Comment thread src/Strata/JournaledGrain.cs
Comment thread src/Strata/JournaledGrain.cs
@jsedlak jsedlak merged commit db52e1a into main Mar 3, 2026
1 check passed
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