Przejdź do treści

Component Trace Record V1

Source schema: doc/schemas/component-trace-record.v1.schema.json

One independently parseable discriminated JSONL recording line.

Governing Basis

Project Lineage

Fields

Field Required Shape Description
schema yes const: component-trace-record.v1
schema/v yes const: 1
recording/sequence yes integer
record/kind yes enum: observation, gap, session, policy-transition, context-snapshot, recovery, recorder-diagnostic
record/value yes unspecified

Definitions

Definition Shape Description
ref string
digest string
timestamp string
policy-transition object
context-snapshot object
diagnostic object

Conditional Rules

Rule 1

When:

{
  "properties": {
    "record/kind": {
      "const": "observation"
    }
  },
  "required": [
    "record/kind"
  ]
}

Then:

{
  "properties": {
    "record/value": {
      "$ref": "component-communication-observation.v1.schema.json"
    }
  }
}

Rule 2

When:

{
  "properties": {
    "record/kind": {
      "const": "gap"
    }
  },
  "required": [
    "record/kind"
  ]
}

Then:

{
  "properties": {
    "record/value": {
      "$ref": "component-trace-gap.v1.schema.json"
    }
  }
}

Rule 3

When:

{
  "properties": {
    "record/kind": {
      "const": "session"
    }
  },
  "required": [
    "record/kind"
  ]
}

Then:

{
  "properties": {
    "record/value": {
      "$ref": "component-trace-session.v1.schema.json"
    }
  }
}

Rule 4

When:

{
  "properties": {
    "record/kind": {
      "const": "policy-transition"
    }
  },
  "required": [
    "record/kind"
  ]
}

Then:

{
  "properties": {
    "record/value": {
      "$ref": "#/$defs/policy-transition"
    }
  }
}

Rule 5

When:

{
  "properties": {
    "record/kind": {
      "const": "context-snapshot"
    }
  },
  "required": [
    "record/kind"
  ]
}

Then:

{
  "properties": {
    "record/value": {
      "$ref": "#/$defs/context-snapshot"
    }
  }
}

Rule 6

When:

{
  "properties": {
    "record/kind": {
      "enum": [
        "recovery",
        "recorder-diagnostic"
      ]
    }
  },
  "required": [
    "record/kind"
  ]
}

Then:

{
  "properties": {
    "record/value": {
      "$ref": "#/$defs/diagnostic"
    }
  }
}

Field Semantics

schema

  • Required: yes
  • Shape: const: component-trace-record.v1

schema/v

  • Required: yes
  • Shape: const: 1

recording/sequence

  • Required: yes
  • Shape: integer

record/kind

  • Required: yes
  • Shape: enum: observation, gap, session, policy-transition, context-snapshot, recovery, recorder-diagnostic

record/value

  • Required: yes
  • Shape: unspecified

Definition Semantics

$defs.ref

  • Shape: string

$defs.digest

  • Shape: string

$defs.timestamp

  • Shape: string

$defs.policy-transition

  • Shape: object

$defs.context-snapshot

  • Shape: object

$defs.diagnostic

  • Shape: object