Canonical Observatory event envelope. Delivery is at-least-once unless a narrower transport contract proves otherwise; consumers must be idempotent by eventId and aggregate semantics.
| Field | Value |
| Identifier | urn:obsp:schema:v3.1:eventenvelope |
|---|
| Dialect | https://json-schema.org/draft/2020-12/schema |
|---|
| Used by functions | Time, Observe, Correct |
Properties
| Property | Required | Type | Description |
schemaVersion | yes | reference | |
eventId | yes | string | |
eventType | yes | string | |
authorityOwner | yes | string | |
aggregateUni | yes | reference | |
aggregateVersion | no | integer | |
tenantUni | no | reference | |
workspaceUni | no | reference | |
chronotopeUni | no | reference | |
validAt | no | reference | |
observationTime | no | reference | |
publicationTime | no | reference | |
recordedAt | yes | reference | |
sequence | no | integer | |
correlationId | yes | string | |
causationId | no | string | |
correctionOf | no | string | |
supersedes | no | array | |
policyDigest | no | reference | |
classification | no | string | |
evidenceRefs | no | array | |
payload | yes | object | Structured payload. Domain meaning is governed by payloadSchemaRef when present. |
payloadSchemaRef | no | string | |
extensions | no | reference | |
Positive fixtures
event-envelope.valid.json
Negative fixtures
event-envelope.bad-type.json: pattern at /eventType: 'node.enrolled' does not match '^observatory\\.[a-z0-9]+(\\.[a-z0-9]+){1,6}$'event-envelope.payload-not-object.json: type at /payload: 'not-an-object' is not of type 'object'
Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "urn:obsp:schema:v3.1:eventenvelope",
"title": "EventEnvelope",
"description": "Canonical Observatory event envelope. Delivery is at-least-once unless a narrower transport contract proves otherwise; consumers must be idempotent by eventId and aggregate semantics.",
"type": "object",
"required": [
"schemaVersion",
"eventId",
"eventType",
"authorityOwner",
"aggregateUni",
"recordedAt",
"correlationId",
"payload"
],
"properties": {
"schemaVersion": {
"$ref": "#/$defs/SchemaVersion"
},
"eventId": {
"type": "string",
"minLength": 8,
"maxLength": 128
},
"eventType": {
"type": "string",
"pattern": "^observatory\\.[a-z0-9]+(\\.[a-z0-9]+){1,6}$"
},
"authorityOwner": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"aggregateUni": {
"$ref": "#/$defs/Uni"
},
"aggregateVersion": {
"type": "integer",
"minimum": 0
},
"tenantUni": {
"$ref": "#/$defs/Uni"
},
"workspaceUni": {
"$ref": "#/$defs/Uni"
},
"chronotopeUni": {
"$ref": "#/$defs/Uni"
},
"validAt": {
"$ref": "#/$defs/IsoDateTime"
},
"observationTime": {
"$ref": "#/$defs/IsoDateTime"
},
"publicationTime": {
"$ref": "#/$defs/IsoDateTime"
},
"recordedAt": {
"$ref": "#/$defs/IsoDateTime"
},
"sequence": {
"type": "integer",
"minimum": 0
},
"correlationId": {
"type": "string",
"minLength": 8,
"maxLength": 128
},
"causationId": {
"type": "string",
"minLength": 8,
"maxLength": 128
},
"correctionOf": {
"type": "string",
"minLength": 8,
"maxLength": 128
},
"supersedes": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"minLength": 8,
"maxLength": 128
}
},
"policyDigest": {
"$ref": "#/$defs/Digest"
},
"classification": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"evidenceRefs": {
"type": "array",
"items": {
"$ref": "#/$defs/EvidenceRef"
}
},
"payload": {
"type": "object",
"description": "Structured payload. Domain meaning is governed by payloadSchemaRef when present.",
"additionalProperties": true
},
"payloadSchemaRef": {
"type": "string",
"minLength": 1,
"maxLength": 4096
},
"extensions": {
"$ref": "#/$defs/Extensions"
}
},
"$defs": {
"Uni": {
"type": "string",
"minLength": 8,
"maxLength": 256,
"pattern": "^[A-Za-z0-9][A-Za-z0-9:._/@-]{7,255}$"
},
"Digest": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9._-]{1,31}:[A-Fa-f0-9]{32,128}$"
},
"IsoDateTime": {
"type": "string",
"format": "date-time"
},
"EvidenceRef": {
"type": "object",
"required": [
"uri",
"digest"
],
"properties": {
"uri": {
"type": "string",
"minLength": 1,
"maxLength": 4096
},
"digest": {
"$ref": "#/$defs/Digest"
},
"kind": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"recordedAt": {
"$ref": "#/$defs/IsoDateTime"
}
},
"additionalProperties": false
},
"Extensions": {
"type": "object",
"propertyNames": {
"pattern": "^[a-z][a-z0-9]*(\\.[a-z][a-z0-9]*)+$"
},
"additionalProperties": true
},
"SchemaVersion": {
"type": "string",
"const": "3.1.0"
}
},
"additionalProperties": false
}