Skip to content

fix(tests): register reminder services in LlmSessionTestBase#1066

Merged
Aaronontheweb merged 3 commits into
devfrom
fix/session-test-reminder-deps
May 18, 2026
Merged

fix(tests): register reminder services in LlmSessionTestBase#1066
Aaronontheweb merged 3 commits into
devfrom
fix/session-test-reminder-deps

Conversation

@Aaronontheweb
Copy link
Copy Markdown
Collaborator

Summary

WithNetclawActors() starts ReminderManagerActor, which resolves
SchedulingConfig, ReminderDefinitionStore, ReminderHistoryStore, and
IOperationalNotificationSink from DI. LlmSessionTestBase never registered
them, so the actor failed activation (ActorInitializationException
InvalidOperationException: Unable to resolve service) on every session
integration test — harmless to assertions, but spamming ERROR-level logs and
adding actor-startup churn.

This registers the four services in LlmSessionTestBase.ConfigureServices,
mirroring Netclaw.Daemon's Program.cs, before ConfigureSessionServices
so a derived class can still override them.

Verified via TRX log scan over LlmSessionIntegrationTests (34 tests):
Error while creating actor instance / Unable to resolve service /
ActorInitializationException all go 34 → 0, replaced by
ReminderManagerActor started (scheduling enabled=True).

Context

Surfaced while investigating a transient Windows CI timeout in
Delivery_failed_while_processing_newer_turn_is_ignored. This actor failure is
not the direct cause of that flake — the test passes on Linux/macOS with the
error present — but it is a genuine harness defect and removes a source of
startup ERROR-log churn on the path that flaked.

Test plan

  • LlmSessionIntegrationTests — 34/34 pass
  • TRX scan confirms the activation error is eliminated
  • dotnet slopwatch analyze — 0 issues
  • Add-FileHeaders.ps1 -Verify — pass

WithNetclawActors() starts ReminderManagerActor, which resolves
SchedulingConfig, ReminderDefinitionStore, ReminderHistoryStore, and
IOperationalNotificationSink from DI. LlmSessionTestBase never registered
them, so the actor failed activation (ActorInitializationException) on
every session integration test -- harmless to assertions but spamming
ERROR logs and adding startup churn that can tip slow CI runners over a
tight ExpectMsg timeout.

Register the four services (mirroring Netclaw.Daemon's Program.cs) before
ConfigureSessionServices so derived classes can still override them.
ReminderManagerActor now starts cleanly in all 34 LlmSessionIntegrationTests.
@Aaronontheweb Aaronontheweb added tests All issues related to testing, quality assurance, and smoke testing. bug Something isn't working labels May 18, 2026
@Aaronontheweb Aaronontheweb marked this pull request as ready for review May 18, 2026 14:33
@Aaronontheweb Aaronontheweb enabled auto-merge (squash) May 18, 2026 16:03
@Aaronontheweb Aaronontheweb merged commit c54d790 into dev May 18, 2026
20 checks passed
@Aaronontheweb Aaronontheweb deleted the fix/session-test-reminder-deps branch May 18, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working tests All issues related to testing, quality assurance, and smoke testing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant