MediaReplicaReadyPayload media.replica.ready@1
Generated at from
openvibe-contracts v0.97.0 and
openvibe-sdk v0.26.0.
- Version
- 1.0.0
- Owner
- media
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/events/payloads/media.replica.ready.v1.json
media.replica.ready v1 (OpenVibe.Media server/objects/tiering.js promote(), the recordPlacement in the transaction that upserts the verified media_locations row; PR #18). A replica finished copying and verified: the bytes read back from the target provider hash to the object's recorded content_hash before this is recorded. The payload carries where the copy lives and how big it is, so consumers and the placement view can act without reading the object API. A media.replica.requested with no ready for the same object is a copy that never verified (the bytes are removed, nothing was recorded). Envelope: subject { type: object, id: <object_id> }, visibility internal, priority low, actor service:media, source media. Sandbox tenants produce none.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
object_id | string | yes |
| |
app_id | string | null | yes | The tenant that owns the object: an app (live, tools…) or a developer project's production tenant (prj_…); null when the object has no tenant. |
|
class | enum | yes | The placement class the move was budgeted against (media.storage_policy classes; tiering.classOf). |
|
action | enum | yes | promote placed a copy on the provider, demote removed one. |
|
provider | enum | yes | The provider that now holds the verified replica. |
|
key | string | yes | The object key of the replica in the provider's bucket. |
|
bytes | integer | yes | The size in bytes that was copied and verified. |
|
replica_since | string | yes | When the verified replica was recorded, ISO 8601 UTC; a fresh row restarts the demotion residency clock. |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: promoted-video
{
"object_id": "med_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"app_id": "live",
"class": "video",
"action": "promote",
"provider": "r2",
"key": "vods/med_01JAB2C3D4E5F6G7H8J9K0MNPQ.mp4",
"bytes": 1048576,
"replica_since": "2026-10-03T12:00:00.000Z"
}Rejected: negative-bytes
{
"object_id": "med_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"app_id": "live",
"class": "video",
"action": "promote",
"provider": "r2",
"key": "vods/med_01JAB2C3D4E5F6G7H8J9K0MNPQ.mp4",
"bytes": -1,
"replica_since": "2026-10-03T12:00:00.000Z"
}Rejected: no-key
{
"object_id": "med_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"app_id": "live",
"class": "video",
"action": "promote",
"provider": "r2",
"bytes": 1048576,
"replica_since": "2026-10-03T12:00:00.000Z"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('media.replica.ready@1', value); // { valid, errors: [{ path, message }] }