Przejdź do treści

Exception Record v1

Source schema: doc/schemas/exception-record.v1.schema.json

Machine-readable schema for a first-class audit record describing one bounded operational or constitutional exception. This contract follows the minimum exception data model from EXCEPTION-POLICY and stays general enough for ordinary, emergency, and injunction cases. Emergency-specific activation fields belong in a later extension artifact rather than in this base record.

Governing Basis

Project Lineage

Requirements

Stories

Fields

Field Required Shape Description
schema/v yes const: 1 Schema version.
policy/id yes const: DIA-EXC-001 Normative policy anchor for this exception record family.
exception/id yes string Stable exception identifier, e.g. EXC-[federation]-[timestamp]-[nonce].
exception/type yes enum: ordinary, emergency, injunction Exception family as defined by EXCEPTION-POLICY.
owner/kind yes enum: node, participant, org, council, panel, system, role Actor class that owns responsibility for the exception effects.
owner/id yes string Identifier of the responsible owner. Canonical DID forms are used where available.
requester/kind yes enum: node, participant, org, council, panel, system, role Actor class that requested or initiated the exception.
requester/id yes string Identifier of the initiator. Canonical DID forms are used where available.
scope/summary yes string What roles, resources, procedures, or data are covered by the exception.
reason/summary yes string Business, ethical, safety, or constitutional rationale for the exception.
risk/level yes enum: low, medium, high, critical Risk class of the exception. High and critical records require non-empty approvals, monitoring metrics, and rollback conditions.
constitutional/basis yes array References to constitutional or normative clauses justifying the exception.
created/at yes string Timestamp when the exception record was created.
expires/at yes string Expiry timestamp. Consumers SHOULD enforce expires/at > created/at.
fail-closed/target yes string Return state the system must enter when the exception ends or is revoked.
trigger/refs no array Optional references to triggering signals, incidents, or cases that caused the exception to be opened.
approvals yes array Approval entries for the exception. High and critical records require at least one approval entry.
monitoring/metrics yes array Side-effect indicators or health metrics to watch while the exception remains active.
monitoring/review-at yes string Next mandatory review checkpoint. Consumers SHOULD enforce monitoring/review-at >= created/at.
rollback/conditions yes array Conditions under which the exception must be suspended or rolled back.
status yes enum: proposed, active, suspended, expired, rolled_back Lifecycle state of the exception record.
notes no string Optional human-readable notes.

Definitions

Definition Shape Description
approval object

Conditional Rules

Rule 1

When:

{
  "properties": {
    "owner/kind": {
      "const": "node"
    }
  },
  "required": [
    "owner/kind"
  ]
}

Then:

{
  "properties": {
    "owner/id": {
      "pattern": "^node:did:key:z[1-9A-HJ-NP-Za-km-z]+$"
    }
  }
}

Rule 2

When:

{
  "properties": {
    "owner/kind": {
      "const": "participant"
    }
  },
  "required": [
    "owner/kind"
  ]
}

Then:

{
  "properties": {
    "owner/id": {
      "pattern": "^participant:did:key:z[1-9A-HJ-NP-Za-km-z]+$"
    }
  }
}

Rule 3

When:

{
  "properties": {
    "owner/kind": {
      "const": "org"
    }
  },
  "required": [
    "owner/kind"
  ]
}

Then:

{
  "properties": {
    "owner/id": {
      "pattern": "^org:did:key:z[1-9A-HJ-NP-Za-km-z]+$"
    }
  }
}

Rule 4

When:

{
  "properties": {
    "owner/kind": {
      "const": "council"
    }
  },
  "required": [
    "owner/kind"
  ]
}

Then:

{
  "properties": {
    "owner/id": {
      "pattern": "^council:did:key:z[1-9A-HJ-NP-Za-km-z]+$"
    }
  }
}

Rule 5

When:

{
  "properties": {
    "owner/kind": {
      "const": "system"
    }
  },
  "required": [
    "owner/kind"
  ]
}

Then:

{
  "properties": {
    "owner/id": {
      "const": "system"
    }
  }
}

Rule 6

When:

{
  "properties": {
    "requester/kind": {
      "const": "node"
    }
  },
  "required": [
    "requester/kind"
  ]
}

Then:

{
  "properties": {
    "requester/id": {
      "pattern": "^node:did:key:z[1-9A-HJ-NP-Za-km-z]+$"
    }
  }
}

Rule 7

When:

{
  "properties": {
    "requester/kind": {
      "const": "participant"
    }
  },
  "required": [
    "requester/kind"
  ]
}

Then:

{
  "properties": {
    "requester/id": {
      "pattern": "^participant:did:key:z[1-9A-HJ-NP-Za-km-z]+$"
    }
  }
}

Rule 8

When:

{
  "properties": {
    "requester/kind": {
      "const": "org"
    }
  },
  "required": [
    "requester/kind"
  ]
}

Then:

{
  "properties": {
    "requester/id": {
      "pattern": "^org:did:key:z[1-9A-HJ-NP-Za-km-z]+$"
    }
  }
}

Rule 9

When:

{
  "properties": {
    "requester/kind": {
      "const": "council"
    }
  },
  "required": [
    "requester/kind"
  ]
}

Then:

{
  "properties": {
    "requester/id": {
      "pattern": "^council:did:key:z[1-9A-HJ-NP-Za-km-z]+$"
    }
  }
}

Rule 10

When:

{
  "properties": {
    "requester/kind": {
      "const": "system"
    }
  },
  "required": [
    "requester/kind"
  ]
}

Then:

{
  "properties": {
    "requester/id": {
      "const": "system"
    }
  }
}

Rule 11

When:

{
  "properties": {
    "risk/level": {
      "enum": [
        "high",
        "critical"
      ]
    }
  },
  "required": [
    "risk/level"
  ]
}

Then:

{
  "properties": {
    "approvals": {
      "minItems": 1
    },
    "monitoring/metrics": {
      "minItems": 1
    },
    "rollback/conditions": {
      "minItems": 1
    }
  }
}

Field Semantics

schema/v

  • Required: yes
  • Shape: const: 1

Schema version.

policy/id

  • Required: yes
  • Shape: const: DIA-EXC-001

Normative policy anchor for this exception record family.

exception/id

  • Required: yes
  • Shape: string

Stable exception identifier, e.g. EXC-[federation]-[timestamp]-[nonce].

exception/type

  • Required: yes
  • Shape: enum: ordinary, emergency, injunction

Exception family as defined by EXCEPTION-POLICY.

owner/kind

  • Required: yes
  • Shape: enum: node, participant, org, council, panel, system, role

Actor class that owns responsibility for the exception effects.

owner/id

  • Required: yes
  • Shape: string

Identifier of the responsible owner. Canonical DID forms are used where available.

requester/kind

  • Required: yes
  • Shape: enum: node, participant, org, council, panel, system, role

Actor class that requested or initiated the exception.

requester/id

  • Required: yes
  • Shape: string

Identifier of the initiator. Canonical DID forms are used where available.

scope/summary

  • Required: yes
  • Shape: string

What roles, resources, procedures, or data are covered by the exception.

reason/summary

  • Required: yes
  • Shape: string

Business, ethical, safety, or constitutional rationale for the exception.

risk/level

  • Required: yes
  • Shape: enum: low, medium, high, critical

Risk class of the exception. High and critical records require non-empty approvals, monitoring metrics, and rollback conditions.

constitutional/basis

  • Required: yes
  • Shape: array

References to constitutional or normative clauses justifying the exception.

created/at

  • Required: yes
  • Shape: string

Timestamp when the exception record was created.

expires/at

  • Required: yes
  • Shape: string

Expiry timestamp. Consumers SHOULD enforce expires/at > created/at.

fail-closed/target

  • Required: yes
  • Shape: string

Return state the system must enter when the exception ends or is revoked.

trigger/refs

  • Required: no
  • Shape: array

Optional references to triggering signals, incidents, or cases that caused the exception to be opened.

approvals

  • Required: yes
  • Shape: array

Approval entries for the exception. High and critical records require at least one approval entry.

monitoring/metrics

  • Required: yes
  • Shape: array

Side-effect indicators or health metrics to watch while the exception remains active.

monitoring/review-at

  • Required: yes
  • Shape: string

Next mandatory review checkpoint. Consumers SHOULD enforce monitoring/review-at >= created/at.

rollback/conditions

  • Required: yes
  • Shape: array

Conditions under which the exception must be suspended or rolled back.

status

  • Required: yes
  • Shape: enum: proposed, active, suspended, expired, rolled_back

Lifecycle state of the exception record.

notes

  • Required: no
  • Shape: string

Optional human-readable notes.

Definition Semantics

$defs.approval

  • Shape: object