commit c6ef14973fb8e351531996eb7602e942bad586b0
parent cbf5013eee74a7595b285b4a77208b72e3b341b4
Author: triesap <tyson@radroots.org>
Date: Fri, 20 Feb 2026 23:30:04 +0000
conformance: add vector schema and fixture layout
Diffstat:
5 files changed, 94 insertions(+), 0 deletions(-)
diff --git a/conformance/README.md b/conformance/README.md
@@ -0,0 +1,18 @@
+# conformance vectors
+
+Conformance vectors define canonical cross-language expectations for the Rad Roots SDK contract.
+
+Each fixture must be deterministic and machine-readable.
+
+## layout
+
+- `schema/vector.schema.json`: json schema for vector documents
+- `vectors/events/*.json`: event model and tag/codec vectors
+- `vectors/trade/*.json`: trade model and transform vectors
+- `vectors/identity/*.json`: identity model vectors
+
+## rules
+
+- vectors are generated from canonical rust implementations.
+- every contract behavior change must update vectors in the same change.
+- language sdk test harnesses must validate vectors without local overrides.
diff --git a/conformance/schema/vector.schema.json b/conformance/schema/vector.schema.json
@@ -0,0 +1,47 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "https://radroots.org/sdk/conformance/vector.schema.json",
+ "title": "radroots sdk conformance vector",
+ "type": "object",
+ "required": [
+ "suite",
+ "contract_version",
+ "vectors"
+ ],
+ "properties": {
+ "suite": {
+ "type": "string",
+ "minLength": 1
+ },
+ "contract_version": {
+ "type": "string",
+ "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"
+ },
+ "vectors": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "id",
+ "kind",
+ "input",
+ "expected"
+ ],
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "kind": {
+ "type": "string",
+ "minLength": 1
+ },
+ "input": {},
+ "expected": {}
+ },
+ "additionalProperties": false
+ }
+ }
+ },
+ "additionalProperties": false
+}
diff --git a/conformance/vectors/events/listing_tags_full.v1.json b/conformance/vectors/events/listing_tags_full.v1.json
@@ -0,0 +1,27 @@
+{
+ "suite": "events",
+ "contract_version": "0.1.0",
+ "vectors": [
+ {
+ "id": "listing_tags_full_minimal_001",
+ "kind": "listing_tags_full",
+ "input": {
+ "d_tag": "listing-001",
+ "farm": {
+ "pubkey": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
+ "d_tag": "farm-001"
+ },
+ "product": {
+ "key": "coffee.green",
+ "title": "green coffee lot",
+ "category": "coffee"
+ },
+ "primary_bin_id": "bin-a",
+ "bins": []
+ },
+ "expected": {
+ "tags": []
+ }
+ }
+ ]
+}
diff --git a/conformance/vectors/identity/.gitkeep b/conformance/vectors/identity/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/conformance/vectors/trade/.gitkeep b/conformance/vectors/trade/.gitkeep
@@ -0,0 +1 @@
+