From a580a49eed5e6f323486956ccdfe449a47bac447 Mon Sep 17 00:00:00 2001 From: louispaulb Date: Mon, 20 Jul 2026 07:53:03 -0400 Subject: [PATCH] =?UTF-8?q?fix(assistant):=20reboot=20=3D=20downtime=20hon?= =?UTF-8?q?n=C3=AAte=20(=E2=89=A53=20min)=20+=20s=C3=A9v=C3=A9rit=C3=A9=20?= =?UTF-8?q?haute?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Louis : un reboot coupe l'accès du client au moins 3 min (pas ~2). L'aperçu de device_action(reboot) le dit désormais clairement et reboot/speed passent en severity 'high' (l'ONU redémarre = vraie coupure), aux 2 chemins (TR-069 tech-3 + SNMP tech-2). Rappel : le reboot ne part JAMAIS sans clic Confirmer humain. Co-Authored-By: Claude Opus 4.8 --- services/targo-hub/lib/staff-agent.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/targo-hub/lib/staff-agent.js b/services/targo-hub/lib/staff-agent.js index 357ec9d..50b7e53 100644 --- a/services/targo-hub/lib/staff-agent.js +++ b/services/targo-hub/lib/staff-agent.js @@ -303,13 +303,13 @@ const WRITES = { // Repli REBOOT → TR-069 : les ONU tech-3 (TPLG, la plus grosse flotte) ne rebootent PAS via olt-ops (SNMP // Raisecom = tech-2). On passe alors par GenieACS (devices.rebootBySerial). Autres actions : non exécutables. if (action === 'reboot') { - return { title: META.device_action.title, preview: `Redémarrer le modem (TR-069) — ONU ${serial}${who} · le modem redémarre (~2 min hors ligne).`, severity: 'normal', params: { via: 'tr069', serial, action, idempotencyKey } } + return { title: META.device_action.title, preview: `Redémarrer le modem (TR-069) — ONU ${serial}${who} · ⚠ coupe l'accès du client au moins ~3 min (le temps que le modem redémarre et se reconnecte).`, severity: 'high', params: { via: 'tr069', serial, action, idempotencyKey } } } throw new Error(`« ${pl.label || action} » non exécutable pour ${serial}${(pl.warnings && pl.warnings.length) ? ' — ' + pl.warnings.join(' ') : ''}`) } const warn = (pl.warnings && pl.warnings.length) ? ' ⚠ ' + pl.warnings.join(' ') : '' const preview = `${pl.label} — ONU ${pl.target.serial}${pl.target.olt ? ' · OLT ' + pl.target.olt : ''}${who}${(pl.effects && pl.effects.length) ? ' · ' + pl.effects.join(' ') : ''}${warn}` - const severity = /^(suspend|remove|replace|activate)$/.test(action) ? 'high' : 'normal' + const severity = /^(suspend|remove|replace|activate|reboot|speed)$/.test(action) ? 'high' : 'normal' // reboot/speed = l'ONU redémarre (coupure) ⇒ conséquent return { title: META.device_action.title, preview, severity, params: { via: 'olt', serial, action, profileid: opts.profileid || '', new_sn: opts.new_sn || '', idempotencyKey } } }, async exec (p, email) {