ResourceControlResult common.resource-control-result@1
Generated at from
openvibe-contracts v0.97.0 and
openvibe-sdk v0.26.0.
- Version
- 1.0.0
- Owner
- contracts
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Decision
- ADR-048
- Schema
https://openvibe.network/contracts/common/resource-control-result.v1.json
common.resource-control-result@1: the authority's answer to a common.resource-control-request@1 (ADR-048, plan T13). state is the outcome, not the resource's own state: done (applied), pending (accepted and asynchronous; the authority reports completion later on its events), refused (a policy or confirmation gate said no) or failed (an error). State rules: refused carries problem or confirmation_required; failed carries problem; done and pending carry neither; confirmation_required appears only on refused. result carries the authority's own response document and never another service's rows. The state rules are checked by contracts.resources.checkControlResult.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
action | string | yes | ||
resource | common.resource-name | |||
state | enum | yes |
| |
result | object | |||
confirmation_required | object | The action needs its owner's approval; retry the same request with this confirmation_id once approved. |
| |
confirmation_required.confirmation_id | string | yes |
| |
confirmation_required.reason | string | yes | ||
problem | errors.problem | RFC 9457 body when refused or failed. | ||
at | string | yes |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: done-create
{
"action": "create",
"resource": "ovrn:events:prj_01K6R2Z8C4V7M9Q3T5W1X2Y3Z4:queue/evq_01K6R3A1B2C3D4E5F6G7H8J9KD",
"state": "done",
"result": {
"id": "evq_01K6R3A1B2C3D4E5F6G7H8J9KD",
"name": "orders"
},
"at": "2026-10-04T12:00:01Z"
}Valid: failed-problem
{
"action": "start",
"resource": "ovrn:run:prj_01K6R2Z8C4V7M9Q3T5W1X2Y3Z4:sandbox/run_01K6R3A1B2C3D4E5F6G7H8J9KA",
"state": "failed",
"problem": {
"type": "https://openvibe.network/problems/run.capacity",
"title": "No capacity",
"status": 503,
"code": "run.capacity"
},
"at": "2026-10-04T12:00:03Z"
}Valid: pending
{
"action": "stop",
"resource": "ovrn:run:prj_01K6R2Z8C4V7M9Q3T5W1X2Y3Z4:sandbox/run_01K6R3A1B2C3D4E5F6G7H8J9KA",
"state": "pending",
"at": "2026-10-04T12:00:00Z"
}Valid: refused-confirmation
{
"action": "delete",
"resource": "ovrn:run:prj_01K6R2Z8C4V7M9Q3T5W1X2Y3Z4:sandbox/run_01K6R3A1B2C3D4E5F6G7H8J9KA",
"state": "refused",
"confirmation_required": {
"confirmation_id": "cnf_01K6R3A1B2C3D4E5F6G7H8J9KE",
"reason": "Deleting a sandbox discards its files."
},
"at": "2026-10-04T12:00:02Z"
}Rejected: done-with-confirmation
{
"action": "delete",
"state": "done",
"confirmation_required": {
"confirmation_id": "cnf_01K6R3A1B2C3D4E5F6G7H8J9KE",
"reason": "x"
},
"at": "2026-10-04T12:00:02Z"
}Rejected: failed-without-problem
{
"action": "start",
"state": "failed",
"at": "2026-10-04T12:00:03Z"
}Rejected: no-at
{
"action": "stop",
"state": "done"
}Rejected: refused-bare
{
"action": "delete",
"state": "refused",
"at": "2026-10-04T12:00:02Z"
}Rejected: unknown-state
{
"action": "stop",
"state": "maybe",
"at": "2026-10-04T12:00:00Z"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('common.resource-control-result@1', value); // { valid, errors: [{ path, message }] }