openvibers/openvibe.contracts Commits

v0.32.0: media.job.*@1 payloads are an event projection of the job, not the jobs API answer: id, app_id, object_id, type, status, attempts, max_attempts, error_code, cancel_requested, has_result and ISO 8601 UTC times (run_after, decided_at, created_at, updated_at, started_at, finished_at)

OP OpenVibers committed 23 Sept 2026 · tag v0.32. · 0 files, +0 −0

As first written (ccfecb7) the seven contracts carried queue.jobPublic: the tenant's params (object.split passes through up to 16 KB of whatever the caller sent), the caller's idempotency_key, the free-text error (raw handler/ffmpeg text), created_by/decided_by and owner_user_id (tenant-local user ids) and the result, which for thumbnail.regenerate is the thumbnail URL even of a private VOD. Events travel beyond the tenant and nothing consumes media.job.* yet, so the payload is narrowed before the tag: those fields are gone (additionalProperties false), error_code keeps the stable code, has_result says whether there is a result to GET, and each description says what is left out and why (GET the job with a tenant token for params/result/error). Times are date-time with a UTC pattern (…Z); SQLite times no longer validate. OpenVibe.Media ad2217b emits this shape (queue.jobEvent).

Per transition, from Media's queue.js: proposed status proposed, no error_code, has_result false, not decided, never started or finished; queued (new or approved) status queued, no error_code, has_result false, never started or finished; started status running, attempts >= 1, run_after cleared, started_at set, has_result false; retrying status queued, run_after and started_at set, has_result false; succeeded no error_code, run_after null, started_at and finished_at set; failed run_after null, started_at and finished_at set, has_result for a partial result; cancelled finished_at set, started_at only when it ran.

Fixtures rewritten: valid ones per transition (a tenant-wide scan, a second attempt keeping the last code, a failure without a code, a queued job cancelled without a reason…) and invalid ones carrying params, idempotency_key, created_by/owner_user_id, the error text, the result, decided_by, a SQLite time, a UTC-offset time, a retrying status. test/run.js checks each schema is exactly the projection, leaves the tenant's data out, has ISO UTC times and finished_at only on outcomes. Checked against payloads Media builds: 25 events over all seven transitions validate. generated/ regenerated; CHANGELOG 0.32.0 describes the projection.

This commit has no diff to show.