Repositories / agent-snapshot.git

agent-snapshot.git

Clone (read-only): git clone http://git.guha-anderson.com/git/agent-snapshot.git

Branch

Include snapshot directory in summary

Author
Arjun Guha <a.guha@northeastern.edu>
Date
2026-05-03 18:05:58 -0400
Commit
2ca1f1923f311916254b4e6b9d650e7a79afc452
src/ocaml/agent_snapshot.ml
index 44492db..5dcd500 100644
--- a/src/ocaml/agent_snapshot.ml
+++ b/src/ocaml/agent_snapshot.ml
@@ -634,7 +634,9 @@ let print_snapshot_summary () : unit =
       then incr updated_files;
       if operation_was_recorded recd "read" && Option.is_some recd.before.blob then incr uncommitted_read_files)
     files;
-  Printf.eprintf "Worked in %d repositories. Saved %d updated files. Saved %d read files in the snapshot that were not committed.\n%!"
+  Printf.eprintf
+    "Snapshot directory: %s\nWorked in %d repositories. Saved %d updated files. Saved %d read files in the snapshot that were not committed.\n%!"
+    !snapshot_dir
     (Hashtbl.length repos) !updated_files !uncommitted_read_files
 
 (** Resolve relative syscall paths against cwd or a directory fd as required by *at syscalls. *)
tests/test_agent_snapshot.py
index af92e7e..14718cc 100644
--- a/tests/test_agent_snapshot.py
+++ b/tests/test_agent_snapshot.py
@@ -371,6 +371,7 @@ def test_run_prints_stderr_summary(tmp_path):
     )
 
     assert completed.stderr.endswith(
+        f"Snapshot directory: {out}\n"
         "Worked in 0 repositories. Saved 0 updated files. Saved 0 read files in the snapshot that were not committed.\n"
     )