You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(hive): suggestion contributor_count counts observations, not distinct contributors #928
In HiveAggregator.suggestions (src/synapsekit/hive/aggregator.py), contributor_count is computed as len(values), where values is the list of pattern values across all envelopes. Because a single contributor can submit multiple envelopes per day (up to max_contributions_per_day), this counts observations, not distinct contributors — inflating both contributor_count and the derived confidence, which are surfaced to users as a trust signal.
Fix: track the set of distinct contributor_ids exhibiting each pattern key and use its length for contributor_count. Add a regression test where one contributor submits N envelopes for the same key and asserts contributor_count reflects distinct contributors, not observations.
Fixed in #924 (commit 7576299) — contributor_count now counts distinct contributor_ids per pattern key, with a regression test. CI green. Lands on main when #924 merges.
Activity
fix(hive): serialize SQLite access and count distinct contributors
fix(hive): serialize SQLite access and count distinct contributors
AmitoVrito commentedon Aug 12, 2026
Fixed in #924 (commit
7576299) —contributor_countnow counts distinctcontributor_ids per pattern key, with a regression test. CI green. Lands on main when #924 merges.