From 7e4e30a1790ced2b745a73e9c83e41d6e224bac6 Mon Sep 17 00:00:00 2001 From: Agando Date: Tue, 27 Oct 2026 16:07:35 +0100 Subject: fix(newos4): the loop guard reads the config it documents MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MAINT-004. The guard read warnAt/blockAt/hardStopAt while one config path wrote `threshold`, and `enabled` was never consulted anywhere — writing {"enabled": false} into webx11_ai_config changed nothing at all. One resolver, _loopPolicy(), now normalises both spellings, guarantees warnAt <= blockAt < hardStopAt, and both the block and the warning are gated on enabled. Live on v4.6.110 (_loopPolicy called in the page): defaults {warn 3, block 6, hardstop 9}; {threshold: 4} -> {warn 2, block 4, hardstop 7}; {enabled: false, threshold: 3} -> enabled false. test-loop-policy.js: 17 asserts, RED on HEAD ("_loopPolicy is not a function"), suite 16/16. --- main.html | 6 ++-- modules/core/core-bundle.js | 30 ++++++++++++---- modules/core/module-aiassist.js | 30 ++++++++++++---- modules/core/module-loader.js | 2 +- modules/test/test-loop-policy.js | 74 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 126 insertions(+), 16 deletions(-) create mode 100644 modules/test/test-loop-policy.js diff --git a/main.html b/main.html index 83cb081..8048efb 100644 --- a/main.html +++ b/main.html @@ -1349,13 +1349,13 @@ - + - + - +