commits
create_user now catches Unique_violation from the identity insert and
deletes the just-inserted user row before re-raising. Added delete_row
to ocaml-sqlite for generic table row deletion (with index cleanup).
Splits the 117-line open_ function into smaller pieces to satisfy
merlint E005 (long function threshold).
Indexes are now stored as Btree.Index B-trees in the database file and
registered in sqlite_master as type "index" (sqlite_autoindex_<tbl>_<n>),
matching real SQLite behavior. No more full table scan on reopen.
ocaml-sqlite: Parse and enforce UNIQUE constraints (column-level and
table-level) via in-memory hash indexes. Raises Unique_violation on
conflict. Indexes are rebuilt on database reopen.
ocaml-auth: Add UNIQUE(provider, provider_uid) to oauth_identities
schema. Callback now catches Unique_violation on concurrent creates
and falls back to the existing identity.
ocaml-oauth: Classify parse_token_response errors into Invalid_json,
Missing_access_token, and Invalid_token_format instead of collapsing
all failures to Invalid_json.
1. Sqlite: silent data loss on corrupt DB — Store.v caught all exceptions
and fell back to Sqlite.v (which truncates). Now only catches Eio.Io
(file not found). Remove Sqlite.v; add Sqlite.open_ ~create flag.
2. Sign-out: now revokes server-side session via Store.delete_session.
Previously only cleared the browser cookie — copied sid stayed valid.
Changed to POST /auth/signout with header-based session lookup.
3. OAuth: authorization URL now includes response_type=code per RFC 6749.
4. OAuth: token exchange/refresh now uses application/x-www-form-urlencoded
per RFC 6749, not JSON. Removed JSON-body functions, added form_encode
helper and exchange_form_body/refresh_form_body returning strings.
5. Auth: callback now uses provider.userinfo_url instead of hardcoded
GitHub API. Added userinfo_url to Oauth.provider type. Google, GitLab,
and custom providers can now complete login.
ocaml-kvn: CCSDS Key-Value Notation parser.
ocaml-ocm: CCSDS 505.0-B-2 Orbit Comprehensive Message parser.
Tested against TraCSS LANDSAT 5 OCM file.
Add generic write API: create_table parses CREATE TABLE SQL to register
new tables, insert writes rows with auto or explicit rowids (including
INTEGER PRIMARY KEY handling). 11 new tests cover all value types,
persistence, coexistence with KV API, and error cases.
Fix invalid odoc markup in 54 files: convert {\!Module} to {!Module}
in fuzz .mli files, replace inline {v ... v} with [...] code spans,
fix "paragraph should begin on its own line" warnings, escape bare
brackets, and resolve ambiguous docstring placement (warning 50).
- Remove vendored crowbar/ directory
- Replace all Crowbar references with Alcobar across 176 .ml files
- Update all fuzz dune files: crowbar → alcobar in libraries
- Remove 77 gen_corpus.ml files (alcobar handles corpus internally)
- Update dune-project files: crowbar → alcobar in dependencies
- Update merlint rules (e705, e726): Crowbar → Alcobar in checks,
docs, and examples
- Update merlint generated docs (index.html)
428 files changed, ~1200 lines removed net.
The 20-byte reserved-for-expansion region was not being zeroed,
causing non-zero bytes from the reused page buffer to leak into
the database header. Found by the spec header values test.
B-tree tests (56 total):
- Overflow thresholds: X=U-35, M=((U-12)*32/255)-23 for all page sizes
- Boundary: exact max_local (4061), X+1 (4062), multi-page overflow
- All valid page sizes (512..65536) with and without overflow
- Page type flags, header sizes, varint 9-byte encoding
- Record serial types (NULL, int8/16/24/32/48/64, float, text, blob)
- Stress: 50 cells of increasing size with overflow + splits
SQLite tests (56 total):
- Database header byte-level: magic string, page size, payload fractions
(64/32/32), schema format, text encoding (UTF-8), reserved bytes
- change_counter == version_valid_for validity check
- Page 1 B-tree header at offset 100 (type=0x0d, fragmented<=60)
- Overflow value roundtrip and persistence across close/reopen
- Rename find_matching_paren -> matching_paren, find_table -> table
- Extract add_paren_content and extract_named_kv_tables helpers
- Add pp for type t; add err_kv_pair helper in sql.ml
- Parsing functions (int_of_string, float_of_string, Int64.of_string):
catch Failure _ instead of _
- TLS inhibit/try_write_t: use _exn to name the caught exception
- sql open_or_create: catch Failure _ | Eio.Io _
- run_tests json_equal: catch Failure _ | Invalid_argument _
Extract helpers: pp_column, pp_schema, write_entry, delete_entry,
sum_int_values to bring nesting below threshold of 4.
- ocaml-sqlite: merge generic_suite into suite, single export in .mli
- ocaml-tcpcl: add missing test_tcpcl.mli
- ocaml-tls: rename test_rng to mock_rng (helper, not test module)
- ocaml-tls: restructure test_tls_eio/unix stubs with test.ml runners
- ocaml-tomlt: restructure test_tomlt_{bytesrw,eio,unix} stubs with
test.ml runners and .mli files
open_ no longer requires a 'kv' table — it parses CREATE TABLE SQL from
sqlite_master to build schemas for every table. New generic read API
(tables, iter_table, fold_table, read_table) lets callers read any SQLite
database. INTEGER PRIMARY KEY columns get rowid substitution, and trailing
NULLs are padded per the SQLite storage optimization.
CLI gains `sql tables DB` and `sql read DB -t TABLE` subcommands.
- tls/tests: merge → single test.ml runner, remove ounit2, convert to alcotest
- tls/eio/tests: add crypto-rng dep (E606), add test_rng.mli
- tls/test: move testlib to test/helpers/ (named test_helpers) to fix naming
conflict; merge 10 stanzas → single test_core stanza without (modules)
- tls/test/eio: merge 2 stanzas → 1
- tomlt/test: merge 2 stanzas → single test.ml; expose suite in .mli files
- tcf/test: merge 2 stanzas → single test.ml; convert runners to suite values
Linter auto-fix: use Fmt.str instead of Printf.sprintf in sdnv,
space-packet, sqlite, and tc test files.
Use Eio.Io for mkdirs calls in lib/tests, and _exn for fuzz crash
safety tests.
Extract Error (Fmt.str ...) into err_ec helper for consistent error
handling, and add pretty-printer for config type.
Update ocaml-pds and ocaml-sqlite test callers to match the
renamed constructor.
Move fuzz_util.ml to a private fuzz_helpers library, add missing test
module .mli files, create test stubs for rcf/sle/sle_eio, and add
docstrings to SLE .mli interfaces.
- sle: remove old fuzz_sle.ml runner (fuzz.ml already exists)
- space-packet/spake2/sqlite: add fuzz.ml runner, update dune
- space-packet: fix suite name "space-packet" -> "space_packet"
Add Pager.mem for purely in-memory B-tree storage (no file backing)
and Sqlite.in_memory constructor. Fuzz tests now run in 0.5s vs ~30s
by eliminating per-iteration Eio_main.run and file I/O overhead.
Also syncs ocaml-claude-skills upstream changes (plugin restructure)
and adds fuzz skill with updated Crowbar API patterns.
Update Crowbar.run calls to use (name, test_case list) list format,
add ~name label to Sqlite.Table.create and Openamp.Firmware.install,
add run() functions to openamp fuzz modules.
- Restore cursor on exit via at_exit in Tty.Progress (fixes TTY corruption)
- Install SIGINT handler in monopam test for clean Ctrl-C
- Add 2s per-iteration timeout and 2s total budget to crowbar
- Group crowbar alcotest output by module prefix ("mdns: foo" → group "mdns")
- Skip fuzz runtest in afl context (enabled_if <> profile afl)
- Add merlint E725: enforce "module: description" fuzz test name convention
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.
Remove redundant function prefixes (get_, find_, make_, create_, bundle_)
across bpsec, btree, bundle, cbort, cfdp, cgr, claudeio, and dependent
packages. Replace Printf.sprintf with Fmt.failwith, add err_eio/err_msg
helpers in skills.ml.
- License -> Licence
- color -> colour (in prose, not API/code)
- behavior -> behaviour
- analyze -> analyse
- organized -> organised
- Remove marketing buzzwords (leveraging)
- Remove emojis from prose
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.
borealis: add example yaml configs
sqlite: update interop test
ocaml-sqlite: Parse and enforce UNIQUE constraints (column-level and
table-level) via in-memory hash indexes. Raises Unique_violation on
conflict. Indexes are rebuilt on database reopen.
ocaml-auth: Add UNIQUE(provider, provider_uid) to oauth_identities
schema. Callback now catches Unique_violation on concurrent creates
and falls back to the existing identity.
ocaml-oauth: Classify parse_token_response errors into Invalid_json,
Missing_access_token, and Invalid_token_format instead of collapsing
all failures to Invalid_json.
1. Sqlite: silent data loss on corrupt DB — Store.v caught all exceptions
and fell back to Sqlite.v (which truncates). Now only catches Eio.Io
(file not found). Remove Sqlite.v; add Sqlite.open_ ~create flag.
2. Sign-out: now revokes server-side session via Store.delete_session.
Previously only cleared the browser cookie — copied sid stayed valid.
Changed to POST /auth/signout with header-based session lookup.
3. OAuth: authorization URL now includes response_type=code per RFC 6749.
4. OAuth: token exchange/refresh now uses application/x-www-form-urlencoded
per RFC 6749, not JSON. Removed JSON-body functions, added form_encode
helper and exchange_form_body/refresh_form_body returning strings.
5. Auth: callback now uses provider.userinfo_url instead of hardcoded
GitHub API. Added userinfo_url to Oauth.provider type. Google, GitLab,
and custom providers can now complete login.
- Remove vendored crowbar/ directory
- Replace all Crowbar references with Alcobar across 176 .ml files
- Update all fuzz dune files: crowbar → alcobar in libraries
- Remove 77 gen_corpus.ml files (alcobar handles corpus internally)
- Update dune-project files: crowbar → alcobar in dependencies
- Update merlint rules (e705, e726): Crowbar → Alcobar in checks,
docs, and examples
- Update merlint generated docs (index.html)
428 files changed, ~1200 lines removed net.
B-tree tests (56 total):
- Overflow thresholds: X=U-35, M=((U-12)*32/255)-23 for all page sizes
- Boundary: exact max_local (4061), X+1 (4062), multi-page overflow
- All valid page sizes (512..65536) with and without overflow
- Page type flags, header sizes, varint 9-byte encoding
- Record serial types (NULL, int8/16/24/32/48/64, float, text, blob)
- Stress: 50 cells of increasing size with overflow + splits
SQLite tests (56 total):
- Database header byte-level: magic string, page size, payload fractions
(64/32/32), schema format, text encoding (UTF-8), reserved bytes
- change_counter == version_valid_for validity check
- Page 1 B-tree header at offset 100 (type=0x0d, fragmented<=60)
- Overflow value roundtrip and persistence across close/reopen
- ocaml-sqlite: merge generic_suite into suite, single export in .mli
- ocaml-tcpcl: add missing test_tcpcl.mli
- ocaml-tls: rename test_rng to mock_rng (helper, not test module)
- ocaml-tls: restructure test_tls_eio/unix stubs with test.ml runners
- ocaml-tomlt: restructure test_tomlt_{bytesrw,eio,unix} stubs with
test.ml runners and .mli files
open_ no longer requires a 'kv' table — it parses CREATE TABLE SQL from
sqlite_master to build schemas for every table. New generic read API
(tables, iter_table, fold_table, read_table) lets callers read any SQLite
database. INTEGER PRIMARY KEY columns get rowid substitution, and trailing
NULLs are padded per the SQLite storage optimization.
CLI gains `sql tables DB` and `sql read DB -t TABLE` subcommands.
- tls/tests: merge → single test.ml runner, remove ounit2, convert to alcotest
- tls/eio/tests: add crypto-rng dep (E606), add test_rng.mli
- tls/test: move testlib to test/helpers/ (named test_helpers) to fix naming
conflict; merge 10 stanzas → single test_core stanza without (modules)
- tls/test/eio: merge 2 stanzas → 1
- tomlt/test: merge 2 stanzas → single test.ml; expose suite in .mli files
- tcf/test: merge 2 stanzas → single test.ml; convert runners to suite values
Add Pager.mem for purely in-memory B-tree storage (no file backing)
and Sqlite.in_memory constructor. Fuzz tests now run in 0.5s vs ~30s
by eliminating per-iteration Eio_main.run and file I/O overhead.
Also syncs ocaml-claude-skills upstream changes (plugin restructure)
and adds fuzz skill with updated Crowbar API patterns.
- Restore cursor on exit via at_exit in Tty.Progress (fixes TTY corruption)
- Install SIGINT handler in monopam test for clean Ctrl-C
- Add 2s per-iteration timeout and 2s total budget to crowbar
- Group crowbar alcotest output by module prefix ("mdns: foo" → group "mdns")
- Skip fuzz runtest in afl context (enabled_if <> profile afl)
- Add merlint E725: enforce "module: description" fuzz test name convention
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.