openvibers/openvibe.contracts Commits

Contracts 0.175.0: media.usage.recorded (per-zone hourly rollups), media.object.s3 lists multipart, ADR-031 interim host (#133)

OP OpenVibers committed 29 days ago · tag v0.175 · 0 files, +0 −0

**`media.usage.recorded`** is Media's per-zone hourly rollups (ADR-031 section 8), as `common.usage-recorded@1`.

Every rollup names its zone twice:
- `resource`: the zone's OVRN, `ovrn:zone:<project>:object-zone/<zon_id>`;
- `dimension`: the zone id in lowercase.

The series:

| What | Capability | Unit |
|---|---|---|
| Stored bytes | `media.object.upload` | `byte_hours` (sampled each minute) |
| Writes | `media.object.upload`, `media.object.delete` | `requests` |
| Lists | `media.object.list` | `requests` |
| Reads | `media.object.read` | `requests` |
| Egress | `media.object.read` | `egress_bytes` |

Errors are mapped to `media.s3.<code>`.

**Changes:**
- **Catalog:** new event, first-party, ADR-014 like the other usage topics. Its payload `$ref`s the common rollup.
- **Manifests:** Media produces it; Network (project usage) and Zone (its usage view) consume it. `usage-topics` allows exactly those consumers.
- **`media.object.s3`** lists multipart uploads (Media#109): the operations, the limits, the routes. Copy and part copy still answer NotImplemented.
- **ADR-031:** the interim `s3.openvibe.network` host behind Cloudflare (HEAD forwarded as GET, Media#110, `private, no-store`), and "what v1 leaves out" brought up to date.
- **Fixtures:** valid `stored-byte-hours`, `reads-with-errors` and `egress` (revision 2); invalid `resource-of-a-person` and `carries-an-object-key`.

**Checks:** `npm test` passes all 19,996 checks. `compat.js v0.174.0` finds no breaking changes.

This commit has no diff to show.