# OIP-0019 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 proposal requires OIP-0007; the patches
are made against the current tree and apply to it on their own (acceptance order in the proposal).

| File | What it changes on acceptance |
|---|---|
| [`OIP-0019.md`](OIP-0019.md) | the proposal |
| `patches/spec.patch` | §5.5: one bullet after "Field-side transport" naming the five field connector bindings (no key word, so no requirement id changes) |
| `patches/bindings-common.patch` | `tests/connector_golden.py` (the checks the five binding tests share: the OIP-0007 contract checked structurally with this proposal's enum additions, schema and register checks once those exist, golden digests, the derive and break harness) and the demo-binding helper of `tests/test_validate.py` made independent of the shipped bindings |
| `patches/bindings-lorawan.patch` | `bindings/lorawan/` (profile, manifest, `mapping.yaml` with the byte layouts, `connector-mapping.json`, five positive and five negative examples), `tests/test_lorawan_binding.py` |
| `patches/bindings-opcua.patch` | `bindings/opcua/` (profile, manifest, `mapping.yaml` with the data type, severity and UNECE-to-UCUM unit tables, `connector-mapping.pubsub.json`, `connector-mapping.read.json`, four positive and five negative examples), `tests/test_opcua_binding.py` |
| `patches/bindings-wis2-ingest.patch` | `bindings/wis2-ingest/` (profile, manifest, `mapping.yaml` with the descriptor and quality tables, `connector-mapping.json`, four positive and four negative examples), `tests/test_wis2_ingest_binding.py` |
| `patches/bindings-nmea.patch` | `bindings/nmea/` (profile, manifest, `mapping.yaml` with the sentence and field tables and the NMEA 2000 parameter groups, `connector-mapping.json`, seven positive and four negative examples), `tests/test_nmea_binding.py` |
| `patches/bindings-sdi12.patch` | `bindings/sdi12/` (profile, manifest, `mapping.yaml` with the command table, `connector-mapping.json`, five positive and four negative examples), `tests/test_sdi12_binding.py` |
| `patches/registers.patch` | `relations.yaml`: new rows `EXT-LORAWAN`, `EXT-OPCUA`, `EXT-WMOBUFR`, `EXT-NMEA`, `EXT-SDI12` at the end of `external`; `implements-edges.json` regenerated (46 edges); `requirements.yaml` regenerated (the §5.5 requirements gain the five cases) |
| `patches/cases.patch` | cases CT-NODE-080 to CT-NODE-084, one per binding, changed from manual to automated (kind `invariant`): `sdk/python/src/obsp/inv_oip0019.py` registers `binding-replay-<id>` (`obsp.golden.replay`: the implementer supplies the digest of the output its connector produced for each golden example, and the suite compares it with the golden output; a negative example must not give its claimed output), hooked in `conformance.py`; replay evidence for the five bindings in the OBSP-NODE example set and its negative set; `sdk/python/tests/test_inv_oip0019.py`. The attestations of the manual form are gone |

Apply all nine patches together (in any order): the registers name the binding folders, the bindings name the cases,
and the binding tests need the shared helper. Acceptance removes `patches/`.

Overlaps with other drafts (each proposal applies on its own; whichever is accepted second resolves these):
`registers.patch` regenerates `implements-edges.json` (the `count` line) as OIP-0005, OIP-0006, OIP-0008 and OIP-0009 do,
and appends to the end of `relations.yaml` as OIP-0005 does: append the rows and run `python3 tools/build_edges.py` and
`python3 tools/requirements.py`. The `tests/test_validate.py` hunk of `bindings-common.patch` is the same text as
OIP-0009's (`bindings-wis2.patch`); the second one drops it. The spec bullet sits on lines no other draft touches.

Check that every patch still applies to the current tree: `python3 -m unittest tests.test_validate -k draft_patches`.

## What stays manual

Nothing of the five cases is left to attestation. One clause is not shown by documents and is not checked by the suite:
that an OPC UA client writes nothing to the server (CT-NODE-081; a read-only client has no output to compare). The replay
checks the connector on the golden inputs only; behaviour on other inputs is not tested.
