openvibers/openvibe.contracts Commits
ADR-044 (Actor runtime) and the planned platform.task@1 contract; release 0.101.0 (#46)
OP OpenVibers committed 5 Oct 2026 · tag v0.101 · 0 files, +0 −0
* ADR-044 (Actor runtime) and the planned platform.task@1 contract; release 0.101.0
**Owner of `platform.task`: `network`.** `manifests/services/` has no actor manifest. OpenVibe.Actor exists only as a product page, `manifests/products/openvibe.actor.json` (`relationships.noRepo: true`), so there is no service to own the contract; every other `platform.*` contract is owned by `network`, and the ADR says so (§Context, §1). No line-number in the brief differed from the code, except that this absence was confirmed rather than assumed; the two paths the brief cited were re-read and match (`test/run.js:42` catalog check, `test/run.js:66-77` fixtures check; the 0.100.0 commit changed `package.json`, `package-lock.json`, `STATUS.json`, `CHANGELOG.md` and `generated/` exactly as described).
### Changes (file:line)
**New contract + fixtures**
- `contracts/platform/task.v1.json:1` — new `platform.task@1`: task resource for `POST /v1/tasks` / `GET /v1/tasks/{id}` (`id` `tsk_<ULID>`, `project_id`, `requester`, `task`, `mode` cheapest/balanced/best/fastest/private, `budget.per_task_usd`/`per_day_usd`, `state` queued/running/verifying/succeeded/failed/cancelled, `result`, `cost`, `explanation` chaining `platform.placement-result@1`, SSE `progress`, `cancel`, HTTPS `webhooks`); `allOf` ties `succeeded` to a non-null result/cost/explanation, `else` to a null result, and `cancelled` to a cancel record; 3 examples.
- `fixtures/platform.task/valid/{queued,running,succeeded,cancelled}.json:1` — passing examples.
- `fixtures/platform.task/invalid/{missing-task,unknown-mode,budget-missing-per-day,negative-budget,succeeded-without-result,failed-with-result,cancelled-without-cancel,plain-http-webhook}.json:1` — failing counter-examples.
**ADR**
- `docs/adr/ADR-044-actor-runtime.md:1` — new Proposed ADR (plan T17, after the paused engine): task contract; adapter interface (capabilities, limits, reviewed rate card, trust class, BYO keys — wire shape left open); modes as `openvibe-sdk/placement` objectives; signals/auto-balancing with hysteresis and failover; `verifying` state for cheap-first cross-family checks and the task's own tests; trust classes and `private`; progress/cancel/webhooks; budgets/metering; authority boundaries; open questions; "what this does not claim".
- `docs/adr/README.md:43` — table row for ADR-044.
**Catalog, ids, release**
- `contracts/catalog.json:5623` — `platform.task` entry (v1.0.0, owner `network`, public, `planned`, adr `ADR-044`).
- `lib/ids.js:9` — added the `task: 'tsk'` prefix so `ids.newId('task')` mints the contract's id.
- `package.json:3`, `package-lock.json:3,9` — version `0.101.0`.
- `STATUS.json:10,23,25` — contracts v0.101.0, new feature line, updated date.
- `CHANGELOG.md:7` — new `0.101.0 — 2026-10-05` section.
- `generated/` (bundle.json, typescript/index.d.ts, 26 openapi docs) — `npm run generate`; openapi diffs are the version line only, the bundle/types are additive.
### Test results
- `npm run generate` → written; `node scripts/generate.js --check` → `generated/: up to date`, exit 0.
- `node scripts/compat.js v0.100.0` → `no breaking changes`, exit 0.
- `ov test test/platform-fabric.test.js test/product-catalog.test.js` → 2 passed (23 s).
- Focused replica of `test/run.js`'s catalog-integrity, all-fixture and generated-types checks → **11660 passed** (the environment hook blocks invoking `node test/run.js` as a whole suite, so this ran those exact checks; an earlier `ov test` pass had surfaced a real failure, `generated types reference undeclared names: SubjectRef1`, caused by a `$ref` wit
* Test the tsk prefix; leave 'best' unmapped until the SDK ranks quality (review)
Both findings fixed.
- **Finding 1** — added `['task', 'tsk']` to the id-prefix check loop: `test/run.js:534`. Verified `ids.newId('task')` → `tsk_<ULID>` (`lib/ids.js:9` already carried the prefix).
- **Finding 2** — ADR-044 §3 no longer maps `best → correctness`; it states only the four direct mappings (`cheapest`, `balanced`, `fastest`, `private`) and says `best` is unmapped because the SDK's `correctness` objective keeps only `req.authority`/current placement (ranks like `balanced` for a new task) and `high-reliability` has no branch: `docs/adr/ADR-044-actor-runtime.md:81-86`. Recorded as open question 6 at `docs/adr/ADR-044-actor-runtime.md:174`.
Left `docs/adr/README.md` and its #45 conflict untouched, as instructed. No commit or push.
Tests: `ov test test/platform-fabric.test.js test/platform-run.test.js` → 1 passed (`platform-run`), 1 skipped by the tool (`platform-fabric`, unchanged since green), 0 failed, 23 s.
This commit has no diff to show.