From 78149467b099465b9d0396bdd3916ba8507917ba Mon Sep 17 00:00:00 2001 From: Agando Date: Tue, 27 Oct 2026 08:31:52 +0100 Subject: fix(newos4): checkpoint() returns resolved name (auto) 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) --- modules/core/virtual-fs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/core') diff --git a/modules/core/virtual-fs.js b/modules/core/virtual-fs.js index e639cba..09b3548 100644 --- a/modules/core/virtual-fs.js +++ b/modules/core/virtual-fs.js @@ -966,7 +966,7 @@ class VirtualFileSystem { const toDelete = sorted.slice(0, all.length - 3); for (const old of toDelete) this.deleteCheckpoint(old); } - return true; + return name; } rollback(name) { const raw = this.fsReadJSON('/_snapshots/checkpoint-' + name + '.json'); -- cgit v1.2.3