# Changelog Releases are cut weekly on **Tuesday** (see "Release policy" in `CLAUDE.md`). Every change merged to `main` adds a line under **Unreleased** in the same commit; cutting a release renames that heading to the version and date. Categories: Added, Changed (behaviour a consumer can observe), Fixed, Packaging. Mark every line **[server]**, **[client]** or **[both]**: a server-side change reaches every consumer when the server restarts, a client-side one only when they rebuild against the new library. Per-release detail (design, measurements, revert evidence) stays in `CLAUDE.md`; consumer-facing usage is in `docs/integration-guide.md`. ## Unreleased ## 2.20.1 - 2026-10-19 (bug fix, server only) ### Fixed - **[server]** ⚠ A snapshot held the whole store in memory twice more: the serialised body, a compressed copy beside it, and a copy of each collection's documents. A store that outgrew its host was OOM-killed at every snapshot, the WAL was never truncated, and recovery grew with it until the server could no longer boot. The writer now streams to disk a chunk at a time; a snapshot adds a few tens of MB to memory whatever the store's size. The file format is unchanged (older servers read the new files and the reverse). This removes the cause, not the failure mode: boot still holds the whole dataset in memory, so a large WAL left by anything else (a crash, a long stop, a full disk) can still keep a small host from booting (ROADMAP 5e). ### Added - **[server]** A snapshot that never finished (the process was killed while writing it) is reported at the next boot as an ERROR, with the WAL size and the age of the newest snapshot; a WARN whenever the WAL reaches twice the size that triggers a snapshot; and an INFO line at recovery naming the WAL size and the newest snapshot. Boot logs each step after the backfill. ## 2.20.0 - 2026-10-16 (out of cycle: security) ### Fixed - **[server]** REGEX filters ran on `std::regex`, which backtracks: a caller-supplied pattern such as `(a+)+$` could tie up a server thread for minutes against one long value (any key holder with a read grant). They now run on RE2, in time linear in the value, compiled once per query instead of once per row. Capability `re2_regex_filters`. - **[server]** A REGEX pattern that does not compile was answered as "no match"; find, count, similaritySearch and createView now refuse it with INVALID_ARGUMENT, reason `invalid_pattern` (reading the reason on a read call needs a 2.17.0+ client). - **[server]** Character classes over non-ASCII letters matched bytes: `[áÁ]` now matches one character, so `sz[áÁ]mfejt` matches and `[öÖ]` no longer matches unrelated accented text. `(?i)` works as a case-insensitive flag. ### Changed - **[server]** ⚠ Patterns with backreferences or lookaround are refused (`invalid_pattern`): RE2 has neither. A view stored with such a pattern matches nothing; recreate it. - **[client]** `Client::Capability::kRe2RegexFilters`. - Releases follow a weekly Tuesday cadence; hotfixes only for security, data loss and regressions of the latest release. (process, no code change) ## 2.19.0 - 2026-10-15 ### Added - `_expires_at` (absolute ms) on get/find/export when a document has an expiry; filterable on a 2.19.0 server (`document_expires_at`); reserved in write bodies (stripped by server and client). ## 2.18.1 - 2026-10-15 (client only) ### Added - `smartbotic-db-cli configure [--versioning on|off] [--max-versions N]`; `info` prints `default_ttl_seconds`. ### Packaging - 2.18.1-2: the library ships a Debian symbols file; the CLI's `Depends` is computed by `dpkg-shlibdeps` (needs library >= 2.17.0) instead of pinning the library to its own version. ## 2.18.0 - 2026-10-13 ### Changed - Range filters (GT/GTE/LT/LTE) match only number-to-number or string-to-string (`typed_range_filters`); null, booleans and type mismatches never match. ## 2.17.2 - 2026-10-12 ### Fixed - Inserts carrying a vector into an encrypted collection were refused (`_vector` is never encrypted now). - A reseal is requested only when an online encryption upgrade rewrote plaintext, and compacts only that project. - History locks are per collection; the `maxVersions` prune runs outside the global lock. - `encryption-verify` prints `CLEAN (UNSEALED: ...)` while a reseal is pending; a missing `key_file` is named in the startup error. ## 2.17.1 - 2026-10-12 ### Fixed - `encryption-verify` stalled history-recording writes server-wide. - The migration's memory scaled with the largest history file (now streamed). - Compaction could leave an env without `data.mdb` if killed mid-swap. - `info` reported the collection's own encryption options, not the enforced rule. - `project:_name` collections are refused (writes to them were unreadable). - Lowering `maxVersions` on an existing collection prunes its history. ## 2.17.0 - 2026-10-12 ### Fixed - Encryption at rest: the `encrypted` flag and `sensitive_fields` did nothing, top-level sensitive names were plaintext, patch and migration ops never encrypted. One-time boot migration with a seal; `encryption-verify`. ### Changed - Comparisons over encrypted values are refused (`encrypted_field`). ## 2.16.0 - 2026-10-09 ### Added - Optional per-collection JSON Schema (enforce/audit), read back, suggested from existing rows. ## 2.15.0 - 2026-10-09 ### Added - `GetServerInfo` and capability names; client and server release independently. ### Packaging - The server no longer depends on the client library; `--only client|server`. ## 2.14.0 - 2026-10-09 ### Added - Filtered `similaritySearch` (pre-filter, exact). ### Fixed - Vector search now applies the access policy's row predicate and masks. ## 2.13.1 - 2026-10-08 ### Fixed - A row could grow past the send limit through patches (write-time size guard). - Timed-out non-idempotent writes were retried; `connect()` did not check reachability. ## 2.13.0 - 2026-10-08 ### Added - Vector read-back (`WithVector`), `exportCollection`. ### Fixed - A document and its vector were two LMDB commits; read-metadata names in write bodies were stored. ## 2.12.0 - 2.12.4 - 2026-10-07 - 2.12.0: refusal detail (`sbdb-error-detail-bin`), `patchIfVersion`, `increment`, composite unique constraints, `removeManyAs`, event actor. - 2.12.1: evicted documents were invisible to writes; duplicate id as AlreadyExists. - 2.12.2: dropping a collection or project left its declarations (and documents). - 2.12.3: file store size limit, project drop and streaming download. - 2.12.4: a failed read looked like "nothing there"; reads now throw. Earlier releases: see the per-version entries in `CLAUDE.md`.