Updated cormd startup to acquire <dir>/.mm.lock via libstele's stl_file_lock_acquire() before acquiring <dir>/.cormd.lock (O_CLOEXEC), then immediately release .mm.lock before serving requests โ eliminating the startup TOCTOU race with concurrent writers while preserving deadlock-free lock order (.mm.lock โ .cormd.lock).
Added O_CLOEXEC to .cormd.lock opens in src/corm.c and src/cormd.c so spawned subprocesses never inherit lock file descriptors.
Linux $ORIGIN RUNPATH (Makefile):
Added -Wl,-rpath,'$ORIGIN' on libcorm.so and -Wl,-rpath,'$ORIGIN/../lib' on corm and cormd so user-prefix ($HOME/.local) installs always resolve colocated libcorm.so and libstele.so over stale system libraries.
[2.5.2] - 2026-12-02
Packaging Version Sync (npm/corm.pc):
Synced npm/corm.pc to match corm.pc and npm/package.json so the v2.5.1 CLI forwarded-mutation destructor fix ships cleanly across all 9 platforms and npm.
[2.5.1] - 2026-12-02
CLI Forwarded Mutation Safety (src/corm.c):
When corm -p / -d / -D forwards mutations to an active cormd daemon lease without local direct writes, exit via _exit(rc) after flushing stdio so libcorm's __attribute__((destructor)) auto-save cannot overwrite daemon-persisted data with the CLI's stale pre-forward snapshot.
[2.5.0] - 2026-12-01
Mobile Static Libraries (android-lib + ios-lib) (.github/workflows/ci.yml):
Enabled Android (arm64-v8a, x86_64) and iOS (arm64 device/simulator + libcorm.xcframework.zip) static library packaging and publishing (40b8d83, 3550b3f).
Layer-0 libstele Decoupling & Portable Make Modernization (Makefile, npm/dist/index.js):
Declared WASM_GLOBAL_BASE directly in Makefile and passed explicit axis sibling package names to resolveSiblingPrebuildDirs() (81fe16d).
Migrated to include ttypt/include.mk via Make search paths, dropped legacy ../mk fallback, eliminated duplicate $(shell)/!= forks, adopted CFLAGS-LIB/CFLAGS-BIN, and ported Makefiles to OpenBSD + GNU Make (313c181, 0f2aa06, 62417c2, c3e9bdb, 9f2f83b, a24f66c).
HTOK JSON Refactor (src/htok.c):
Replaced the hand-rolled JSON DOM parser and serializer in src/htok.c with libstele's <ttypt/stl_json.h> (a11106c).
Build System Migration to libstele (Makefile, Doxyfile):
Migrated mk includes (include.mk) and Doxyfile resolution to libstele (7e17e58).
Added corm_htok_tok_decoder_fn and corm_htok_set_tok_decoder() so corm_htok_unpack() can decode CORM_HTOK_TYPE_TOKENS fields back into UTF-8 text (f601900).
Hardened LEB128 length bounds checking against integer overflow in corm_htok_unpack() (f601900, 5d5be7a).
Dirty-File Tracking, Atomic Persistence & Close Safety (src/libcorm.c, npm/dist/corm.wasm):
Added corm_file_t.dirty and corm_mark_dirty() across _corm_put(), corm_ndel_topdown(), corm_clear_fast(), and corm_del_all(), skipping no-op disk rewrites in corm_save_file() when !file->dirty (5d5be7a).
Switched corm_save_file() to write to a per-PID temporary file (%s.tmp.%d.%u) and atomically rename() into place (5d5be7a).
Closed the backing file descriptor at the end of corm_load_file() (marking new ENOENT files dirty), detached head->file before corm_drop() in corm_close() so closing a handle does not mark its file dirty, and rebuilt npm/dist/corm.wasm (5d5be7a).
Expanded MAX_CACHED_ENGINES from 16 to 64 slots with tick-based LRU eviction (last_used_tick) instead of round-robin eviction.
Added late axis binding on cached corm_engine handles (dynamically opening newly requested axes and persisting the updated @roster sidecar) and per-activation cormr_axis_env_config / rec_axis_env_config invocation.
Honored CORM_QUIET in corm_axes_dlopen_record to suppress stderr diagnostics when probing optional axis libraries.
Updated npm/package.jsonbuild:native RPATH to include standalone $ORIGIN and sibling stele/prebuilds/linux-x64 paths and sync prebuilds/linux-x64/corm.node.
Cached corm_engine handles across CormExecCommand calls with disk mtime/size verification (engine_disk_matches) and round-robin cache eviction.
Saved and restored caller env overrides around CormExecCommandInner so per-call environment variables (CORM_AXIS_PATH, CORM_SEPAL_EMBED_URL, etc.) do not mutate the host process environment.
Merged CORM_DEFAULT_AXIS_PATH with caller-supplied CORM_AXIS_PATH in execCormCommand and included "prebuilds" in npm/package.json"files".
Exposed htokPack (corm_htok_pack), htokUnpack (corm_htok_unpack), execCormCommand, closeCormEngine, and CormEngine (PING, LIST, GET, GET_JSON, PUT, PUT_JSON, DEL, DEL_ALL, QUERY) in the native Node-API addon with full -X expression evaluation and dynamic axis loading.
Upgraded CormDb to support typed keys/values (u, a, 2u, 2s, b, CM_MIRROR), delAll, listKeys, and count, and removed all JS Map fallbacks.
Requires @tty-pt/stele >=1.7.0 (^1.7.0).
[2.3.3] - 2026-11-13
Packaging:
Requires @tty-pt/stele >=1.6.2 (^1.6.2).
The npm tarball is now built once by CI, with a self-contained native addon per platform (prebuilds/<os>-<cpu>/) next to corm.wasm, and published as verified.
Linked corm.wasm against @tty-pt/stele's shared allocator (malloc/calloc/realloc/free) at a disjoint --global-base=524288 to prevent static data segment collisions across co-loaded WASM modules.
Upgraded @tty-pt/stele dependency to >=1.6.1 (^1.6.1).
[2.3.1] - 2026-11-13
macOS & CI Build System Compatibility:
Restored dual GNU Make / BSD Make assignment in mk build toolchain for compatibility with macOS GNU Make 3.81.
Rebuilt and optimized corm.wasm artifact.
[2.3.0] - 2026-11-13
Libstele v1.6.0 Substrate Alignment:
Upgraded substrate baseline to @tty-pt/stele@^1.6.0 (>=1.6.0).
Aligned WebAssembly linear memory layout with generic canvas and bridge decoupled runtime.
Exposed .count(), .rawPointer(), .toUint32Array(), and .addFromRaw(ptr, count) on CandidateSet.
Enables zero-copy passing of contiguous uint32_t reference arrays across WebAssembly modules sharing @tty-pt/stele's linear memory without intermediate JavaScript array allocations.
Adopted strict peerDependencies (@tty-pt/stele: ">=1.5.0") and devDependencies (@tty-pt/stele: "^1.5.2").
Published @tty-pt/corm providing standalone Node-API native bindings and synchronous WebAssembly fallback (corm.wasm).
Integrated with external/mk/include.mk (make wasm) using -ffreestanding -flto -O3 and post-link wasm-opt -O3 optimization (dropping binary size from 66 KB to 53 KB).
Native C HTOK v4 Binary Envelope API (corm_htok_pack, corm_htok_unpack) & cormd Daemon JSON Protocol:
Implemented high-performance binary packing and unpacking for HTOK v4 containers directly in pure C (src/htok.c, include/ttypt/corm.h).
Added native PUT_JSON and GET_JSON socket protocol commands to cormd (src/cormd.c).
[2.1.0]
Safe Database Retrieval Semantics (corm_read):
Introduced int corm_read(uint32_t hd, const void *const key, void *dst, size_t max_sz) with guaranteed zero-initialization on key misses, negative returns, and invalid handles, plus trailing zero-padding on hits.
Non-aborting, safe record retrieval eliminating crash hazards (SIGABRT / CBUG) across all downstream tenant modules and simulation engines.
WASM Linear Memory Arena Shims & Host Persistence (src/corm.c, src/corm_compat.h):
Added linear memory arena allocator and host persistence imports for executing Corm databases inside WebAssembly browser runtimes.
Standardized memory alignment and fallback hooks for headless/WASM targets.
cormd Resident Daemon Multi-Instance Resiliency:
Enhanced socket lifecycle and signal handling to ensure uninterrupted resident database performance across repeated test cycles and multi-tenant instances.
Linker Purity & DT_RUNPATH Elimination:
Stripped hardcoded /home/ and -Wl,-rpath flags from Makefiles, linking cleanly against system authority (/usr/lib).
[2.0.0]
Recall Kernel Overhaul & rec.h Elimination:
Replaced legacy rec.h with <ttypt/cormr.h> and unified umbrella inclusion in <ttypt/corm.h>.
Canonical cormr_* symbol and type namespace (cormr_set_t, cormr_rank_t, cormr_axis_t, cormr_query_t, cormr_join_t).