Repository navigation
v0.1.0 — Epic #8: Allocation-free governed logging core
·
60 commits
to develop
since this release
The first version, closing epic #8: a bounded, allocation-free governed logging core separated from
the allocating adapter and sinks, as accepted in ADR-001.
It also carries the build, verification and convention work that preceded it (#5, #7).
The governed core, mddlog::core (epic #8)
- Contracts first (#31, realigned by #46). ADR-001 fixes capacities in bytes, the memory budget,
host-supplied time, per-field truncation rules and the admission result before any code, and was
accepted on 2026-09-24. #46 later aligned its names and history with the implementation. - Two CMake targets with a one-way dependency (#32).
mddlog::coreholds only governed modules;
mddlog::mddloglinks it and adds the adapter and sinks.SimpleLoggerand the allocating
LogRecordmoved tomddlog.adapter.loggerandmddlog.adapter.logrecord, with no compatibility
shim undermddlog.core.*. InlineString<N>(#33): owned, fixed-capacity,constexprandnoexcept. Identifiers are
stored whole or refused; descriptive text is truncated without splitting a UTF-8 sequence.WriteResult(#34): admission, the first refusal reason (RingFull,IdentifierTooLongwith
the offending field,MalformedTime) and message truncation, returned by value with an invariant
its accessors cannot break.GovernedRecord(#35): a bounded record capturing level, host-suppliedRawTime, source
location, message and the component/operation/correlation identifiers at emission. A refused
assignment leaves the previous record unchanged; the core reads no clock.RingLog<Capacity>(#36): a single-producer/single-consumer ring with inline storage that
refuses new writes when full rather than overwriting, uses the two release/acquire exchanges of
ADR-001 Decision 4, countsRingFullrefusals atomically, and drains through one or two read-only
spans until an explicit, validated acknowledgement.- Concurrency under ThreadSanitizer (#37): producer/consumer scenarios on separate threads, with
per-ring ordering checks and no global-order assumption, run in a dedicated TSan CI job. - Adapter-zone drain (#38):
RingSinkAdaptercopies each drained record into an owning
LogRecordbefore acknowledging, forwards it to existing sinks with its truncation flag and an
explicit unavailable-time marker, and exposes per-ring refusal counts. - Boundary checks (#39): after every build with tests, CTest verifies the compiler-reported
module imports and evaluated CMake links against a reviewed policy, scans governed sources for
forbidden constructs, and scans governed objects for allocation and exception symbols, each with
negative controls.docs/governed-evidence.mdstates what these
checks do and do not establish. - Standalone consumption and migration (#40): the same core-only program builds and runs in-tree
and against the installed package while linking onlymddlog::core;
docs/migration/governed-core.mdcovers the moved imports,
capacities, admission and host time.
Foundations (#5, #7)
- Reproducible builds with CMake presets and a pinned toolchain matrix, SpecLab scenario tests
discovered per scenario by CTest, and CI on Linux GCC 16.1, Linux Clang 21 with libc++, macOS
arm64 Clang 21.1.8 and Windows MSVC, plus ASan/UBSan (#5). - MduX conventions:
LogLevelenumerators renamedTrace…Audit, and reproducible
clang-format and clang-tidy checks in CI (#7).
Known limits, stated because they are easy to mistake for defects
- Not certified or validated. Nothing here qualifies mddlog as medical-device software; an
allocation-free core makes integration under strong constraints easier, it does not qualify it. - The allocating logger is unchanged.
SimpleLoggerstill queues records in an unbounded,
mutex-protected queue and offers no real-time guarantee. The governed ring is a separate path
drained byRingSinkAdapter; it is not wired intoSimpleLogger. RingSinkAdapter::drainOnce()does not isolate one ring's failure. An exception from one
ring's copy or acknowledgement ends the pass, so later rings are not drained in it and the count
already delivered is not returned.- Sinks do not preserve every field.
ConsoleSinkis the only implemented sink and renders a
human-readable line; it omitscorrelationIdandcomplianceStandard.SimpleLogger::flush()
ignores a sink's flush failure. File, network and audit sinks, formatters and the audit model of
ADR-002 to ADR-004 are planned (epics #9, #10, #11). - Governed evidence is scoped, not a proof. The source check is lexical, the symbol scans cover
the inspected objects and representative template instantiations only, and neither establishes
absence of blocking or a worst-case execution time.-fno-exceptionsis not enabled or promised
withimport std. ThreadSanitizer runs the RingLog scenarios only. MalformedTimeis unreachable by design.RawTimehas only an available and an unavailable
state (ADR-001 Decision 7); the reason stays in the enumeration for a future time representation.- A file importing
mddlog.core.*directly must linkmddlog::core, even when it also links
mddlog::mddlog: with GCC 16.1 and CMake 4.1, modules reached only transitively are missing from
its module mapper. - Toolchain window.
import stdsupport is experimental and qualified only for CMake 4.0 to 4.3,
Ninja generators, GCC 16.1+, Clang 20+ (21 in CI) and MSVC 17.14+.
Full entry: CHANGELOG.md. Release procedure: docs/release-process.md.