# OIP-0014 draft folder

The proposal and, under `patches/`, the exact edits acceptance would make. Nothing here changes the protocol until
the editors accept the proposal and its patches are applied in the same change. The patches are made against the
current tree and apply to it without any other draft.

| File | What it changes on acceptance |
|---|---|
| [`OIP-0014.md`](OIP-0014.md) | the proposal |
| `patches/spec.patch` | §4.2: one row for Policy, PolicyDecision, ConsentRecord, RetentionRule and DisclosureAccounting; §8: the Privacy row points to §8.1; new §8.1 "Data governance" (GOV-1 to GOV-10, `OBS-GOV-0001` to `OBS-GOV-0009`) |
| `patches/schemas-fixtures.patch` | new schemas `policy`, `policy-decision`, `consent-record`, `retention-rule`, `disclosure-accounting`; 12 positive and 43 negative fixtures; example documents in the OBSP-PROVIDER (source policy, retention rule), OBSP-CONSUMER (product policy, two decisions, accounting, withdrawn consent and its correction notice) and OBSP-GRID (product, personal data and CARE policies, three retention rules, accounting, withdrawn consent and its correction notice) sets |
| `patches/cases-invariants.patch` | reference evaluator `sdk/python/src/obsp/policy.py`; eight invariants in `sdk/python/src/obsp/governance_invariants.py`, registered in `conformance.py` before `run_case`; 29 unit tests in `sdk/python/tests/test_policy.py`; vectors `conformance/vectors/policy/` (README, eight policies, three consent records, 35 vectors); cases CT-PROVIDER-060, CT-PROVIDER-061, CT-CONSUMER-060 to CT-CONSUMER-062, CT-GRID-070 to CT-GRID-074; `registers/requirements.yaml` regenerated (GOV-1 to GOV-10 covered directly) |

Apply the patches in the order of the table. Acceptance removes `patches/` and adds the relation rows listed in the
proposal ("Standards cited"), then regenerates `registers/implements-edges.json`.

With these patches applied, every patch of OIP-0001 to OIP-0009 still applies: the specification row sits between
lines no other draft touches, no attestation file is changed (every case is an invariant case), the invariants
register before `run_case` (other drafts edit the invariant table and the end of `conformance.py`), and no case lists
`exchange` or `orchestrate`, whose requirement entries other drafts change. OIP-0015 changes `spec/OBSP-0.1.md`,
`conformance.py` and `registers/requirements.yaml` in other places; with both applied, regenerate
`registers/requirements.yaml` with `python3 tools/requirements.py`.

Check that every patch still applies to the current tree: `python3 -m unittest tests.test_validate -k draft_patches`.
Run the vectors alone: `PYTHONPATH=sdk/python/src python3 -m unittest discover -s sdk/python/tests -p test_policy.py`.
