Reproduction
In the Chisel REPL:
!save first
!save second
!list
Both chisel-first.json and chisel-second.json are listed. The old file is also still loadable with !load first, even though the current session was renamed to second.
!load latest still selects the newest session, but the stale entry remains in the cache and makes session discovery misleading.
Expected behavior
When !save <new-id> renames an already saved session, the previous cache file should be removed after the new file is successfully written. Re-saving with the same ID should keep updating that file.
I have a focused regression test and a minimal fix ready that only changes the rename path.
Reproduction
In the Chisel REPL:
Both
chisel-first.jsonandchisel-second.jsonare listed. The old file is also still loadable with!load first, even though the current session was renamed tosecond.!load lateststill selects the newest session, but the stale entry remains in the cache and makes session discovery misleading.Expected behavior
When
!save <new-id>renames an already saved session, the previous cache file should be removed after the new file is successfully written. Re-saving with the same ID should keep updating that file.I have a focused regression test and a minimal fix ready that only changes the rename path.