Cluster related stories pre-AI and propagate grouped IDs through briefing flow#67
Draft
Copilot wants to merge 4 commits into
Draft
Cluster related stories pre-AI and propagate grouped IDs through briefing flow#67Copilot wants to merge 4 commits into
Copilot wants to merge 4 commits into
Conversation
Agent-Logs-Url: https://github.com/DevSecNinja/wazzup/sessions/89e73a10-8d6d-4a56-9e63-5d1f51cbe716 Co-authored-by: DevSecNinja <14926452+DevSecNinja@users.noreply.github.com>
Agent-Logs-Url: https://github.com/DevSecNinja/wazzup/sessions/89e73a10-8d6d-4a56-9e63-5d1f51cbe716 Co-authored-by: DevSecNinja <14926452+DevSecNinja@users.noreply.github.com>
Agent-Logs-Url: https://github.com/DevSecNinja/wazzup/sessions/89e73a10-8d6d-4a56-9e63-5d1f51cbe716 Co-authored-by: DevSecNinja <14926452+DevSecNinja@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add clustering for related stories before AI briefing generation
Cluster related stories pre-AI and propagate grouped IDs through briefing flow
May 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change adds deterministic pre-AI story clustering so multiple sources covering the same incident can be synthesized into one briefing item, while same-topic-but-different stories remain separate. It preserves deterministic ranking/diversity behavior by grouping before scoring and carrying grouped identity through downstream payloads.
Deterministic pre-AI clustering
cluster_related_stories()insrc/wazzup/feeds.py.item_priority, with clustered members stored inrelated_items.Pipeline integration
src/wazzup/pipeline.pyto run clustering on windowed items beforescore_items(...).Grouped identity propagation
src/wazzup/scoring.pyduplicate_group_idderivation to hash sorted grouped item IDs (item + related_items) for deterministic group tracking across scoring/prompt/briefing flows.Fixtures + coverage for clustering boundaries
tests/fixtures/story-clustering.xmlwith duplicate, near-duplicate, and same-topic-different-story examples.tests/test_feeds.py),tests/test_pipeline.py),relatedItemscontext (tests/test_ai.py).Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
feeds.feedburner.com/usr/bin/python3 python3 -m unittest discover -s tests(dns block)/usr/bin/python3 python3 -m unittest tests.test_feeds tests.test_ai tests.test_pipeline(dns block)/usr/bin/python3 python3 -m wazzup.pipeline --fixture-dir tests/fixtures --force-briefing auto(dns block)github.blog/usr/bin/python3 python3 -m unittest discover -s tests(dns block)/usr/bin/python3 python3 -m unittest tests.test_feeds tests.test_ai tests.test_pipeline(dns block)/usr/bin/python3 python3 -m wazzup.pipeline --fixture-dir tests/fixtures --force-briefing auto(dns block)googleonlinesecurity.blogspot.com/usr/bin/python3 python3 -m unittest discover -s tests(dns block)/usr/bin/python3 python3 -m unittest tests.test_feeds tests.test_ai tests.test_pipeline(dns block)/usr/bin/python3 python3 -m wazzup.pipeline --fixture-dir tests/fixtures --force-briefing auto(dns block)info.linuxserver.io/usr/bin/python3 python3 -m unittest discover -s tests(dns block)/usr/bin/python3 python3 -m unittest tests.test_feeds tests.test_ai tests.test_pipeline(dns block)/usr/bin/python3 python3 -m wazzup.pipeline --fixture-dir tests/fixtures --force-briefing auto(dns block)krebsonsecurity.com/usr/bin/python3 python3 -m unittest discover -s tests(dns block)/usr/bin/python3 python3 -m unittest tests.test_feeds tests.test_ai tests.test_pipeline(dns block)/usr/bin/python3 python3 -m wazzup.pipeline --fixture-dir tests/fixtures --force-briefing auto(dns block)rss.nytimes.com/usr/bin/python3 python3 -m unittest discover -s tests(dns block)/usr/bin/python3 python3 -m unittest tests.test_feeds tests.test_ai tests.test_pipeline(dns block)/usr/bin/python3 python3 -m wazzup.pipeline --fixture-dir tests/fixtures --force-briefing auto(dns block)thalpius.com/usr/bin/python3 python3 -m unittest discover -s tests(dns block)/usr/bin/python3 python3 -m unittest tests.test_feeds tests.test_ai tests.test_pipeline(dns block)/usr/bin/python3 python3 -m wazzup.pipeline --fixture-dir tests/fixtures --force-briefing auto(dns block)thehackernews.com/usr/bin/python3 python3 -m unittest discover -s tests(dns block)/usr/bin/python3 python3 -m unittest tests.test_feeds tests.test_ai tests.test_pipeline(dns block)/usr/bin/python3 python3 -m wazzup.pipeline --fixture-dir tests/fixtures --force-briefing auto(dns block)therecord.media/usr/bin/python3 python3 -m unittest discover -s tests(dns block)/usr/bin/python3 python3 -m unittest tests.test_feeds tests.test_ai tests.test_pipeline(dns block)/usr/bin/python3 python3 -m wazzup.pipeline --fixture-dir tests/fixtures --force-briefing auto(dns block)www.apple.com/usr/bin/python3 python3 -m unittest discover -s tests(dns block)/usr/bin/python3 python3 -m unittest tests.test_feeds tests.test_ai tests.test_pipeline(dns block)/usr/bin/python3 python3 -m wazzup.pipeline --fixture-dir tests/fixtures --force-briefing auto(dns block)www.autosport.com/usr/bin/python3 python3 -m unittest discover -s tests(dns block)/usr/bin/python3 python3 -m unittest tests.test_feeds tests.test_ai tests.test_pipeline(dns block)/usr/bin/python3 python3 -m wazzup.pipeline --fixture-dir tests/fixtures --force-briefing auto(dns block)www.bleepingcomputer.com/usr/bin/python3 python3 -m unittest discover -s tests(dns block)/usr/bin/python3 python3 -m unittest tests.test_feeds tests.test_ai tests.test_pipeline(dns block)/usr/bin/python3 python3 -m wazzup.pipeline --fixture-dir tests/fixtures --force-briefing auto(dns block)www.cisecurity.org/usr/bin/python3 python3 -m unittest discover -s tests(dns block)/usr/bin/python3 python3 -m unittest tests.test_feeds tests.test_ai tests.test_pipeline(dns block)/usr/bin/python3 python3 -m wazzup.pipeline --fixture-dir tests/fixtures --force-briefing auto(dns block)www.economist.com/usr/bin/python3 python3 -m unittest discover -s tests(dns block)/usr/bin/python3 python3 -m unittest tests.test_feeds tests.test_ai tests.test_pipeline(dns block)/usr/bin/python3 python3 -m wazzup.pipeline --fixture-dir tests/fixtures --force-briefing auto(dns block)www.engadget.com/usr/bin/python3 python3 -m unittest discover -s tests(dns block)/usr/bin/python3 python3 -m unittest tests.test_feeds tests.test_ai tests.test_pipeline(dns block)/usr/bin/python3 python3 -m wazzup.pipeline --fixture-dir tests/fixtures --force-briefing auto(dns block)www.espn.com/usr/bin/python3 python3 -m unittest discover -s tests(dns block)/usr/bin/python3 python3 -m unittest tests.test_feeds tests.test_ai tests.test_pipeline(dns block)/usr/bin/python3 python3 -m wazzup.pipeline --fixture-dir tests/fixtures --force-briefing auto(dns block)www.formula1.com/usr/bin/python3 python3 -m unittest discover -s tests(dns block)/usr/bin/python3 python3 -m unittest tests.test_feeds tests.test_ai tests.test_pipeline(dns block)/usr/bin/python3 python3 -m wazzup.pipeline --fixture-dir tests/fixtures --force-briefing auto(dns block)www.ft.com/usr/bin/python3 python3 -m unittest discover -s tests(dns block)/usr/bin/python3 python3 -m unittest tests.test_feeds tests.test_ai tests.test_pipeline(dns block)/usr/bin/python3 python3 -m wazzup.pipeline --fixture-dir tests/fixtures --force-briefing auto(dns block)www.motorsport.com/usr/bin/python3 python3 -m unittest discover -s tests(dns block)/usr/bin/python3 python3 -m unittest tests.test_feeds tests.test_ai tests.test_pipeline(dns block)/usr/bin/python3 python3 -m wazzup.pipeline --fixture-dir tests/fixtures --force-briefing auto(dns block)www.nba.com/usr/bin/python3 python3 -m unittest discover -s tests(dns block)/usr/bin/python3 python3 -m unittest tests.test_feeds tests.test_ai tests.test_pipeline(dns block)/usr/bin/python3 python3 -m wazzup.pipeline --fixture-dir tests/fixtures --force-briefing auto(dns block)www.nist.gov/usr/bin/python3 python3 -m unittest discover -s tests(dns block)/usr/bin/python3 python3 -m unittest tests.test_feeds tests.test_ai tests.test_pipeline(dns block)/usr/bin/python3 python3 -m wazzup.pipeline --fixture-dir tests/fixtures --force-briefing auto(dns block)www.racefans.net/usr/bin/python3 python3 -m unittest discover -s tests(dns block)/usr/bin/python3 python3 -m unittest tests.test_feeds tests.test_ai tests.test_pipeline(dns block)/usr/bin/python3 python3 -m wazzup.pipeline --fixture-dir tests/fixtures --force-briefing auto(dns block)www.zandvoortsecourant.nl/usr/bin/python3 python3 -m unittest discover -s tests(dns block)/usr/bin/python3 python3 -m unittest tests.test_feeds tests.test_ai tests.test_pipeline(dns block)/usr/bin/python3 python3 -m wazzup.pipeline --fixture-dir tests/fixtures --force-briefing auto(dns block)If you need me to access, download, or install something from one of these locations, you can either: