{
  "apiVersion": "bbi.dev/v1",
  "kind": "PStackEvidenceContract",
  "metadata": {
    "name": "program-causal-truth-plane",
    "version": 1
  },
  "spec": {
    "schema": "bbi.process-truth/v1",
    "maxBundleBytes": 1048576,
    "maxSurfaces": 128,
    "maxClaims": 64,
    "maxUnknowns": 32,
    "maxTextChars": 4096,
    "maxClockSkewSeconds": 30,
    "subjectKinds": [
      "process",
      "thread",
      "workflow_transaction",
      "network_stream",
      "storage_transfer",
      "alert_delivery"
    ],
    "requiredIdentity": {
      "process": {
        "host": "string",
        "boot_id": "uuid",
        "pid": "positive_int",
        "start_ticks": "positive_int",
        "uid": "int"
      },
      "thread": {
        "host": "string",
        "boot_id": "uuid",
        "pid": "positive_int",
        "tid": "positive_int",
        "process_start_ticks": "positive_int",
        "uid": "int"
      },
      "workflow_transaction": {
        "repository": "repository",
        "pr": "positive_int",
        "head": "sha40",
        "base": "sha40",
        "run_id": "positive_int",
        "run_attempt": "positive_int"
      },
      "network_stream": {
        "source": "string",
        "destination": "string",
        "protocol": "string",
        "flow_id": "string"
      },
      "storage_transfer": {
        "volume": "string",
        "source_node": "string",
        "target_node": "string",
        "engine": "string",
        "transfer_id": "string"
      },
      "alert_delivery": {
        "alertname": "string",
        "fingerprint": "string",
        "receiver": "string",
        "route_generation": "string"
      }
    },
    "surfaceStatuses": [
      "ok",
      "timeout",
      "timeout_unreaped_helper",
      "permission_denied",
      "not_found",
      "io_error",
      "unsupported",
      "truncated",
      "identity_race",
      "provider_ambiguous",
      "self_error"
    ],
    "surfaceAuthorities": [
      "kernel",
      "provider",
      "runtime",
      "filesystem",
      "network",
      "database",
      "operator"
    ],
    "blockingSurfacePatterns": [
      "procfs.stack",
      "procfs.wchan",
      "procfs.syscall",
      "ptrace.*",
      "provider.api.*",
      "network.stream.*",
      "database.scan.*"
    ],
    "claimKinds": ["fact", "inference", "hypothesis"],
    "claimStates": ["observed", "open", "confirmed", "falsified", "superseded"],
    "claimMethods": [
      "direct_observation",
      "derived_computation",
      "causal_inference",
      "operator_attestation"
    ],
    "claimPolarities": ["presence", "absence", "state"],
    "claimScopes": ["exact", "bounded", "universal"],
    "completenessStates": ["complete", "bounded", "partial"],
    "unknownStates": ["open", "answered", "superseded"],
    "transitionTypes": [
      "OBSERVE",
      "DISCRIMINATE",
      "SOURCE_FIXED",
      "MERGED",
      "REALIZED",
      "VERIFIED",
      "SOAKED",
      "SUPERSEDED",
      "CLOSED",
      "HYPOTHESIS_FALSIFIED",
      "BLOCKER_RECLASSIFIED",
      "PUBLISH_SHADOW",
      "PUBLISH_APP_ONLY_ADMISSION",
      "SHA_FENCED_MERGE",
      "RESTORE_REDUNDANCY",
      "TRACE_STREAM_FAILURE",
      "TRACE_ALERT_DELIVERY",
      "OWNER_DECISION"
    ],
    "maxEvidenceAgeSeconds": {
      "process": 300,
      "thread": 300,
      "workflow_transaction": 1800,
      "network_stream": 900,
      "storage_transfer": 900,
      "alert_delivery": 1800
    }
  }
}
