feat(sim): F4.6f1 what a run leaves goes back into the document

The oracle SaveAfterRunRun saves Java's project after a run. The room writes
what a run leaves that Java keeps - files, running servers, virtual hosts,
mail servers' domains and accounts, mail programs' accounts and folders,
firewalls, DHCP clients' addresses - into the document as origin 'sim', at
most once a second, after each action and at the stop; writeRunState writes
only what differs. The command line now goes on in a folder made before a
restart, as Java's does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-03 17:05:11 +00:00
co-authored by Claude Opus 5.5
parent 11f13bca84
commit 3d6655e736
15 changed files with 705 additions and 22 deletions
@@ -164,3 +164,24 @@ describe('virtual file system', () => {
expect(fileSystem.upgradeLegacyDefaultImages()).toBe(0);
});
});
describe("a file system's revision", () => {
it('changes with every change, a removal too, and not with a reading', () => {
const files = new VirtualFileSystem();
const seen = [files.revision];
files.createDirectory('/a');
seen.push(files.revision);
files.writeTextFile('/a/b.txt', 'x');
seen.push(files.revision);
files.renameInPlace('/a/b.txt', 'c.txt');
seen.push(files.revision);
files.deleteItem('/a/c.txt');
seen.push(files.revision);
files.allEntries();
files.contains('/a');
seen.push(files.revision);
expect(new Set(seen.slice(0, 5)).size).toBe(5);
expect(seen[5]).toBe(seen[4]);
});
});