fix(campaign): suppress overlapping aggregate cells
This commit is contained in:
@@ -268,15 +268,24 @@ def _build_aggregate_campaign_report(
|
||||
outcome_values,
|
||||
threshold=policy.small_cell_threshold,
|
||||
)
|
||||
outcome_suppression_applied = denominator.suppressed or any(
|
||||
item.suppressed for item in outcomes.values()
|
||||
)
|
||||
inactive_entries = _inactive_entry_count(version)
|
||||
standalone_counts = {
|
||||
"inactive_source_entries": _suppress_standalone_count(
|
||||
inactive_entries,
|
||||
threshold=policy.small_cell_threshold,
|
||||
),
|
||||
"excluded_or_blocked_jobs": _suppress_standalone_count(
|
||||
facts.excluded_or_blocked,
|
||||
threshold=policy.small_cell_threshold,
|
||||
# This population count overlaps the outcome partition, so exposing it
|
||||
# can make a suppressed outcome recoverable through subtraction.
|
||||
"excluded_or_blocked_jobs": (
|
||||
AggregateCount(value=None, suppressed=True)
|
||||
if outcome_suppression_applied
|
||||
else _suppress_standalone_count(
|
||||
facts.excluded_or_blocked,
|
||||
threshold=policy.small_cell_threshold,
|
||||
)
|
||||
),
|
||||
}
|
||||
suppression_applied = denominator.suppressed or any(
|
||||
@@ -322,7 +331,8 @@ def _build_aggregate_campaign_report(
|
||||
suppression_applied=suppression_applied,
|
||||
rule=(
|
||||
"Positive counts below the threshold are hidden. At least one additional "
|
||||
"count or the denominator is hidden when needed to prevent subtraction."
|
||||
"count or the denominator is hidden when needed to prevent subtraction. "
|
||||
"Overlapping population counts are hidden whenever outcome suppression applies."
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user