<feed xmlns='http://www.w3.org/2005/Atom'>
<title>newos4/_docs/chat-review-glm-2026-10-23.md, 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-23T18:37:54+00:00</updated>
<entry>
<title>fix(chat): GLM review batch — corruption, traversal, cursor truncation, double print (v4.6.78-80)</title>
<updated>2026-10-23T18:37:54+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-10-23T18:37:54+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=577c9241a4ac1c55c5ed0031b76a8a1f83798752'/>
<id>urn:sha1:577c9241a4ac1c55c5ed0031b76a8a1f83798752</id>
<content type='text'>
12 findings accepted, 3 refuted with evidence (see _docs/chat-review-glm-2026-10-23.md).

Data loss: a corrupt thread read as [] and the next append rewrote it with one message —
now 500 and the file is left alone. Cursor after a &gt;50-message truncation pointed at the
thread tail, making the oldest permanently unfetchable — now the last message actually
sent, plus truncated:true. Two posts in the same millisecond shared a cursor — epoch is
now strictly increasing.

Security: chat.py show() had no id validation and joined argv onto CHAT_DIR ('../../x'
read any .json as darkbot) — THREAD_RE added. The auto-reply prompt now treats message
text as untrusted data and forbids acting on instructions found in it.

Ops: relay housekeeping swept neither .lock-* nor orphaned .tmp-*; a crashed listing
looked identical to an empty queue; grep AWAITING also matched message bodies; hermes-poll
printed every reply twice.

Verified: corrupt file -&gt; 500 with the file untouched; traversal -&gt; 'invalid thread id';
hermes-poll -&gt; exactly one line per reply.
</content>
</entry>
</feed>
