Repositories / agent-snapshot.git

agent-snapshot.git

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

Branch

Document copyright and license in help

Author
Arjun Guha <a.guha@northeastern.edu>
Date
2026-05-03 17:44:15 -0400
Commit
911445bab656368397958c30ce6eec11e297f0ec
src/ocaml/agent_snapshot.ml
index 6d60f23..88a8507 100644
--- a/src/ocaml/agent_snapshot.ml
+++ b/src/ocaml/agent_snapshot.ml
@@ -867,6 +867,10 @@ let cmd_main : unit Cmd.t =
       `P "$(tool) $(b,--snapshot-dir) /tmp/snap make all";
       `P "$(tool) $(b,--output) /tmp/snap make all";
       `P "$(tool) make all";
+      `S "COPYRIGHT";
+      `P "Copyright (c) 2026 Arjun Guha";
+      `S "LICENSE";
+      `P "BSD-3 licensed.";
     ]
   in
   let main_info = Cmd.info "agent-snapshot" ~doc ~man in
tests/test_agent_snapshot.py
index 1006f35..b8c13ff 100644
--- a/tests/test_agent_snapshot.py
+++ b/tests/test_agent_snapshot.py
@@ -361,6 +361,19 @@ def test_run_prints_stderr_summary(tmp_path):
     )
 
 
+def test_help_includes_copyright_and_license():
+    completed = subprocess.run(
+        [str(BIN), "--help=plain"],
+        cwd=ROOT,
+        text=True,
+        check=True,
+        capture_output=True,
+    )
+
+    assert "Copyright (c) 2026 Arjun Guha" in completed.stdout
+    assert "BSD-3 licensed." in completed.stdout
+
+
 def test_rename_records_source_tombstone_and_destination_content(tmp_path):
     # Rename is not just a write: a replay-equivalent snapshot needs to know that
     # the source path stopped existing and that the destination path acquired the