PlacementResult platform.placement-result@1

Generated at from openvibe-contracts v0.79.0 and openvibe-sdk v0.25.0.

Version
1.0.0
Owner
network
Visibility
first-party
Status
active
Compatibility
backward
Decision
ADR-034
Schema
https://openvibe.network/contracts/platform/placement-result.v1.json

Where a workload was (or would be) placed and why: the chosen candidate, the reasons, and every candidate with its eligibility, estimated cost and latency (POST /api/v1/placement/explain; roadmap WS-Z9).

Fields

FieldTypeRequiredDescriptionConstraints
selectedstringyes
objectiveenumyes
  • one of "cheapest", "lowest-latency", "balanced", "private", "local-only", "first-party-only", "high-reliability", "correctness"
reasonsarray of string
candidatesarray of objectyes
  • items: no other fields
candidates[].idstringyes
candidates[].eligiblebooleanyes
candidates[].excluded_becausestring
candidates[].estimated_cost_usdnumber
  • minimum 0
candidates[].estimated_latency_msnumber
  • minimum 0
candidates[].scorenumber
candidates[].reasonsarray of string
plan_epochinteger
  • minimum 0
decided_atstringyes
  • format date-time

Examples

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

Valid: explained
{
  "selected": "off_oregon_1",
  "objective": "balanced",
  "reasons": [
    "meets the latency target",
    "already-paid capacity available",
    "estimated marginal cost 0"
  ],
  "candidates": [
    {
      "id": "off_oregon_1",
      "eligible": true,
      "estimated_cost_usd": 0,
      "estimated_latency_ms": 31,
      "score": 0.041
    },
    {
      "id": "off_community_331",
      "eligible": false,
      "excluded_because": "workload requires first-party trust"
    }
  ],
  "plan_epoch": 42,
  "decided_at": "2026-09-28T23:00:00Z"
}
Rejected: no-candidates
{
  "selected": "a",
  "objective": "balanced",
  "decided_at": "2026-09-28T23:00:00Z"
}

Validate

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