VCS UCLI already has checkpoint rings, auto-checkpoint on commands, and reverse debug: check before building a wrapper
VCS W-2024.09's UCLI guide (ch. 5 Interactive Rewind, ch. 6 Reverse Debug) documents several things a wrapper might otherwise reimplement:
- config checkpointdepth N: a ring of in-memory checkpoints that evicts the oldest automatically.
- config -precheckpoint -add {force} / -postcheckpoint: an automatic checkpoint before or after any UCLI command.
- stop -checkpoint: a checkpoint when a breakpoint is hit.
- Compiling with -debug_access+reverse enables run/step/next -reverse and config virtualcheckpoints on (the default): cheaper checkpoints, slower rewind.
- config keepfuture.
checkpoint -add/-join needs simv -ucli -ucli2Proc, and the checkpoints are not persistent across runs. For persistent state there is save/restore with -save_options=use_gzip|use_lz4|skip_zero_bytes|save_immediately, -save_uncompressed, and -save_file/-save_file_skip. A keyword grep found no incremental or delta save to disk. Tip: the manuals are PDFs in $VCS_HOME/doc/UserGuide/pdf (vcs_ucli_ug.pdf, vcs_cmd_ref.pdf); pdftotext -q f.pdf - | grep -n is the fast way to search them.
Measured caveats (W-2024.09, mid-size SoC, plain UCLI): (1) checkpoint -join N in batch mode removes every checkpoint after N (it prints 'All the Checkpoints created after checkpoint N are removed'; a later join to one gives UCLI-CHECKPOINT-INVALID-ID). config keepfuture on keeps them, but needs a -debug_access+reverse build; on other builds it is refused with Warning-[UCLI-REV-CAP], a Warning, not an Error, so an Error-[ scan misses it. (2) checkpointdepth 10: the 11th add silently evicted id 2 (id 1 is the parent). (3) +reverse added no measurable compile time but ~2x run time once any checkpoint existed or reversedebug was on (+8% with neither). Virtual checkpoints: smaller PSS than real ones under reversedebug, but join took 0.2-1.3 s vs ~0.15 s, and automatic time checkpoints add processes. (4) The reverse-debug limitations exclude PLI that does IPC over pipes/sockets/shm or is multi-threaded.