Skip to content

Conversation

rowanseymour
Copy link
Member

No description provided.

@Copilot Copilot AI review requested due to automatic review settings August 25, 2025 18:53
Copy link

@Copilot Copilot AI left a comment

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 enables persistence of call and optin events by uncommenting them in the persistence configuration and adding temporary time-gating logic for backfill purposes.

  • Enables persistence for call created/received events and optin started/stopped events
  • Adds temporary time gate to only persist these events after August 25, 2025
  • Reorders the eventPersistence map entries alphabetically

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

// time gate events types we need to backfill
// TODO remove
if e.Type() == events.TypeCallCreated || e.Type() == events.TypeCallReceived || e.Type() == events.TypeOptInStarted || e.Type() == events.TypeOptInStopped {
return e.CreatedOn().After(time.Date(2025, 8, 25, 20, 0, 0, 0, time.UTC))
Copy link
Preview

Copilot AI Aug 25, 2025

Choose a reason for hiding this comment

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

The hardcoded date in the time gate should be extracted to a constant or configuration to improve maintainability and make it easier to update when the TODO is addressed.

Suggested change
return e.CreatedOn().After(time.Date(2025, 8, 25, 20, 0, 0, 0, time.UTC))
return e.CreatedOn().After(timeGateDate)

Copilot uses AI. Check for mistakes.

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 40.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.02%. Comparing base (681fde9) to head (a9e6923).

Files with missing lines Patch % Lines
core/models/event.go 40.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #761      +/-   ##
==========================================
- Coverage   51.02%   51.02%   -0.01%     
==========================================
  Files         250      250              
  Lines       15100    15105       +5     
==========================================
+ Hits         7705     7707       +2     
- Misses       6588     6590       +2     
- Partials      807      808       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rowanseymour rowanseymour merged commit 62b3f5b into main Aug 25, 2025
5 checks passed
@rowanseymour rowanseymour deleted the persist_call_and_optin_events branch August 25, 2025 19:10
@github-actions github-actions bot locked and limited conversation to collaborators Aug 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants