openvibers/openrestream Commits

Serve the release manifest (Track R, D43): GET /release.json on openre-api (release, contracts, openvibe-shared/sdk/contracts versions) through openvibe-shared release; test in drill-mode.test.js

OP OpenVibers committed 24 Sept 2026 · f391183ffb · 2 files, +5 −0


Changes

ddiff --git a/server/app.js b/server/app.js
iindex 2c480e4..3f3a29f 100644
---- a/server/app.js
++++ b/server/app.js
@@@ -37,6 +37,8 @@ function createApp({ rt, auth, keys, log = console, fetchImpl }) {
}
app.get('/api/health', (_req, res) => res.json({ status: 'ok', service: 'openre-api', version: pkg.version, release: config.release }));
++ // GET /release.json (ADR-016, D43): which release this API runs, its contracts and packages.
++ require('openvibe-shared/release').createRelease({ service: 'openre', root: require('path').join(__dirname, '..'), packages: ['openvibe-shared', 'openvibe-sdk', 'openvibe-contracts'] }).mount(app);
// Ready = the database answers and the Network key is loaded. Worker and coordinator state is
// reported, not required: the API serves reads while a worker generation rolls over.
ddiff --git a/test/drill-mode.test.js b/test/drill-mode.test.js
iindex b0948c1..3ee3bbd 100644
---- a/test/drill-mode.test.js
++++ b/test/drill-mode.test.js
@@@ -66,6 +66,9 @@ t('openre-api in a drill: reads work and match a normal instance; writes, /play/
const normal = await bootApi({ dir });
const created = await request(normal.base, 'POST', '/api/v1/streams', { token: reader, headers: { 'X-OV-Subject': 'usr_01J0000000000000000000000A' }, body: { title: 'Restored' } });
assert.strictEqual(created.status, 201);
++ const rel = await request(normal.base, 'GET', '/release.json');
++ assert.strictEqual(rel.status, 200, 'the release manifest (D43) is served');
++ assert.strictEqual((rel.json || JSON.parse(rel.text || rel.body || '{}')).service, 'openre');
const health = await request(normal.base, 'GET', '/api/health');
const list = await request(normal.base, 'GET', '/api/v1/streams', { token: reader });
const outboxBefore = normal.rt.db.prepare('SELECT count(*) AS n FROM event_outbox').get().n;