Uploaded image for project: 'Subscription Watch'
  1. Subscription Watch
  2. SWATCH-3928

Ensure and Test Tally State Default Behavior for Event Processing

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • swatch-tally
    • 5
    • False
    • Hide

      None

      Show
      None
    • True
    • subs-swatch-thunder

      Context

      When Phase 2 HBI event processing goes live, tally state initialization becomes critical for capturing the right events. The tally_state table tracks the starting boundary of how far back to look for events during processing.

      Critical Issue: When initializing a tally_state record for the first time (no matching previous entry exists), the default behavior must set the boundary to "today minus one day" to ensure all events from the previous day are captured.

      Impact: Without proper default behavior, the first-time rollout could miss events or process incorrect time ranges, leading to incomplete or inaccurate tally calculations.

      Acceptance Criteria

      • Confirmed that tally state initialization sets default to "today minus one day"
      • Timezone handling verified correct and consistent
      • Default behavior works across all service types
      • Comprehensive unit tests covering tally state initialization logic
      • Integration tests using TestContainers for database scenarios
      • Edge case testing (timezone boundaries, concurrent access, etc.)
      • No regressions in existing tally processing functionality
      • Test suite executes efficiently (no significant performance impact)
      • Code behavior clearly documented

              Unassigned Unassigned
              lburnett0 Lindsey Burnett
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: