CSE Roadmap

Core tier · about 4 hours · 12 parts

Part 3 of 12 · 2 min read

Pass only the fields the task needs; nothing undetected can leak

A field that was never sent cannot be missed by a detector, leaked in a log, or forgotten in a retention policy.

Think of packing for a day trip versus moving house. If you only bring what the day actually requires, you never have to worry about losing or exposing the things you left at home.

minimisation means collecting and passing only the fields a task actually needs, and because detection is never complete, the fields that are never sent are the only copies of personal data guaranteed not to leak. A field left out cannot be missed by a regex, logged by accident, or forgotten in a retention job, because it was never copied into the pipeline that those failures live in.

A worked example. The full customer record holds 12 fields, 6 of them personal (name, email, phone, address, date of birth, card's last four digits). The order-status task needs 2 fields, the refund task needs 3, and the reply task needs 3 -- and in every one of those three tasks, zero of the fields sent are personal ones. The task-to-fields mapping is a fixed allowlist per task, so a new task that needs a personal field has to add it explicitly; it can't acquire one by accident.

The key lines. From code/mini-privacy/privacy.py:

# from code/mini-privacy/privacy.py
PII_FIELDS = {"name", "email", "phone", "address", "dob", "card_last4"}
TASK_FIELDS = {"order_status": ("order_id", "order_status"), "refund": ("order_id", "order_total", "customer_id"), "reply": ("customer_id", "ticket_text", "order_status")}


def minimise(record, task):
    if task not in TASK_FIELDS:
        raise ValueError(f"unknown task {task!r}; known tasks: {sorted(TASK_FIELDS)}")
    keep = TASK_FIELDS[task]
    return {k: record[k] for k in keep}

Read it as: minimise can only return fields named in TASK_FIELDS[task]. It raises on an unknown task rather than defaulting to the whole record. There is no path through this function that accidentally returns more than the allowlist says. That is what makes minimisation a structural guarantee. It is not a habit someone has to remember to follow.

Minimisation

Minimisation is collecting and passing only the fields a task needs.

Example: the refund task needing customer_id but never email or address is minimisation doing its job silently -- those two personal fields were never at risk of being logged, leaked or redacted badly, because they were never in the data that reached the model in the first place.