<feed xmlns='http://www.w3.org/2005/Atom'>
<title>newos4/modules/test/test-webdav-sizes.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-11-02T20:15:28+00:00</updated>
<entry>
<title>fix(newos4): memory-graph loads stop rewriting user data; unknown sizes say unknown</title>
<updated>2026-11-02T20:15:28+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-11-02T20:15:28+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=3b894c31c456592a21b36a7696423ad0936edab7'/>
<id>urn:sha1:3b894c31c456592a21b36a7696423ad0936edab7</id>
<content type='text'>
Three follow-ups from the merge review, each with the assertion that pins it.

module-memory-graph.js
- _normalizeEdges no longer mutates stored weights. It capped legacy 'failed' edges
  from 0.8 to 0.2 in memory, and the next debounced save made that permanent - an
  irreversible migration of the user's graph with no schema version. The cap moved to
  _effectiveWeight(), which ranking (showStats "Strongest relationships"), the session
  view and prune() now use; the stored record is left exactly as written.
- config.json is stamped version: 2 so a future format change can migrate deliberately.

ext/webdav.js
- the two fallback parsers emit size: null instead of 0. They cannot see the size
  column, and 0 rendered as "0 B" - the same "every file looks empty" symptom as the
  parseInt bug fixed in e639c2d, one regex miss away.
- _formatSize(null) renders '—' (unknown) rather than '0 B'; 0 still renders '0 B'.

module-aiassist.js
- the lock timeout now says what to do: "AI is still busy with another turn (waited Ns).
  Wait for it to finish, or run 'ai-stop' and retry - the running turn's lock is left
  alone." It used to be a dead-end string.

Tests: test-memory-graph 39 (T6.4 rewritten to the read-time contract: stored weight
stays 0.8, effective 0.2, success unaffected), test-webdav-sizes 28 (A14d null -&gt; '—').
maintain 26/26, live v4.6.141: _effectiveWeight 0.2 with the edge object unchanged,
_formatSize(null) '—', '0 B' still '0 B'.
</content>
</entry>
<entry>
<title>fix(newos4): WebDAV listing sizes + pull, and five MemoryGraph defects</title>
<updated>2026-11-02T20:05:58+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-11-02T20:05:58+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=35ca5324ca5a0b3e1e6f02663e1e44d6e06e50ba'/>
<id>urn:sha1:35ca5324ca5a0b3e1e6f02663e1e44d6e06e50ba</id>
<content type='text'>
Closes STEER-20261102-205416-facd and STEER-20261102-204031-f82a.

WebDAV (modules/ext/webdav.js):
- listings showed "21 B" for a 21 KB file: nginx emits humanised sizes
  (autoindex_exact_size off, vhost :412) and _parseAutoindex did parseInt("21K").
  _parseAutoindexSize() handles K/M/G, decimals, lowercase and "-"; PROPFIND's
  exact getcontentlength path is untouched.
- webdav-pull into a missing local directory printed "Pulled: ... (N bytes)" and
  wrote nothing: it ignored fs.writeFile's false return (virtual-fs.js:561).
  It now creates the parent chain, checks the write, and only reports success
  after a confirmed write. The byte count uses TextEncoder, not .length
  (a Cyrillic file under-reported ~2x).
- _formatSize gained the GB branch the parser already accepted (3 GB printed
  "3072.0 MB") and no longer prints "NaN MB" for a missing size.

MemoryGraph (modules/core/module-memory-graph.js):
- addEdge averages weights, so every repeat pulled a strong edge toward the
  call site's constant (0.9 -&gt; 0.7 -&gt; 0.6). Now Math.max, with decay left to
  applyDecay(); prune() untouched.
- task ids were `task-${Date.now()}`, so re-submitting a task never deduped:
  now a hash of agent + normalised text.
- recordFileAccess no longer records the graph's own /.memory_graph/ store.
- failed tool calls were weighted 0.8 vs success 0.5, so showStats ranked
  failures as strongest: now 0.2. Legacy 0.8 failures are capped on load.
- concept ids keep punctuation ("concept:(v2!),"): slugged, and the slug uses
  \p{L}\p{N} so Cyrillic/CJK/accented text still yields nodes -- an a-z0-9 slug
  silently produced none.

Review findings folded in from the regression pass: the non-Latin regression
(a-z0-9 slug), the GB formatter asymmetry, and the pull byte count were all
found by review, not by the patch authors, and each now has a test.

Tests: test-webdav-sizes.js 27 (was RED 15/24 before the fix), test-memory-graph.js
37 (RED 17/32), both auto-discovered by newos4-maintain -- 26/26 node tests.
Live on v4.6.140: _parseAutoindexSize('21K') 21504, _formatSize -&gt; "21.0 KB",
_formatSize(2GiB) "2.0 GB", slug Cyrillic "исправить-парсер-ошибок", 0 console errors.
</content>
</entry>
</feed>
