WatchCheckRun watch.check-run@1

Generated at from openvibe-contracts v0.107.0 and openvibe-sdk v0.26.0.

Version
1.0.0
Owner
watch
Visibility
first-party
Status
planned
Compatibility
backward
Schema
https://openvibe.network/contracts/watch/check-run.v1.json

watch.check-run@1: one execution of a watch's check (plan T18), by schedule, manually, or from a delivered event or webhook. carrier names the mechanism that carried it; state is the terminal state (the same values the service's check_runs.state CHECK allows). observations is how many observations the run recorded and triggers how many conditions it fired; cost_usd is what the run cost. Rows are immutable.

Fields

FieldTypeRequiredDescriptionConstraints
idstringyes
  • pattern ^ckr_[0-9A-HJKMNP-TV-Z]{26}$
watch_idstringyes
  • pattern ^wch_[0-9A-HJKMNP-TV-Z]{26}$
triggerenumyes
  • one of "schedule", "manual", "event", "webhook"
carrierenumyes
  • one of "event", "webhook", "http", "feed", "api", "node", "run", null
started_atstringyes
  • format date-time
finished_atstringyes
  • format date-time
stateenumyes
  • one of "ok", "not_modified", "no_change", "changed", "condition_met", "http_error", "timeout", "parse_error", "rate_limited", "budget_exceeded", "skipped", "disabled"
http_statusinteger | nullyes
observationsintegeryes
  • minimum 0
triggersintegeryes
  • minimum 0
cost_usdnumberyes
  • minimum 0
detailstring | nullyes

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: http-changed
{
  "id": "ckr_01JAB2C3D4E5F6G7H8J9K0MNPT",
  "watch_id": "wch_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "trigger": "schedule",
  "carrier": "http",
  "started_at": "2026-10-05T09:00:00.000Z",
  "finished_at": "2026-10-05T09:00:01.250Z",
  "state": "changed",
  "http_status": 200,
  "observations": 1,
  "triggers": 0,
  "cost_usd": 0,
  "detail": null
}
Rejected: unknown-state
{
  "id": "ckr_01JAB2C3D4E5F6G7H8J9K0MNPT",
  "watch_id": "wch_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "trigger": "schedule",
  "carrier": "http",
  "started_at": "2026-10-05T09:00:00.000Z",
  "finished_at": "2026-10-05T09:00:01.250Z",
  "state": "exploded",
  "http_status": 200,
  "observations": 1,
  "triggers": 0,
  "cost_usd": 0,
  "detail": null
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('watch.check-run@1', value);   // { valid, errors: [{ path, message }] }