openvibers/openvibe.host Commits

Host: the browser check watches all 37 public sites (12 added) and not the parked tips and vip (#102)

OP OpenVibers committed 29 days ago · df85cf0f0d · 3 files, +36 −3

**The release UX check watches every public site the host runs (37), and no longer the parked tips and vip.**

**Why:** `openvibe-browsercheck.service` still listed the 27 sites of its first version.
- **Two always-failing sites:** openvibe.tips and openvibe.vip are parked by Network and redirect to openvibe.network. Their `status` check failed on every run (production's browser-watch state shows only those two failing), which feeds `OpenVibeBrowserCheckFailed`.
- **Twelve unwatched sites:** the products built since were never checked in a real browser after a release: actor, watch, run, food, help, work, quest, rent, media-hub (openvibe.video), inventory, play and zone.

**Change:**
- **`deploy/systemd/openvibe-browsercheck.service`:** `--sites` drops tips and vip and adds the twelve. Each new origin answers `/release.json` (checked on production). openvibe.video's is fixed in MediaHub#50.
- **`docs/operator-alerts.md`:** "all 37 public sites", saying what changed and why.
- **`test/browsercheck-unit.test.js` (new):**
  - every watched site is a service in `host.example.json` with an origin (inventory origin or manifest `publicOrigin`), listed once;
  - tips and vip are not watched;
  - every service whose manifest says `live` is watched.

**After merge (operator):** `sudo ovhost self-update`, then copy the unit from `/usr/local/lib/openvibe-host/deploy/systemd/` and `systemctl daemon-reload`, as the doc says.

Changes

ddiff --git a/deploy/systemd/openvibe-browsercheck.service b/deploy/systemd/openvibe-browsercheck.service
iindex a2f5f9c..8cc5541 100644
---- a/deploy/systemd/openvibe-browsercheck.service
++++ b/deploy/systemd/openvibe-browsercheck.service
@@@ -9,7 +9,7 @@ Type=oneshot
# Root reads the state and writes the textfile metrics; Chrome runs as the unprivileged ovcheck account
# (runuser), never as root. --sites names the watched services (inventory origin or manifest publicOrigin).
User=root
--ExecStart=/usr/local/bin/ovhost browser-watch --sites live,network,tools,media,community,chat,games,blog,wiki,codes,host,ai,billing,search,sources,news,reviews,deals,coupons,trade,tips,vip,openre,space,bot,events,services
++ExecStart=/usr/local/bin/ovhost browser-watch --sites live,network,tools,media,community,chat,games,blog,wiki,codes,host,ai,billing,search,sources,news,reviews,deals,coupons,trade,openre,space,bot,events,services,actor,watch,run,food,help,work,quest,rent,media-hub,inventory,play,zone
Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Environment=OVHOST_INVENTORY=/etc/openvibe/host.json
Nice=10
ddiff --git a/docs/operator-alerts.md b/docs/operator-alerts.md
iindex be1bf2f..1cae4f1 100644
---- a/docs/operator-alerts.md
++++ b/docs/operator-alerts.md
@@@ -33,8 +33,9 @@ Prometheus (127.0.0.1:9090) ──GET /api/v1/alerts──▶ ovhost alerts re
## The release UX check
--`ovhost browser-watch --sites live,network,…` (openvibe-browsercheck.timer, every 5 minutes; the unit lists all 27
--public sites) reads each watched site's
++`ovhost browser-watch --sites live,network,…` (openvibe-browsercheck.timer, every 5 minutes; the unit lists all 37
++public sites: since 2026-10-15 the twelve products built after the first list, and not the parked openvibe.tips and
++openvibe.vip, which redirect to openvibe.network) reads each watched site's
`/release.json`. For a release it has not checked yet, or once a day, it runs
[scripts/browser-check.js](../scripts/browser-check.js) in Chrome as the unprivileged `ovcheck` account (never
root): routes × widths, console errors, overflow, duplicate scripts, no-JS content, axe, navigation growth.
ddiff --git a/test/browsercheck-unit.test.js b/test/browsercheck-unit.test.js
nnew file mode 100644
iindex 0000000..f6b8858
---- /dev/null
++++ b/test/browsercheck-unit.test.js
@@@ -0,0 +1,32 @@
++'use strict';
++// The release UX check's site list (deploy/systemd/openvibe-browsercheck.service): every watched site is a service of
++// the host's example inventory with an origin to check (its inventory origin or its manifest's publicOrigin), and no
++// service whose manifest says it is not public (openvibe.tips and openvibe.vip are parked: they redirect to
++// openvibe.network and would fail every check). Every public product the host runs is watched.
++const assert = require('assert');
++const fs = require('fs');
++const path = require('path');
++const contracts = require('openvibe-contracts');
++const { originOf } = require('../lib/browser-watch');
++const { runTests, test } = require('./helpers');
++
++const unit = fs.readFileSync(path.join(__dirname, '..', 'deploy', 'systemd', 'openvibe-browsercheck.service'), 'utf8');
++const sites = (/ExecStart=\S+ browser-watch --sites (\S+)/.exec(unit) || [])[1].split(',');
++const inv = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'host.example.json'), 'utf8'));
++
++runTests([
++ test('every watched site is a service on the host with an origin to check, listed once', () => {
++ assert.strictEqual(new Set(sites).size, sites.length, 'a site listed twice');
++ for (const site of sites) {
++ assert.ok(inv.services[site], `${site} is not in host.example.json`);
++ assert.match(String(originOf(inv, site, contracts)), /^https:\/\/[a-z0-9.-]+$/, `${site} has no origin`);
++ }
++ }),
++ test('no parked site is watched, and every public one the host runs is', () => {
++ const exposure = (id) => { const m = contracts.services.get(id); return m && m.exposure ? m.exposure.state : null; };
++ // Parked by OpenVibe.Network (parked-domains): their origins redirect to openvibe.network until T5 opens them.
++ for (const parked of ['tips', 'vip']) assert.ok(!sites.includes(parked), `${parked} is parked`);
++ const live = Object.keys(inv.services).filter((id) => exposure(id) === 'live' && originOf(inv, id, contracts));
++ assert.deepStrictEqual(live.filter((id) => !sites.includes(id)), [], 'a public service on the host is not watched');
++ }),
++]);