Skip to content

Persist repeated news co-mention candidate suggestions - #58

Merged
CrisSTEM merged 2 commits into
mainfrom
feat/49-news-candidate-suggestions
Apr 22, 2026
Merged

Persist repeated news co-mention candidate suggestions #58
CrisSTEM merged 2 commits into
mainfrom
feat/49-news-candidate-suggestions

Conversation

@CrisSTEM

Copy link
Copy Markdown
Owner

Summary

  • persist candidate suggestions for repeated news.co_mention mentions
  • preserve the earliest first_seen_at while updating mention_count and last_seen_at
  • keep reruns stable by updating the existing suggestion instead of creating duplicates
  • add alert runtime coverage for positive detection, rerun suppression, noise filtering, catalog exclusions, and older mentions arriving later

Details

This implements the candidate suggestion path for alert rules using:

  • event_key: news.co_mention
  • condition.type: candidate_repeat_gte

The candidate extractor is intentionally conservative:

  • excludes tracked entity names and aliases already present in the pack
  • excludes binding query terms
  • filters common generic/noise phrases
  • only persists suggestions that repeat within the configured rule window

When the same candidate is seen again, the stored suggestion is updated in place:

  • mention_count keeps the highest observed count
  • first_seen_at keeps the earliest observed timestamp
  • last_seen_at keeps the latest observed timestamp

Testing

  • go test ./internal/alerts ./internal/storage
  • go test ./...
  • make ci

Deferred

  • broader candidate extraction heuristics outside the current conservative rules
  • additional candidate discovery event types beyond news.co_mention
  • reviewer workflow / UI changes for candidate_suggestions

Closes #49

@CrisSTEM
CrisSTEM merged commit ae69b08 into main Apr 22, 2026
1 check passed
@CrisSTEM
CrisSTEM deleted the feat/49-news-candidate-suggestions branch April 22, 2026 06:19
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.

feat(discovery): surface repeated untracked competitor candidates from news content

1 participant