<feed xmlns='http://www.w3.org/2005/Atom'>
<title>newos4/modules/test/test-agent-loop-ceiling.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:32:21+00:00</updated>
<entry>
<title>test(newos4): prove the mixed-batch loop ceiling stops an agent at 9 identical calls</title>
<updated>2026-10-27T15:32:21+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-10-27T15:32:21+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=b7b0c3481760315ba49f5db1a7e61079b316f8af'/>
<id>urn:sha1:b7b0c3481760315ba49f5db1a7e61079b316f8af</id>
<content type='text'>
MAINT-006 was the last open board item and it needed a live run, not another code argument.
The fix landed in 5058d3b (the hard stop was only reachable when EVERY call in a batch was blocked,
so one repeated call + one novel call per turn ran to maxTurns).

- Live probe on v4.6.116 with the deployed class and a deterministic model stub (repeat read_file
  + a fresh list_files each turn): the loop stopped at turn 9 with
  "⛔ main: no progress after 9 identical calls — ending loop with partial result" and returned
  {finalAnswer, toolTurns} with a 400-char partial answer.
- test-agent-loop-ceiling.js (9 asserts, real module via its constructor): A mixed batch stops before
  maxTurns / B all-blocked batch still stops / C a productive loop that never repeats is NOT stopped.
- RED on 52d188a (pre-fix): 8 passed, 1 FAILED — the mixed batch ran to "AI reached the 12/12 tool
  limit" with no ceiling line. Suite in that checkout: 19 files, this one failing.
- Suite now 19/19 files; maintain OK.

No bundle change: the shipped code already contains the ceiling.
</content>
</entry>
</feed>
