openvibers/openvibe.billing Commits

Serve the release manifest (Track R, D43): GET /release.json and POST /release-metrics through openvibe-shared release.mount; the manifest was built but never mounted, so billing.openvibe.network answered 404

OP OpenVibers committed 24 Sept 2026 · 421beb42db · 2 files, +6 −0


Changes

ddiff --git a/server/app.js b/server/app.js
iindex 230a870..864acf4 100644
---- a/server/app.js
++++ b/server/app.js
@@@ -54,6 +54,8 @@ function createApp(opts = {}) {
const metrics = createMetrics({ db, config, now: ctx.now });
const release = createRelease({ service: 'billing', root: path.join(__dirname, '..') });
instrument(app, { service: 'billing', release: release.release, registry: metrics.registry });
++ // GET /release.json (ADR-016, D43) and POST /release-metrics: what this deployment is, for tabs and deploy checks.
++ release.mount(app, { registry: metrics.registry });
app.use(http.middleware());
app.use((req, res, next) => { res.setHeader('Cache-Control', 'no-store'); next(); });
ddiff --git a/test/operations.test.js b/test/operations.test.js
iindex 66a5f83..267084a 100644
---- a/test/operations.test.js
++++ b/test/operations.test.js
@@@ -20,6 +20,10 @@ const { boot, fund, check, done } = require('./helpers/app');
const r = await t.call('GET', '/api/v1/rates', { token: null });
assert.strictEqual(r.json.packages.find((p) => p.bits === 1000).price_cents, 1300);
assert.strictEqual((await t.call('GET', '/api/ready', { token: null })).status, 200);
++ const rel = await t.call('GET', '/release.json', { token: null });
++ assert.strictEqual(rel.status, 200, 'the release manifest (D43) is served');
++ assert.strictEqual(rel.json.service, 'billing');
++ assert.ok(rel.json.release && rel.json.components && rel.json.components.server);
});
await check('purchase settle credits the buyer and books the spread as revenue', async () => {