<feed xmlns='http://www.w3.org/2005/Atom'>
<title>newos4/modules/core/virtual-fs.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-27T11:32:37+00:00</updated>
<entry>
<title>fix(newos4): never overwrite a directory node; ls honours a path after its flags</title>
<updated>2026-10-27T11:32:37+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-10-27T11:32:37+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=669b66591b3efbb8fc8642d25a67c55d93cfe4e9'/>
<id>urn:sha1:669b66591b3efbb8fc8642d25a67c55d93cfe4e9</id>
<content type='text'>
MAINT-010 and MAINT-016, the two high items the review left open. Both were re-probed
before the change and the new test is red on HEAD (5 passed, 7 FAILED).

- virtual-fs.js rename()/copy(): they assigned dst.dir.content[dst.name] with no destination
  type check, so `mv file /docs` replaced the /docs node and every child vanished while the
  command printed "Moved: …". Refuse when the destination is a real directory node (the
  virtual /sys entry is exempt). rename() also erased the file on `mv a a`, because assigning
  and then deleting the same key removes it; that path is now an explicit no-op.
- module-fs.js mv/cp: a refusal used to surface as "No such file or directory", which sent
  the operator looking for a missing source. The destination is now inspected first and the
  message says "is a directory — refusing to overwrite it".
- module-fs.js ls: the path was only read from argv[0], so `ls -l /work` listed the cwd.
  The first non-flag argument is now the target; the path-first form is unchanged.

Tests: modules/test/test-fs-mv-cp-guard.js (12 asserts) — RED on HEAD (A1-A3, B1, B2, C2, E1),
GREEN now; maintain --fix reports "node tests 7/7 pass". Browser on v4.6.104:
"mv: /vtest: is a directory — refusing to overwrite it", child and source intact,
"ls -l /vtest" lists /vtest (keep.txt), not the cwd.
</content>
</entry>
<entry>
<title>fix(newos4): rollback keeps scaffolding, checkpoints cannot collide, tests gate the build</title>
<updated>2026-10-27T10:23:23+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-10-27T10:23:10+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=d2de622744212ea0ba720b3f4212b82940ffe84b'/>
<id>urn:sha1:d2de622744212ea0ba720b3f4212b82940ffe84b</id>
<content type='text'>
Review of the 08:30 implementer run (v4.6.102, checkpoint name fix). The shipped fix was
correct; these are the defects it introduced or left behind, each measured first.

- virtual-fs.js rollback(): the snapshot strips _snapshots/_sessions/.trash for bloat. Restoring
  it verbatim deleted every checkpoint, every agent session and the trash, made rollback
  irreversible and unrepeatable. Re-attach the live copies after the root swap.
- checkpoint(): names are millisecond-resolution, so tight calls overwrote each other
  (measured 6 calls -&gt; 3 snapshots). Dedupe with a -N suffix, refuse names containing "/"
  (written but unlistable), and prune by snapshot createdAt instead of filename sort, which
  let a custom name ("aaa-oldest") evict newer auto-named checkpoints.
- module-predictor.js: legacy pre-v2 points have no `usable`, so a 0.079 s aborted run
  re-entered similarity as evidence and floored every prediction at 1 s. Backfill `usable`
  from the measurement on load, drop the ones it rejects, add a belt-and-braces guard in
  _findSimilar and count only usable points as actual executions.
- newos4-maintain.py: run every node-runnable modules/test/test-*.js on each maintenance pass.
  The v4.6.102 regression was written but no job ever executed it.
- newos4-steer.py: `done` now requires --commit &lt;sha&gt; that exists in the repo, and gains
  `reopen`. A written plan was being closed as done at 06:17 while the predictor fix shipped
  nowhere, so the implementer's pre-flight queue was empty.
- steering.json: predictor item reopened, checkpoint item stamped with f7249ff.
- maintenance board: MAINT-002/005/015 were fixed in v4.6.81-85 but still listed open/high;
  closed with their commit ids, and MAINT-010/016 annotated with the probes that keep them open.

Tests: test-vfs-checkpoint 23/23 (RED 14/9 before), test-predictor-accuracy 38/38
(T1-T3 RED on HEAD), maintain --fix all PASS, browser round-trip
"Checkpoint created: &lt;name&gt;" -&gt; "Rolled back to checkpoint: &lt;name&gt;" on v4.6.103.

Also carries the already-deployed 2026-10-26 syntax-gate hunk in newos4-maintain.py (syntax_failures + gated rebuild) that had never been committed.
</content>
</entry>
<entry>
<title>fix(newos4): checkpoint() returns resolved name (auto)</title>
<updated>2026-10-27T07:31:52+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-10-27T07:31:52+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=7b7d58e8cb1dcea131cb17450171cadb563eaa52'/>
<id>urn:sha1:7b7d58e8cb1dcea131cb17450171cadb563eaa52</id>
<content type='text'>
Task 1 of plan 2026-10-27_061724-newos4-checkpoint-name-mismatch.md.

virtual-fs.js checkpoint(name) generated an ISO name when none was given but
returned bare `true`, so callers could not know which name the snapshot was
written under. It now returns the resolved name (string). Prune (max 3) and
saveToStorage() behaviour unchanged.

Verification:
  $ node --check modules/core/virtual-fs.js
  SYNTAX OK
  $ node modules/test/test-vfs-checkpoint.js
  test-vfs-checkpoint: 9 passed, 1 FAILED   (remaining FAIL was the
  module-system display path, fixed in the next commit)
</content>
</entry>
<entry>
<title>fix(newos4): the virtual /sys entry leaked into listings, trees and counts (v4.6.88-90)</title>
<updated>2026-10-23T19:35:02+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-10-23T19:35:02+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=6af7c8ddfbd1d18a0d10cecd9c5d5eb398749570'/>
<id>urn:sha1:6af7c8ddfbd1d18a0d10cecd9c5d5eb398749570</id>
<content type='text'>
One phantom entry, three symptoms:
- ls() injected 'sys' whenever it was called without a path, so 'cd _agents; ls' advertised a
  sys directory that does not exist, and list_files('_agents/sys') answered 'Directory not
  found' — the reported false negative. Injection is now gated on dir === root.
- tree() pushed the same virtual name into the walk and dereferenced it, throwing mid-output on
  every root listing. Guarded.
- _gatherFileInfo() walked into /sys and counted a synthetic subtree: 146 files / 114 dirs for a
  44-file / 15-dir store. Virtual entries are skipped.

Verified: root still lists sys; _agents and skills do not; tree('') completes; world model total
(44) equals an independent walk of fs.root (44), agree: true.
</content>
</entry>
<entry>
<title>fix(newos4): an invalid grep pattern returns a message, not an exception (v4.6.64)</title>
<updated>2026-10-23T16:25:52+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-10-23T16:25:52+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=7a40846766f3e4dad7c7f72f285e43e06010b218'/>
<id>urn:sha1:7a40846766f3e4dad7c7f72f285e43e06010b218</id>
<content type='text'>
Packet 8. `new RegExp(pattern)` sat unguarded in the terminal grep handler and in
VFS find()/grep(), so a bad pattern threw out of the command handler into the error
ledger -- the same ledger packet 2 had to stop trusting.

- module-fs.js grep: compile in try/catch, print
  "grep: invalid pattern: &lt;pattern&gt; (&lt;engine message&gt;)" as a warning and return
- virtual-fs.js find()/grep(): same guard, return [] and stash the message on
  _lastPatternError instead of throwing into the module error wrapper

Verified live on v4.6.64 with the packet's own repro: `grep "/\bug_id\" file` prints
the message, the error counter stays 0 (was: one ledger entry per call), a valid
pattern still matches, and fs.grep('[') returns [] instead of throwing.
</content>
</entry>
<entry>
<title>fix(newos4): define VirtualFS.emptyTrash() — empty-trash threw since 2026-10-18</title>
<updated>2026-10-23T13:28:57+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-10-23T13:28:57+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=3cfb5ededbf482732b2337d82b5e05f96fc898de'/>
<id>urn:sha1:3cfb5ededbf482732b2337d82b5e05f96fc898de</id>
<content type='text'>
Report RPT-20261018-164646-89352963 ("this.fs.emptyTrash is not a function") was filed by the auto-filer and never fixed: terminal.js:1777 called a method VirtualFS never defined, so 'empty-trash --confirm' threw instead of emptying. Added emptyTrash() returning true only when it removed something.

Verified live on v4.6.54: put -&gt; rm -&gt; empty-trash --confirm =&gt; 'Trash emptied.'; second run =&gt; 'Trash is already empty.'; .trash entries 0.
</content>
</entry>
<entry>
<title>newOS4 v4.6.40: review fixes (bug diagnostics, trash tree, dir paste, stale capture, preview)</title>
<updated>2026-10-18T15:19:14+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-10-18T15:19:14+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=240e22bc2e4f6b67b032c0a317e456958520fe90'/>
<id>urn:sha1:240e22bc2e4f6b67b032c0a317e456958520fe90</id>
<content type='text'>
</content>
</entry>
<entry>
<title>auto: 2026-07-09_06:00 changes</title>
<updated>2026-07-09T04:00:32+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-07-09T04:00:32+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=cf7461ffeb4f53f3f50c9c692a2e4fdcecf17e82'/>
<id>urn:sha1:cf7461ffeb4f53f3f50c9c692a2e4fdcecf17e82</id>
<content type='text'>
</content>
</entry>
<entry>
<title>auto: 2026-06-19_18:01 changes</title>
<updated>2026-06-19T16:01:04+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-06-19T16:01:04+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=82270d6f2685d84d5c9b4a454ae7260de75d34cf'/>
<id>urn:sha1:82270d6f2685d84d5c9b4a454ae7260de75d34cf</id>
<content type='text'>
</content>
</entry>
<entry>
<title>auto: 2026-06-17_06:01 changes</title>
<updated>2026-06-17T04:01:20+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-06-17T04:01:20+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=cebacc27a48168e666679018f8e27156d12d4527'/>
<id>urn:sha1:cebacc27a48168e666679018f8e27156d12d4527</id>
<content type='text'>
</content>
</entry>
</feed>
