commits
Two changes squashed because they uncovered each other:
1. Sweep [(alcotest :with-test)] into 18 packages whose tests use
alcotest but didn't declare it in opam. Each verified by build +
runtest. Affected: ocaml-adm, ocaml-aem, ocaml-agent, ocaml-cdm,
ocaml-conpool, ocaml-coordinate, ocaml-csv, ocaml-demod, ocaml-dsp,
ocaml-flexacm, ocaml-globe, ocaml-kepler, ocaml-kvn, ocaml-rdm,
ocaml-respond, ocaml-spacedata, ocaml-stix, ocaml-vec3, osrelease.
2. [monopam lint] now treats every workspace-local library name as
workspace-internal, not just the ones with no [(public_name ...)].
Before, [local_private_libs] called [Dune.File.private_library_names]
which only returned [(library (name X))] stanzas WITHOUT a public
name. So a [(library (name cookie_jar) (public_name nox-cookie.jar))]
was treated as external -- a sibling [(test (libraries cookie_jar))]
triggered a [Missing_test] for a non-existent opam package
[cookie_jar].
Switch to [Dune.File.library_names] (every internal name) and rename
the helper to [local_library_names]. A workspace-local
[(libraries X)] now resolves to the workspace artifact regardless of
whether [X] also has a public_name; opam-package matching only
applies to truly-external library refs.
Cleared a swathe of false-positive missing-test reports for
subtrees that internally dot-name their sub-libraries (irmin's
irmin_admin/irmin_cbor/..., ocaml-cookie's cookie_jar, ocaml-claude-
skills's skills, etc.).
The block ran at top level so mdx executed [Osrelease.OS.v ()] /
[Distro.v ()] and printed machine-specific output ("Running on macos
/ arm64") which then failed the diff. Wrap as [detect () = ...],
switch [Format.printf]/[Format.eprintf] to [Fmt.pr]/[Fmt.epr], add
[fmt] to the mdx libraries.
The READMEs all share the standard install/overlay snippet, but the
sh blocks lacked the "<!-- $MDX skip -->" directive. `dune test`
would shell out to `opam install` against the live switch, which
either prompts interactively or fails with a package conflict —
either way diffing as a test failure.
Bulk-add skip directives in front of every install/overlay block.
Also collapse the doubled "non-deterministic + skip" stack on three
READMEs (memtrace, ocaml-dpop, ocaml-pid1, ocaml-yaml, merlint) where
`skip` already implies the runtime is bypassed.
Pure formatting changes from `dune fmt`: doc comment placement moves
from above the binding to below it for `type`s, multi-line `match`
expressions collapse onto one line where they fit, and infix operator
applications pick up spaces (`Soup.($?)` -> `Soup.( $? )`). No
semantic changes.
Follow up to the module rename: update the remaining callers that
still referenced [Err] (library [claude.ml{,i}], [client.ml], the test
driver [test.ml]), and fix one stray [^ e] string concatenation in
hermest's CLI that needed [Json.Error.to_string e] now that
[Json.of_string] yields a structured error.
Warning 69 (unused-field, mutable-never-assigned). Four independent
record fields were flagged as mutable but the code only mutates their
referents in place, never rebinds the record slot itself:
- ocaml-wal/lib/wal.ml: [t.file] (the Eio file resource; methods call
Eio.File.pwrite_all etc., the slot is set once at open time).
- ocaml-block/lib/block.ml: [Memory.state.data] (the backing bytes,
written via Bytes.blit_string; [Bytes.t] is already mutable).
- ocaml-sse/lib/sse.ml: [Parser.t.data_buf] (a Buffer.t, written via
Buffer.add_*; the slot never changes).
- ocaml-zephyr/lib/zephyr.ml: drop [mode : Read | Write] entirely —
set at open-time, read nowhere. The open_read / open_write
constructors already distinguish the two call shapes, so mode
tracking was redundant.
Generate .opam.template files with x-quality-* fields based on
detected package features:
- x-quality-build: has lib/ with .ml files
- x-quality-test: has test/ with .ml files
- x-quality-fuzz: has fuzz/ with .ml files
- x-quality-interop: has test/interop/ directory
- x-quality-cram: has test/*.t/ directories
These fields are picked up by dune's opam generation and will be
checked by merlint E910 for consistency.
Also: add fmt dep to ocaml-sse/lib/dune (Fmt.pf used without dep).
monopam quality — scans packages for quality features, caches by
git commit hash. 166 packages: build=163, test=162, fuzz=94,
interop=39, doc=42.
Standard vocabulary based on crates.io categories, erratique/opam
conventions, and monorepo domain coverage:
Org: org:blacksun
Domain: aerospace, codec, crypto, network, storage, git, merkle
Purpose: cli, test, bench, format, log, system
Protocol: ccsds, uslp, cop1, sdls, sle, atproto, tls, http, json, binary
Cross-cutting: eio, simulation, math, compression
Tags placed in dune-project (package ...) stanzas via (tags ...).
Propagated to .opam files by dune's opam generation.
- Update .ocamlformat to 0.29.0 across all 591 files
- csvt: reuse single Buffer.t for field reads (no alloc per field)
- sexpt: Obj members decoded from stream into Dict, typed Variant GADT
- Reformat all source files for 0.29.0
New READMEs for: ocaml-auth, ocaml-cose, ocaml-http, ocaml-osv,
ocaml-rego, ocaml-scitt, ocaml-sigstore, ocaml-vec3.
Expanded: ca-certs (7→40 lines), osrelease (8→45 lines).
Each includes: synopsis, installation, usage example, API overview,
and license. Skipped ocaml-cel and ocaml-chor (no code yet).
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.
- Fix catch-all exception → Scanf.Scan_failure | Failure (E105)
- Add module documentation comment to osrelease.mli (E400)
- Add docs for all 20 public values in Arch, OS, Distro, Version (E405)
- Create test/test_osrelease.ml/mli, test.ml, dune (E605)
Migrate Printf.sprintf to Fmt.str, Format.fprintf to Fmt.pf, and
Format.pp_print_string to Fmt.string across bundle, gpt, hap, homebrew,
jsonwt, matter, mbr, meross, paseto, precommit, publicsuffix, qemu,
retry, sdnv, slack, sle, space-packet, spake2, sqlite, squashfs, tar,
tc, tcf, tcpcl, tm, tomlt, tty, uslp, vlog, wal, wire, yamlrw, yamlt,
osrelease, space, xdge, and crypto test runner.
Two changes squashed because they uncovered each other:
1. Sweep [(alcotest :with-test)] into 18 packages whose tests use
alcotest but didn't declare it in opam. Each verified by build +
runtest. Affected: ocaml-adm, ocaml-aem, ocaml-agent, ocaml-cdm,
ocaml-conpool, ocaml-coordinate, ocaml-csv, ocaml-demod, ocaml-dsp,
ocaml-flexacm, ocaml-globe, ocaml-kepler, ocaml-kvn, ocaml-rdm,
ocaml-respond, ocaml-spacedata, ocaml-stix, ocaml-vec3, osrelease.
2. [monopam lint] now treats every workspace-local library name as
workspace-internal, not just the ones with no [(public_name ...)].
Before, [local_private_libs] called [Dune.File.private_library_names]
which only returned [(library (name X))] stanzas WITHOUT a public
name. So a [(library (name cookie_jar) (public_name nox-cookie.jar))]
was treated as external -- a sibling [(test (libraries cookie_jar))]
triggered a [Missing_test] for a non-existent opam package
[cookie_jar].
Switch to [Dune.File.library_names] (every internal name) and rename
the helper to [local_library_names]. A workspace-local
[(libraries X)] now resolves to the workspace artifact regardless of
whether [X] also has a public_name; opam-package matching only
applies to truly-external library refs.
Cleared a swathe of false-positive missing-test reports for
subtrees that internally dot-name their sub-libraries (irmin's
irmin_admin/irmin_cbor/..., ocaml-cookie's cookie_jar, ocaml-claude-
skills's skills, etc.).
The READMEs all share the standard install/overlay snippet, but the
sh blocks lacked the "<!-- $MDX skip -->" directive. `dune test`
would shell out to `opam install` against the live switch, which
either prompts interactively or fails with a package conflict —
either way diffing as a test failure.
Bulk-add skip directives in front of every install/overlay block.
Also collapse the doubled "non-deterministic + skip" stack on three
READMEs (memtrace, ocaml-dpop, ocaml-pid1, ocaml-yaml, merlint) where
`skip` already implies the runtime is bypassed.
Follow up to the module rename: update the remaining callers that
still referenced [Err] (library [claude.ml{,i}], [client.ml], the test
driver [test.ml]), and fix one stray [^ e] string concatenation in
hermest's CLI that needed [Json.Error.to_string e] now that
[Json.of_string] yields a structured error.
Warning 69 (unused-field, mutable-never-assigned). Four independent
record fields were flagged as mutable but the code only mutates their
referents in place, never rebinds the record slot itself:
- ocaml-wal/lib/wal.ml: [t.file] (the Eio file resource; methods call
Eio.File.pwrite_all etc., the slot is set once at open time).
- ocaml-block/lib/block.ml: [Memory.state.data] (the backing bytes,
written via Bytes.blit_string; [Bytes.t] is already mutable).
- ocaml-sse/lib/sse.ml: [Parser.t.data_buf] (a Buffer.t, written via
Buffer.add_*; the slot never changes).
- ocaml-zephyr/lib/zephyr.ml: drop [mode : Read | Write] entirely —
set at open-time, read nowhere. The open_read / open_write
constructors already distinguish the two call shapes, so mode
tracking was redundant.
Generate .opam.template files with x-quality-* fields based on
detected package features:
- x-quality-build: has lib/ with .ml files
- x-quality-test: has test/ with .ml files
- x-quality-fuzz: has fuzz/ with .ml files
- x-quality-interop: has test/interop/ directory
- x-quality-cram: has test/*.t/ directories
These fields are picked up by dune's opam generation and will be
checked by merlint E910 for consistency.
Also: add fmt dep to ocaml-sse/lib/dune (Fmt.pf used without dep).
Standard vocabulary based on crates.io categories, erratique/opam
conventions, and monorepo domain coverage:
Org: org:blacksun
Domain: aerospace, codec, crypto, network, storage, git, merkle
Purpose: cli, test, bench, format, log, system
Protocol: ccsds, uslp, cop1, sdls, sle, atproto, tls, http, json, binary
Cross-cutting: eio, simulation, math, compression
Tags placed in dune-project (package ...) stanzas via (tags ...).
Propagated to .opam files by dune's opam generation.
Migrate Printf.sprintf to Fmt.str, Format.fprintf to Fmt.pf, and
Format.pp_print_string to Fmt.string across bundle, gpt, hap, homebrew,
jsonwt, matter, mbr, meross, paseto, precommit, publicsuffix, qemu,
retry, sdnv, slack, sle, space-packet, spake2, sqlite, squashfs, tar,
tc, tcf, tcpcl, tm, tomlt, tty, uslp, vlog, wal, wire, yamlrw, yamlt,
osrelease, space, xdge, and crypto test runner.