Skip to content

Add integration test guarding event-log reducer registration#670

Open
jschick04 wants to merge 1 commit into
mainfrom
jschick/reducer-registration-store-test
Open

Add integration test guarding event-log reducer registration#670
jschick04 wants to merge 1 commit into
mainfrom
jschick/reducer-registration-store-test

Conversation

@jschick04

Copy link
Copy Markdown
Collaborator

Summary

Adds a Runtime.Tests integration test that exercises the real Fluxor reducer registration for the EventLog feature, so a dropped [ReducerMethod] attribute or a broken RegisterStateLibrary() assembly scan is caught.

Why

The existing EventLogStoreTests call Reducers.ReduceAddEvent(...) (and the other reducers) directly as static methods, so they stay green even if a reducer is no longer registered with the store - the silent-break class behind live-tail "Load New Events" not rendering. This test resolves IFeature<EventLogState> from a real AddFluxor(o => o.RegisterStateLibrary()) container and applies AddEventAction + NewEventBufferConsumedAction through the registered reducer path (ReceiveDispatchNotificationFromStore), asserting the buffer fills newest-first then drains.

Verification

  • Stripping [ReducerMethod] from ReduceAddEvent fails this test while the 52 existing direct-call reducer tests stay green (the gap it fills).
  • Runtime.Tests: 2031/2031 pass (baseline 2030 + this test).
  • Test-only; no production code changed.

Copilot AI review requested due to automatic review settings July 24, 2026 22:01

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.

Pull request overview

Adds a new Runtime test that validates Fluxor’s assembly scanning and reducer registration for the EventLogState feature by exercising the reducer pipeline end-to-end (via IFeature<EventLogState>), ensuring regressions like a removed [ReducerMethod] attribute are caught even when existing direct-call reducer tests remain green.

Changes:

  • Adds an integration-style test that resolves IFeature<EventLogState> from a real AddFluxor(...RegisterStateLibrary()) container.
  • Exercises AddEventAction buffering (newest-first) and NewEventBufferConsumedAction draining through the registered reducer path.

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

@jschick04
jschick04 marked this pull request as ready for review July 24, 2026 22:12
@jschick04
jschick04 requested a review from a team as a code owner July 24, 2026 22:12
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