Repositories / agent-snapshot.git

agent-snapshot.git

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

Branch

Report default ignore file creation

Author
Arjun Guha <a.guha@northeastern.edu>
Date
2026-05-03 17:43:51 -0400
Commit
c200f7f057afd7220683e33c8869925edbb0615c
src/ocaml/agent_snapshot.ml
index 57e9cee..6d60f23 100644
--- a/src/ocaml/agent_snapshot.ml
+++ b/src/ocaml/agent_snapshot.ml
@@ -210,6 +210,7 @@ let load_ignore_config () : unit =
     with Sys_error _ ->
       mkdir_p (dirname !ignore_config_path);
       let text = Json.pretty_to_string ~std:true (ignore_file_entries_to_yojson (default_ignore_file_entries ())) ^ "\n" in
+      Printf.eprintf "Created default ignore file: %s\n%!" !ignore_config_path;
       let oc = open_out_bin !ignore_config_path in
       Fun.protect
         ~finally:(fun () -> close_out_noerr oc)
tests/test_agent_snapshot.py
index e022d24..1006f35 100644
--- a/tests/test_agent_snapshot.py
+++ b/tests/test_agent_snapshot.py
@@ -122,9 +122,16 @@ def test_missing_ignore_config_creates_defaults(tmp_path, ignore_config):
     ignore_config.unlink()
     assert not ignore_config.exists()
     out = tmp_path / "snapshot"
-    run([str(BIN), "--snapshot-dir", str(out), PYTHON, "test_programs/read_clean.py"])
+    completed = subprocess.run(
+        [str(BIN), "--snapshot-dir", str(out), PYTHON, "test_programs/read_clean.py"],
+        cwd=ROOT,
+        text=True,
+        check=True,
+        capture_output=True,
+    )
 
     assert ignore_config.exists()
+    assert f"Created default ignore file: {ignore_config}\n" in completed.stderr
     data = json.loads(ignore_config.read_text())
     assert data == [
         "$HOME/.cache",