<feed xmlns='http://www.w3.org/2005/Atom'>
<title>newos4/modules/test/test-loop-policy.js, branch main</title>
<subtitle>newOS4 - the browser terminal that runs WebX11 user spaces</subtitle>
<id>https://newos.webx11.duckdns.org/newos4/atom?h=main</id>
<link rel='self' href='https://newos.webx11.duckdns.org/newos4/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/'/>
<updated>2026-10-27T15:07:35+00:00</updated>
<entry>
<title>fix(newos4): the loop guard reads the config it documents</title>
<updated>2026-10-27T15:07:35+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-10-27T15:07:35+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=2e9401a5587b0a45daaf0af116bb7da573b0988d'/>
<id>urn:sha1:2e9401a5587b0a45daaf0af116bb7da573b0988d</id>
<content type='text'>
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 &lt;= blockAt &lt; 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} -&gt; {warn 2, block 4, hardstop 7}; {enabled: false, threshold: 3} -&gt; enabled false.
test-loop-policy.js: 17 asserts, RED on HEAD ("_loopPolicy is not a function"), suite 16/16.
</content>
</entry>
</feed>
