# Material changes and re-consent

> How consent-kit decides whether a change to the registry alters what visitors were told, when they are asked again, and which files record the decision: the lock, the review file and the release…

How consent-kit decides whether a change to the registry alters what visitors were told, when they are asked again, and which files record the decision: the lock, the review file and the release history.

## The problem

Consent is given for something specific: a purpose, described in certain words, with certain data, recipients and storage periods. When any of that changes, the earlier consent no longer covers it. Asking again on every edit would train visitors to click through; never asking would make the consent worthless.

consent-kit handles this with a rule that a machine can apply, and a place for a person to sign where the machine cannot judge.

## The parts

| Part | Where | What it is |
| --- | --- | --- |
| Policy hash | computed | SHA-256 of the registry in canonical form. Two registries with the same hash say the same thing. |
| Purpose version | `purposes[].version` | A counter per purpose. It goes up by exactly 1 when what the visitor was told about that purpose changes. |
| Revision | the lock file, the generated banner config | One global counter. CookieConsent shows the banner again when it goes up. |
| Lock file | `privacy.lock.json` | The last released registry, and the history of every release. |
| Review file | `privacy.review.json` | A person's sign-off on pending changes. |

```mermaid
flowchart LR
  E[edit the registry] --> C{consent-kit check}
  L[(privacy.lock.json)] --> C
  C -->|material change| V[bump purpose version]
  C -->|needs a person| R[add key to privacy.review.json]
  V --> C
  R --> C
  C -->|passes| REL[consent-kit release]
  REL --> L
  REL -->|consent purpose affected| REV[revision + 1: visitors are asked again]
```

## The lock is the baseline

`consent-kit release` stores the registry, in canonical form, in `privacy.lock.json`. From then on, `check` and `diff` compare the working registry with that copy. The comparison is semantic, not textual: entries are matched by id, reordering is not a change, and every difference becomes a named change such as `purpose.retention_longer` or `artefact.added`.

Before the first release there is no baseline. Everything is new and every visitor is asked for the first time.

## Four classifications

Every change kind has a default classification.

| Classification | Meaning | Example |
| --- | --- | --- |
| `not_material` | Nothing the visitor was told gets weaker | A shorter retention, a removed cookie |
| `needs_confirmation` | Presumed harmless, but not provable | A typo fix in a consent text, a new translation, a changed DPA link, a loosened CSP |
| `material` | Alters what the visitor was told | A new cookie, a longer retention, a new recipient, a reworded description |
| `needs_review` | Material, and the compiler will not judge it | A changed lawful basis, newly introduced automated decision-making, a data category flagged as special |

The rule leans towards asking. Additions and extensions are material; removals and reductions are not. A reworded text is material, because a program cannot tell whether two sentences mean the same thing. The single exception is an edit that provably changes no meaning: letter case, whitespace, or punctuation away from digits. Even that needs a person's confirmation when it touches a consent purpose.

A field the diff does not recognise is treated as material. Unknown means strict.

The complete table is in [change classifications](/docs/manual/reference/change-classifications/).

## Which purposes a change affects

A change is charged to the purposes it touches. A new cookie affects the purposes that cookie is bound to. A change to a processor affects every purpose that uses it. A change to the controller affects every purpose.

The basis of each affected purpose then decides the consequence:

- A material change to a **consent** purpose means re-consent.
- A material change to a purpose on **another basis** means a notice update: the privacy information changes, but nobody is asked, because nothing the visitor agreed to is involved.

## The version bump is the author's signature

When a change is material for a purpose, `check` fails until that purpose's `version` has gone up by exactly 1:

```
error  version/missing_bump  Purpose "analytics" changed materially but is still at version 1; bump it to 2.
```

This looks redundant, since the tool already knows. It is deliberate. The bump is written by the person making the change, in the same commit, where a reviewer sees it. Nobody can cause a re-consent, or avoid one, without it showing in the diff of the registry. The reverse is checked too: a bump without a material change is a warning, because it would ask visitors again for no reason.

## Where a person signs

Two classifications wait for a human:

- `needs_confirmation`: the change is presumed not material. A person confirms that reading.
- `needs_review`: the change is material, and the build is blocked until someone has looked at it.

In both cases the person adds the change's key to `acknowledged` in `privacy.review.json`:

```json
{
  "acknowledged": [
    "processor.metadata_changed@processors.plausible.privacyUrl",
    "csp.loosened@csp.allow.style-src.'unsafe-inline'"
  ]
}
```

A person can also escalate. `overrides` raises a change to a stricter classification, for instance when a "typo fix" does change the meaning:

```json
{
  "overrides": {
    "purpose.description_formatting_changed@purposes.analytics.description.en": "material"
  }
}
```

Overrides only go up. An override that would lower a classification is ignored and reported. There is no way to tell consent-kit that a new cookie is not material.

The review file is the record of the sign-off, and your version control is the record of who made it. `release` empties both lists, because they referred to changes that are now released.

## The revision

CookieConsent has one revision number for the whole banner. consent-kit keeps it in the lock file and writes it into the generated configuration.

A release raises the revision by exactly 1 when a consent purpose was added or materially changed. Otherwise it stays.

```
Visitors will be asked to consent again: revision 1 -> 2.
```

```
Visitors will not be asked again: revision stays at 2.
```

Re-consent is global. When the revision goes up, every visitor is asked about every consent purpose again, not only the one that changed. Purpose versions are tracked individually and recorded in every receipt, so the record says exactly which version of each purpose a visitor decided on.

`build` uses the pending revision: the one the next release will carry. A build of an unreleased registry already shows the banner as it will be after the release.

## The release history

Each release appends one entry to `history` in the lock file: its revision, policy hash, time, the consent purposes with their versions, and whether it sent receipts. Earlier entries are never rewritten.

The history has one consumer: the receipt manifest. A visitor can have a page open, or cached, from an older release, and make a choice in it. That receipt names the older policy hash and the older purpose versions, and it is a real decision. The manifest lists every released policy so that the receipt endpoint accepts it, checked against that policy's own versions. See [consent receipts](/docs/manual/concepts/receipts/).

## What this does and does not give you

It gives you a registry whose every change since the last release is named, classified, bumped where it must be, and signed off where the tool cannot judge. It gives a reviewer one place to look.

It does not decide what is material in law. The table is a conservative engineering reading: it leans towards asking again, and it lets a person escalate but never downgrade. Whether a particular change needs fresh consent is a legal question that the table cannot settle. Treat `needs_review` as the tool telling you to ask someone who can.

## Next

- [Release a policy change](/docs/manual/guides/release-a-policy-change/): the steps.
- [Project files](/docs/manual/reference/project-files/): the lock and review file formats.
