openvibers/openvibe.network Commits

Production drift: the registry exposes releases() (the drift checks called it and failed silently), and a failed refresh is logged

OP OpenVibers committed 25 Sept 2026 · a93b7d1c0b · 3 files, +8 −3


Changes

ddiff --git a/server/registry/deploy-drift.js b/server/registry/deploy-drift.js
iindex 69c33d65..f571fece 100644
---- a/server/registry/deploy-drift.js
++++ b/server/registry/deploy-drift.js
@@@ -79,9 +79,10 @@ function createDeployDrift({ services, fetchImpl = globalThis.fetch, token = ()
}
function start() {
if (timer) return;
-- const first = setTimeout(() => { refresh().catch(() => {}); }, 60 * 1000);
++ const run = () => refresh().catch((err) => { if (log && log.warn) log.warn(`[drift] refresh failed: ${err.message}`); });
++ const first = setTimeout(run, 60 * 1000);
if (first.unref) first.unref();
-- timer = setInterval(() => { refresh().catch(() => {}); }, intervalMs);
++ timer = setInterval(run, intervalMs);
if (timer.unref) timer.unref();
}
function stop() { if (timer) clearInterval(timer); timer = null; }
ddiff --git a/server/registry/ecosystem.js b/server/registry/ecosystem.js
iindex 82949735..f168119f 100644
---- a/server/registry/ecosystem.js
++++ b/server/registry/ecosystem.js
@@@ -380,7 +380,7 @@ function createEcosystemRegistry({ issuer, internalOverrides = {}, fetchImpl = g
return r;
}
-- return { router, start, stop, pollAll, health, current, descriptor, categories, featured, setRanking: (fn) => { rankingOf = fn; }, lastPollAt: () => lastPollAt, pollMs, internal };
++ return { router, start, stop, pollAll, health, current, descriptor, categories, featured, releases, setRanking: (fn) => { rankingOf = fn; }, lastPollAt: () => lastPollAt, pollMs, internal };
}
module.exports = { createEcosystemRegistry, INTERNAL, READY_PATHS, HEALTH_PATHS, CATEGORIES, categoryOf, internalFromEnv, statusFromReady, readySummary };
ddiff --git a/test/deploy-drift.test.js b/test/deploy-drift.test.js
iindex cb324bd8..d2dd26ff 100644
---- a/test/deploy-drift.test.js
++++ b/test/deploy-drift.test.js
@@@ -58,5 +58,9 @@ const fetchImpl = async (url, opts) => {
await d.refresh();
assert.strictEqual(drift.current('media'), null, 'a service that stopped running is dropped');
drift._reset();
++ // server/index.js feeds the checks from the registry's releases view.
++ const eco = require('../server/registry/ecosystem').createEcosystemRegistry({ issuer: 'https://openvibe.network', fetchImpl: async () => { throw new Error('offline'); } });
++ assert.strictEqual(typeof eco.releases, 'function', 'the registry exposes releases()');
++ assert.ok(Array.isArray(eco.releases().services));
console.log('deploy drift: all checks passed');
})().catch((err) => { console.error(err); process.exit(1); });