commits
Cmdliner 1.3.0 shadows exit with a deprecated binding.
Replace all bare exit calls with Stdlib.exit.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace Printf.sprintf with Fmt.str and Format.fprintf with Fmt.pf in
cbort, cfdp, btree, block, bpsec, irmin, cookeio, and cpio. Also fix
E215 (failwith+Fmt.str -> Fmt.failwith) and E340 (extract err_* helpers).
Rename CamelCase internal modules to Snake_case per OCaml convention:
- ocaml-hap: TlvType→Tlv_type, HapError→Hap_error, CharType→Char_type
- ocaml-cookeio: SameSite→Same_site, DateParser→Date_parser
- ocaml-claudeio: PreToolUse→Pre_tool_use, PostToolUse→Post_tool_use,
UserPromptSubmit→User_prompt_submit, SubagentStop→Subagent_stop,
PreCompact→Pre_compact (wire format strings preserved)
- irmin: StringMap→String_map, PathSet→Path_set
- ocaml-block: ReadOnly→Read_only, WithCrc→With_crc
Change all test_*.mli to export val suite : string * unit Alcotest.test_case
list (singular tuple). Flatten multi-group test suites into single groups.
Fix incorrect v_* function renames in CLI call sites.
Add individual Alcotest test files for ocaml-atp (tid, handle, did, nsid,
record_key, at_uri, mst, car, block_map, blockstore, dagcbor, cid, blob_ref,
eio_error, lex, repo_key, varint), hermest (codegen_jsont, emitter,
lexicon_types, scc), standard-site, tangled, xrpc, xrpc-auth, and bloom.
Fix catch-all exception handlers (E105), redundant function prefixes (E331),
and expose parse functions in ocaml-arp for testability.
Extract helpers in irmin/lib/git_interop.ml (E005), add module and value
docs (E400/E405), flatten test suites to single tuples (E600), add missing
test files and .mli exports (E605), fix Fpath type in e610.ml.
- E331: Rename get_path -> path, create_flag -> flag
- Add doc comments to codec.mli commit accessors
- Fix mst_proof.mli doc comment
- E605: Split monolithic test_irmin.ml into 10 per-module test files
(test_hash, test_tree, test_backend, test_store, test_codec, test_link,
test_proof, test_commit, test_git_interop, test_subtree)
- E410: Fix doc arg count for any_algorithm, any_to_bytes, any_to_hex
- E415: Add Proof.pp pretty-printer
- Tidy irmin bin commands (cmd_checkout, cmd_import, cmd_info)
- Tidy irmin lib (backend, codec, link) and add irmin.mli
- Fix merlint E331 rule, dune fmt across space-dtn
Convert all packages from:
(source (uri https://tangled.org/handle/repo))
to:
(source (tangled handle/repo))
This uses dune 3.21's native tangled support for cleaner source
declarations. Also removes redundant homepage/bug_reports fields
that are auto-generated from tangled sources.
- Rename directory: ocaml-build-info -> monopam-info
- Rename module: Mono_info -> Monopam_info
- Rename package: ocaml-build-info -> monopam-info
- Update all consumers to use new module name
- Remove "Skipping pull" log noise from push output
Rename ocaml-version to ocaml-build-info with Mono_info module.
All homebrew binaries now use Mono_info.version for consistent
version reporting across the monorepo.
The library wraps dune-build-info and falls back to git hash
in dev mode. Can be extended with SBOM or other metadata later.
git-subtree-dir: irmin
git-subtree-mainline: e4c45b7c50e04b8e1492a24403ad5d796eb5e49e
- ocaml-git: Add advance_head function that properly updates branch refs
instead of writing directly to HEAD, preventing detached HEAD state
- ocaml-git: Add tests for advance_head in both branch and detached modes
- monopam: Add dune-build-info for proper versioning
- monopam: Add cram test for workflow commands
git-subtree-dir: irmin
git-subtree-mainline: e4c45b7c50e04b8e1492a24403ad5d796eb5e49e
- Simplify homebrew.yml: use `target` path instead of package/exe_name
- Rename prune to pruner (avoid conflict with graphviz)
- Add parallel uploads with rclone --transfers 16
- Fix hyphenated name parsing (git-mono was parsed as "git")
- Add timing output for build/upload/tap update steps
- Add dry-run command to preview build targets
git-subtree-dir: irmin
git-subtree-mainline: e4c45b7c50e04b8e1492a24403ad5d796eb5e49e
Wrap H2_client.close in try-catch to handle the case where fibers
are already cancelled during switch cleanup. This fixes the
"Cancelled: Stdlib.Exit" error that occurred when monopam pull
completed and the connection pool was cleaning up.
git-subtree-dir: irmin
git-subtree-mainline: e4c45b7c50e04b8e1492a24403ad5d796eb5e49e
The @ocaml-index target was failing because:
1. Test modules lacked .mli files needed for index generation
2. Test directories with multiple executables didn't specify (modules),
causing dune to include all .ml files in each executable - modules
using alcotest were included in executables without that dependency
Added empty .mli stubs and explicit (modules) fields. Also added
(enabled_if (= %{context_name} "default")) to disable tests in afl context.
- Add fpath dependency to ocaml-git
- Update Git.Repository API to use Fpath.t for:
- open_repo, open_bare, init, is_repo, git_dir
- Update all callers in irmin and monopam to use Fpath.t
- Remove duplicate functions from Git_cli that now use native ocaml-git:
- is_repo (use Git.Repository.is_repo)
- is_dirty (use Git.Repository.is_dirty)
- current_branch (use Git.Repository.current_branch)
- ahead_behind (use Git.Repository.ahead_behind)
- ls_remote_head (unused)
- list_remotes, get_remote_url, add_remote, remove_remote,
set_remote_url, ensure_remote (use Git.Repository.*)
This reduces subprocess spawning in hot paths and provides type-safe
path handling throughout the git operations.
Integrates existing monorepo storage packages:
- ocaml-wal: crash-safe writes with CRC checksums
- ocaml-bloom: fast negative lookups for exists()
Write path now:
1. Write to WAL (crash-safe with CRC)
2. Write to data file
3. Update in-memory index and bloom filter
4. On flush: save index and bloom, then clear WAL
Recovery on startup:
1. Load index and bloom from disk
2. Replay any WAL entries not yet in index
Adds test for WAL crash recovery scenario.
Implements Backend.Disk module for persistent storage:
- objects.data: append-only file for all objects
- objects.idx: index mapping hex hash -> (offset, length)
- refs/: directory with nested paths for refs
Design inspired by lavyek's append-only storage patterns
for high write throughput.
Features:
- Thread-safe with Eio.Mutex
- Atomic index updates via rename
- Recursive ref directory scanning
- Supports nested refs like refs/heads/main
Adds 4 tests: basic operations, persistence, refs, and batch writes.
Implements the previously stubbed diff function that compares two trees
and yields a sequence of changes (Add, Remove, Change).
The algorithm recursively traverses both trees and:
- Emits Remove for entries only in old tree
- Emits Add for entries only in new tree
- Emits Change for modified contents
- Handles subtree transitions (contents ↔ node)
Import test scenarios from NASA's HDTN (High-rate Delay Tolerant Network):
- cgrTutorial: 5-node network from pyCGR tutorial (16 contacts)
- contactPlan_RoutingTest: 6-node routing scenario (8 contacts)
Test cases verify:
- Multi-hop routing with OWLT (1->3->4->5 path)
- Contact timing constraints (waiting for contact windows)
- Unidirectional links (no reverse path)
- Path selection (choosing faster route via node 2 vs 3)
Reference: https://github.com/nasa/HDTN
The arrival_time function was using departure_time (contact start) as the
initial time, but should use start_time (query time when we were at the
source). This caused incorrect arrival times when the query time was after
a contact's start time.
Found by fuzz testing.
ocaml-git:
- Add Repository module for high-level Git access
- Transparent loose object + pack file reading
- Zlib compression/decompression for loose objects
- Lazy pack file loading
irmin:
- Simplify git_interop to use Git.Repository directly
- Add open_git for working directory repos
- Pack files handled transparently
Also resolves bundle opam conflict (use tangled.org).
- Regenerate opam files after source URL updates
- Add README files for irmin, git
- Add hash serialization ops (hash_to_bytes, hash_to_hex, hash_of_hex,
hash_equal, hash_compare) to Tree_format.S
- Add commit operations to Tree_format.S using ocaml-git for Git format
- Implement MST commit parsing/encoding using atp Dagcbor
- Fix closed vs open variant types in node_of_bytes and read_object
- Remove unused helper functions from git_interop.ml
- Simplify commit.ml to delegate to Tree_format
Rename CamelCase internal modules to Snake_case per OCaml convention:
- ocaml-hap: TlvType→Tlv_type, HapError→Hap_error, CharType→Char_type
- ocaml-cookeio: SameSite→Same_site, DateParser→Date_parser
- ocaml-claudeio: PreToolUse→Pre_tool_use, PostToolUse→Post_tool_use,
UserPromptSubmit→User_prompt_submit, SubagentStop→Subagent_stop,
PreCompact→Pre_compact (wire format strings preserved)
- irmin: StringMap→String_map, PathSet→Path_set
- ocaml-block: ReadOnly→Read_only, WithCrc→With_crc
Add individual Alcotest test files for ocaml-atp (tid, handle, did, nsid,
record_key, at_uri, mst, car, block_map, blockstore, dagcbor, cid, blob_ref,
eio_error, lex, repo_key, varint), hermest (codegen_jsont, emitter,
lexicon_types, scc), standard-site, tangled, xrpc, xrpc-auth, and bloom.
Fix catch-all exception handlers (E105), redundant function prefixes (E331),
and expose parse functions in ocaml-arp for testability.
- E605: Split monolithic test_irmin.ml into 10 per-module test files
(test_hash, test_tree, test_backend, test_store, test_codec, test_link,
test_proof, test_commit, test_git_interop, test_subtree)
- E410: Fix doc arg count for any_algorithm, any_to_bytes, any_to_hex
- E415: Add Proof.pp pretty-printer
- Tidy irmin bin commands (cmd_checkout, cmd_import, cmd_info)
- Tidy irmin lib (backend, codec, link) and add irmin.mli
- Fix merlint E331 rule, dune fmt across space-dtn
- ocaml-git: Add advance_head function that properly updates branch refs
instead of writing directly to HEAD, preventing detached HEAD state
- ocaml-git: Add tests for advance_head in both branch and detached modes
- monopam: Add dune-build-info for proper versioning
- monopam: Add cram test for workflow commands
- Simplify homebrew.yml: use `target` path instead of package/exe_name
- Rename prune to pruner (avoid conflict with graphviz)
- Add parallel uploads with rclone --transfers 16
- Fix hyphenated name parsing (git-mono was parsed as "git")
- Add timing output for build/upload/tap update steps
- Add dry-run command to preview build targets
The @ocaml-index target was failing because:
1. Test modules lacked .mli files needed for index generation
2. Test directories with multiple executables didn't specify (modules),
causing dune to include all .ml files in each executable - modules
using alcotest were included in executables without that dependency
Added empty .mli stubs and explicit (modules) fields. Also added
(enabled_if (= %{context_name} "default")) to disable tests in afl context.
- Add fpath dependency to ocaml-git
- Update Git.Repository API to use Fpath.t for:
- open_repo, open_bare, init, is_repo, git_dir
- Update all callers in irmin and monopam to use Fpath.t
- Remove duplicate functions from Git_cli that now use native ocaml-git:
- is_repo (use Git.Repository.is_repo)
- is_dirty (use Git.Repository.is_dirty)
- current_branch (use Git.Repository.current_branch)
- ahead_behind (use Git.Repository.ahead_behind)
- ls_remote_head (unused)
- list_remotes, get_remote_url, add_remote, remove_remote,
set_remote_url, ensure_remote (use Git.Repository.*)
This reduces subprocess spawning in hot paths and provides type-safe
path handling throughout the git operations.
Integrates existing monorepo storage packages:
- ocaml-wal: crash-safe writes with CRC checksums
- ocaml-bloom: fast negative lookups for exists()
Write path now:
1. Write to WAL (crash-safe with CRC)
2. Write to data file
3. Update in-memory index and bloom filter
4. On flush: save index and bloom, then clear WAL
Recovery on startup:
1. Load index and bloom from disk
2. Replay any WAL entries not yet in index
Adds test for WAL crash recovery scenario.
Implements Backend.Disk module for persistent storage:
- objects.data: append-only file for all objects
- objects.idx: index mapping hex hash -> (offset, length)
- refs/: directory with nested paths for refs
Design inspired by lavyek's append-only storage patterns
for high write throughput.
Features:
- Thread-safe with Eio.Mutex
- Atomic index updates via rename
- Recursive ref directory scanning
- Supports nested refs like refs/heads/main
Adds 4 tests: basic operations, persistence, refs, and batch writes.
Implements the previously stubbed diff function that compares two trees
and yields a sequence of changes (Add, Remove, Change).
The algorithm recursively traverses both trees and:
- Emits Remove for entries only in old tree
- Emits Add for entries only in new tree
- Emits Change for modified contents
- Handles subtree transitions (contents ↔ node)
Import test scenarios from NASA's HDTN (High-rate Delay Tolerant Network):
- cgrTutorial: 5-node network from pyCGR tutorial (16 contacts)
- contactPlan_RoutingTest: 6-node routing scenario (8 contacts)
Test cases verify:
- Multi-hop routing with OWLT (1->3->4->5 path)
- Contact timing constraints (waiting for contact windows)
- Unidirectional links (no reverse path)
- Path selection (choosing faster route via node 2 vs 3)
Reference: https://github.com/nasa/HDTN
ocaml-git:
- Add Repository module for high-level Git access
- Transparent loose object + pack file reading
- Zlib compression/decompression for loose objects
- Lazy pack file loading
irmin:
- Simplify git_interop to use Git.Repository directly
- Add open_git for working directory repos
- Pack files handled transparently
Also resolves bundle opam conflict (use tangled.org).
- Add hash serialization ops (hash_to_bytes, hash_to_hex, hash_of_hex,
hash_equal, hash_compare) to Tree_format.S
- Add commit operations to Tree_format.S using ocaml-git for Git format
- Implement MST commit parsing/encoding using atp Dagcbor
- Fix closed vs open variant types in node_of_bytes and read_object
- Remove unused helper functions from git_interop.ml
- Simplify commit.ml to delegate to Tree_format