commits
E605 fixes (25 new test files):
- monopam: test_lint (Lint module types, issue construction)
- irmin: test_irmin (Hash roundtrips, commit types, Tree API)
- ocaml-tls: test_core, test_state, test_x509_eio
- ocaml-x509 (19 files with RFC test vectors): pem, distinguished_name,
host, algorithm, certificate, validation, extension, general_name,
key_type, public_key, private_key, signing_request, crl,
authenticator, asn_grammars, ocsp, p12, rc2, registry
E617 fixes (2 naming): module_alias_parsing, warning_parse
Adds 108 missing dependency declarations across 52 packages.
Most common missing dep was fmt (38 packages), followed by wire,
eio, and bytesrw. Also improves lint output with tty tables and
better subtree filtering display.
- Rename commit_info type to commit, hash field to id
- Change log signature to use optional limit with unit arg
- Return Result from update_branch instead of bool
- Add Tree.pp and Hash.compare
- Rewrite mli documentation with richer descriptions
Add a unit test that catches the duplicate-entry bug (add same name twice
should replace, not accumulate). Add a Crowbar model-based fuzz suite that
applies random Add/Remove sequences to both Git.Tree.t and a Map reference,
checking no-duplicates, sorted-order, and model-agreement invariants after
every step. The roundtrip-after-ops test also exercises serialization across
arbitrary op sequences.
Git_interop was leaking as a top-level module with _git-suffixed names.
All callers now use Irmin.Git.{init,open_,import,read_object,...}.
Low-level object/ref ops folded into Git module alongside store builders.
- common.ml: replace Mst_tree + per-backend modules with Mst_store functor;
all backends now use module S = Store.Git/Store.Mst so ops are S.*
- config: add Disk backend (append-only WAL); single canonical name per backend
- git_interop: skip write if object exists; fix blob/tree detection with try-parse
- pds_interop: add mst_backend bridging Pds.t to Backend.t
- irmin.ml: add Git.open_/init/import and Mst.of_pds/disk/memory builders
- ocaml-git/repository: mkdirs instead of mkdir in init (handles nested paths)
- cmd_info/export: use Git.open_ instead of import_git ~git_dir
ocaml-tty (92→0):
- E205: Printf→Fmt in gen_corpus.ml, test_progress.ml, minimal_progress.ml
- E330: rename tree_view→view in tree.ml
- E400/E405/E410: add missing docs in color.mli, style.mli, border.mli,
table.mli, width.mli; fuzz_tty.mli module doc
- E600/E617: create 9 test_*.mli files; lowercase all suite names
- E618: add explicit modules list to test stanza in test/dune
- E718/E725: create fuzz/fuzz.ml runner; suite name "tty"
ocaml-wire (109→0):
- E005: extract parse_bf_field, check_all_zeros, encode_bf_accum helpers
- E010: extract emit_field_constraint helpers to reduce nesting in gen_c.ml
- E205: Format→Fmt in test_wire.ml (40 occurrences)
- E216: invalid_arg (Fmt.str) → Fmt.invalid_arg
- E330: rename wire_size_of_* → size_of_* in wire.ml/wire.mli
- E400/E405/E410: add docs in fuzz_wire.mli, diff_gen.mli, wire.mli, wire_c.mli
- E605/E600: create test/c, test/diff-gen, test/diff test files + mlis
Fix callers of renamed APIs across monorepo:
- Tty.Progress.create → Tty.Progress.v
- Tty.Panel.create_lines → Tty.Panel.lines
- Tty.Table.create → Tty.Table.v
- Xdge.create → Xdge.v
All test suite names now follow the convention: lowercase snake_case
matching the test filename. Changes:
- crowbar examples: 'crowbar' → filename (calendar/fpath/map/pprint/uunf)
- irmin: uppercase suites → lowercase
- memtrace: uppercase/mismatched → lowercase matching filename
- monopam/ocaml-agent/ocaml-aos/ocaml-conpool/ocaml-cookeio/ocaml-crow:
uppercase → lowercase
- ocaml-crypto: 'cipher' → 'crypto'
- ocaml-github-oauth: 'github-oauth' → 'github_oauth'
- ocaml-jsonwt/ocaml-linkedin/ocaml-merlin: mismatch fixed
- ocaml-oci: rename test_OS.ml/.mli → test_os.ml/.mli, suite 'OS' → 'os'
- ocaml-precommit: 'hooks' → 'precommit'
- ocaml-sexpt: 'dune_codec' → 'dune'
- ocaml-slack: 'md' → 'markdown'
- ocaml-sle: 'FCLTU' → 'fcltu'
- ocaml-space-packet: 'space-packet' → 'space_packet'
- ocaml-tls: 'tls-eio'/'tls-unix' → snake_case
- ocaml-tomlt: 'tomlt-*' → snake_case
Improve the opening description to explain what Irmin is and does.
Add a CLI section documenting the serve command (expose store as
read-only ATProto PDS over XRPC). Fix Codec alignment in module tree.
Dune uses "\| and "\> prefixes for multi-line strings, which are not
standard S-expressions. Preprocess these into regular quoted strings
before parsing with parsexp, fixing "unterminated quoted string" errors
on projects like crowbar.
git-subtree-dir: irmin
git-subtree-mainline: 514292391346adaa90f408d3190a9f42dc3c1e64
Strip get_/make_/find_/create_ from 138 function definitions and all
call sites across ocaml-pds, ocaml-pid1, ocaml-precommit,
ocaml-publicsuffix, ocaml-qemu, ocaml-requests, ocaml-retry, and
ocaml-rpmsg. Use Module.v for constructors per the E331 convention.
- xrpc_server: add on_listen callback with actual bound port (supports port 0)
- pds: register Eio.Switch.on_release for DB close in create/open_
- irmin: use on_listen in cmd_serve, close PDS in cmd_init, add interop cram test
- rpmsg: rename test_endpoint → test_rpmsg for consistency
- E320: shorten long identifier names in irmin/test/test_pds_interop.ml
- E335: remove underscore prefix from used bindings (env)
- E405: add doc comment to test_pds_interop.mli
- E600: flatten suite to single pair (string * test_case list)
- E610: extract PDS interop helpers into irmin/lib/pds_interop.ml
- E718: consolidate fuzz modules (punycode, rate-limit, requests, rpmsg)
Delete fuzz_common.ml from ocaml-git and ocaml-merlin (inline trivial
truncate helper). Merge openamp firmware/remoteproc into single suite.
Add test_pds_interop.mli for E600.
17 tests across 8 suites verifying PDS↔MST interop: write/read in both
directions, roundtrip modify/delete, CAR export/import, persistence
across sessions, DID preservation, leaf ordering consistency, and
DAG-CBOR content integrity.
Standardize fuzz and test conventions across 30+ packages:
- E715/E718: Add fuzz.ml runners referencing Fuzz_*.suite instead of
calling Fuzz_*.run() directly; update dune files accordingly
- E725: Fix fuzz_paseto suite name from "crowbar" to "paseto"
- E600: Create .mli interfaces for test modules (test_firmware,
test_remoteproc, test_pbkdf2, test_paseto) with single-group suites
- E605: Add missing test files (test_skills, test_monitor, test_openamp,
test_xrpc_server) with proper module extraction from inline test.ml
- E415: Add pp pretty-printer to xrpc_server type t
- E405: Add doc comment for pp_sync_action in skills.mli
- E205: Replace Printf with Fmt in fuzz_paseto and gen_corpus
- E331: Rename make_key to key in fuzz_paseto
Add atp-xrpc-server library — minimal Eio HTTP server routing
/xrpc/<nsid> to handlers with CORS, percent-decoding, and JSON errors.
Merge Mst backend into PDS: "mst"/"atproto" are now aliases for "pds"
which uses SQLite (via ocaml-sqlite) instead of one-file-per-CID on
the filesystem. Auto-detect pds.db in detect_backend.
Add `irmin serve` command that exposes any backend (Git, PDS, Memory)
as a read-only ATProto PDS over XRPC. Supports --format=xrpc (default,
extensible), --port (default 2583), --did (auto-detected from PDS
metadata). Implements describeServer, describeRepo, getRecord,
listRecords, getRepo, and getBlob endpoints. DAG-CBOR content is
decoded to JSON with CID links as {"$link":"..."}, non-CBOR content
(Git) is served as-is.
- make_routes → routes (irmin/bin/cmd_serve.ml)
- find_project_dir → project_dir (ocaml-claude-skills/bin/main.ml)
- create_skill → skill (ocaml-claude-skills/test/test.ml)
- create_remoteproc → remoteproc (ocaml-openamp/test/test_remoteproc.ml)
- _hash → hash or _ (irmin/bin/common.ml)
- Replace Printf.sprintf/Format.asprintf with Fmt.str in test files
(irmin, monopam, ocaml-agent)
- Add explicit (modules ...) to disambiguate multi-stanza test dune files
(ocaml-atp, ocaml-tty, ocaml-wire)
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
E605 fixes (25 new test files):
- monopam: test_lint (Lint module types, issue construction)
- irmin: test_irmin (Hash roundtrips, commit types, Tree API)
- ocaml-tls: test_core, test_state, test_x509_eio
- ocaml-x509 (19 files with RFC test vectors): pem, distinguished_name,
host, algorithm, certificate, validation, extension, general_name,
key_type, public_key, private_key, signing_request, crl,
authenticator, asn_grammars, ocsp, p12, rc2, registry
E617 fixes (2 naming): module_alias_parsing, warning_parse
Add a unit test that catches the duplicate-entry bug (add same name twice
should replace, not accumulate). Add a Crowbar model-based fuzz suite that
applies random Add/Remove sequences to both Git.Tree.t and a Map reference,
checking no-duplicates, sorted-order, and model-agreement invariants after
every step. The roundtrip-after-ops test also exercises serialization across
arbitrary op sequences.
- common.ml: replace Mst_tree + per-backend modules with Mst_store functor;
all backends now use module S = Store.Git/Store.Mst so ops are S.*
- config: add Disk backend (append-only WAL); single canonical name per backend
- git_interop: skip write if object exists; fix blob/tree detection with try-parse
- pds_interop: add mst_backend bridging Pds.t to Backend.t
- irmin.ml: add Git.open_/init/import and Mst.of_pds/disk/memory builders
- ocaml-git/repository: mkdirs instead of mkdir in init (handles nested paths)
- cmd_info/export: use Git.open_ instead of import_git ~git_dir
ocaml-tty (92→0):
- E205: Printf→Fmt in gen_corpus.ml, test_progress.ml, minimal_progress.ml
- E330: rename tree_view→view in tree.ml
- E400/E405/E410: add missing docs in color.mli, style.mli, border.mli,
table.mli, width.mli; fuzz_tty.mli module doc
- E600/E617: create 9 test_*.mli files; lowercase all suite names
- E618: add explicit modules list to test stanza in test/dune
- E718/E725: create fuzz/fuzz.ml runner; suite name "tty"
ocaml-wire (109→0):
- E005: extract parse_bf_field, check_all_zeros, encode_bf_accum helpers
- E010: extract emit_field_constraint helpers to reduce nesting in gen_c.ml
- E205: Format→Fmt in test_wire.ml (40 occurrences)
- E216: invalid_arg (Fmt.str) → Fmt.invalid_arg
- E330: rename wire_size_of_* → size_of_* in wire.ml/wire.mli
- E400/E405/E410: add docs in fuzz_wire.mli, diff_gen.mli, wire.mli, wire_c.mli
- E605/E600: create test/c, test/diff-gen, test/diff test files + mlis
Fix callers of renamed APIs across monorepo:
- Tty.Progress.create → Tty.Progress.v
- Tty.Panel.create_lines → Tty.Panel.lines
- Tty.Table.create → Tty.Table.v
- Xdge.create → Xdge.v
All test suite names now follow the convention: lowercase snake_case
matching the test filename. Changes:
- crowbar examples: 'crowbar' → filename (calendar/fpath/map/pprint/uunf)
- irmin: uppercase suites → lowercase
- memtrace: uppercase/mismatched → lowercase matching filename
- monopam/ocaml-agent/ocaml-aos/ocaml-conpool/ocaml-cookeio/ocaml-crow:
uppercase → lowercase
- ocaml-crypto: 'cipher' → 'crypto'
- ocaml-github-oauth: 'github-oauth' → 'github_oauth'
- ocaml-jsonwt/ocaml-linkedin/ocaml-merlin: mismatch fixed
- ocaml-oci: rename test_OS.ml/.mli → test_os.ml/.mli, suite 'OS' → 'os'
- ocaml-precommit: 'hooks' → 'precommit'
- ocaml-sexpt: 'dune_codec' → 'dune'
- ocaml-slack: 'md' → 'markdown'
- ocaml-sle: 'FCLTU' → 'fcltu'
- ocaml-space-packet: 'space-packet' → 'space_packet'
- ocaml-tls: 'tls-eio'/'tls-unix' → snake_case
- ocaml-tomlt: 'tomlt-*' → snake_case
- E320: shorten long identifier names in irmin/test/test_pds_interop.ml
- E335: remove underscore prefix from used bindings (env)
- E405: add doc comment to test_pds_interop.mli
- E600: flatten suite to single pair (string * test_case list)
- E610: extract PDS interop helpers into irmin/lib/pds_interop.ml
- E718: consolidate fuzz modules (punycode, rate-limit, requests, rpmsg)
Standardize fuzz and test conventions across 30+ packages:
- E715/E718: Add fuzz.ml runners referencing Fuzz_*.suite instead of
calling Fuzz_*.run() directly; update dune files accordingly
- E725: Fix fuzz_paseto suite name from "crowbar" to "paseto"
- E600: Create .mli interfaces for test modules (test_firmware,
test_remoteproc, test_pbkdf2, test_paseto) with single-group suites
- E605: Add missing test files (test_skills, test_monitor, test_openamp,
test_xrpc_server) with proper module extraction from inline test.ml
- E415: Add pp pretty-printer to xrpc_server type t
- E405: Add doc comment for pp_sync_action in skills.mli
- E205: Replace Printf with Fmt in fuzz_paseto and gen_corpus
- E331: Rename make_key to key in fuzz_paseto
Add atp-xrpc-server library — minimal Eio HTTP server routing
/xrpc/<nsid> to handlers with CORS, percent-decoding, and JSON errors.
Merge Mst backend into PDS: "mst"/"atproto" are now aliases for "pds"
which uses SQLite (via ocaml-sqlite) instead of one-file-per-CID on
the filesystem. Auto-detect pds.db in detect_backend.
Add `irmin serve` command that exposes any backend (Git, PDS, Memory)
as a read-only ATProto PDS over XRPC. Supports --format=xrpc (default,
extensible), --port (default 2583), --did (auto-detected from PDS
metadata). Implements describeServer, describeRepo, getRecord,
listRecords, getRepo, and getBlob endpoints. DAG-CBOR content is
decoded to JSON with CID links as {"$link":"..."}, non-CBOR content
(Git) is served as-is.
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).