Repository navigation
Releases
v0.3.0 — Epic #113: Contextual diagnostic and audit logging
Closes epic #113 and its four sub-issues #127–130: owned contexts and reusable bindings
for diagnostic and audit logging, designed in
ADR-005. The initial software development
file baseline (#124) is also delivered. This is an intermediate release towards 1.0;
epic #112 and the remaining 1.0 work are open.
Contextual logging (epic #113)
DiagnosticContextowns component, operation and correlation identifiers, with typed
construction refusals and derived operation contexts.DiagnosticBindingreuses them
withSimpleLoggerandTextLogger, preserving the actual caller's source.debugLazy(factory)andlogLazy(level, factory)defer message construction until
after the adapter filter.SimpleLogger::is(level)exposes that filter snapshot.GovernedBindingkeeps host-supplied time, bounded admission andWriteResultexplicit.
AuditDescription,AuditContextandAuditBindingprepare invariant fields while
phase, time, detail and admission remain visible at every event.- Five compiled before/after usages and a local stock component exercise refusal,
temporary data, separate producers/consumers and shutdown. Source and installed
consumers cover both public targets. See the
migration guide and
accepted local integration. - The software development file records the accepted initial baseline and local API
integration: GAP-006 closed, REQ-009/REQ-011 implemented, qualification gaps retained. - The umbrella module exports the diagnostic refusal, ring and write-result types needed
to use its contextual API without direct core imports. Source and installed consumers
inspect a construction refusal and exercise governed admission and saturation. - All three READMEs show the contextual syntax. Existing low-level APIs and the global
Logfacade remain available; no audit encoding or SPSC contract is changed.
Known limits
- Local component integration is accepted; independent application validation (#122),
budgets (#117), extended robustness (#120), persistence orchestration (#116) and the
final API/package freeze (#121) remain open. This release is not a 1.0 qualification,
certification or validation for a medical device. - Bindings borrow destinations, which must outlive every binding copy. Each ring remains
single-producer/single-consumer; the host controls stream identities, lifetimes,
privacy and the response to a critical refusal. - Audit categories are copied without enum-range validation, as in existing admission.
Hosts use named values and validate external conversions. Phases are host declarations;
admission is in-memory, and no destructor manufactures an action outcome. debugLazyis the only per-level lazy shortcut; other levels uselogLazy.
Filtering is a snapshot, not transactional.TextLoggerretains the fixed
[component:operation:correlation]format, including[::]for an empty context.SimpleLoggerstill has an allocating unbounded asynchronous queue;TextLogger
renders synchronously with allocation. Neither is the governed path.- Real storage and independent anchor backends are not supplied (#114/#115). Durability
depends on the medium; tamper evidence depends on an independent anchor and retained
position. Nothing is signed. ADR-004 implementation evidence still awaits its separate
acceptance; this release does not reuse #113 acceptance for it. import stdremains experimental and tied to the documented CMake/compiler tuple.
v0.2.0 — Epics #9, #10, #11: audit events, application integration and audit persistence
Closes epics #9, #10 and #11: a regulatory audit-event model with bounded admission and explicit
hand-off (ADR-002), the building blocks for
integrating mddlog into an application (ADR-003),
and audit persistence with tamper evidence relative to an independent anchor
(ADR-004).
Audit events, separate from diagnostic logging (epic #9, ADR-002)
- Bounded admission (#56).
AuditEventcarries exact identifiers (action, actor, target,
requirement and risk references, correlation), a category and a phase, a host-supplied time and a
stream identity; onlydetailmay shorten, with a flag.AuditRing<N>assigns a per-stream
sequence to admitted events only and refuses rather than overwrites when full. - Hand-off and health (#57).
AuditSinkAdapterdrains audit rings to anAuditSink, releases
only the accepted prefix, keeps rejected events for retry and reports hand-off, failures, losses
after admission and pending events through its own health signal. - Scenario validation (#59) of categories, identifiers and MduX
ActionTraceconversions, in
docs/audit-scenario-validation.md. - Public API (#58).
SimpleLogger::logAudit(AuditInput)andLog::logAudit(AuditInput)return
the ring's admission result aftersetAuditRing(). - Stream identities (#94). The consumer refuses an invalid or already registered stream
identity. ADR-002 accepted on 2026-10-02.
Application integration (epic #10, ADR-003)
SinkRegistry(#67): synchronized registration with explicit handles and quiescent removal,
including self-removal from a callback.TransportConsumer(#68): bounded rings drained on one consumer thread, with independent
health, failure isolation per transport, and suppression of reentrant logging feedback.TextLogger(#69, #70): a diagnostic text adapter with independent per-group masks, caller
source and separate dumps, rendering throughSinkRegistrycallbacks.- WebFront as reference consumer (#71, #72): adopted and verified in WebFront's own repository
against a pinned mddlog; since #103, mddlog's tests contain and download no application code.
ADR-003 accepted, then amended by #103.
Audit persistence and tamper evidence (epic #11, ADR-004)
- Design accepted at milestone A (#84 to #88): the anchor and the reader's monotonic position,
the canonical byte contract, storage and the meaning of "durably confirmed", retention and chain
state recovery, and the bounds on what may be claimed. - Canonical serialization and chaining (#89): a versioned canonical encoding of every audit field
and a SHA-256 chain per stream instance, fixed by reference vectors. - Anchors and verification (#90): an anchor provider interface, the reader's retained position,
and a verifier that reports one verdict per stream (Anchored with its range, Unanchored, anchor
unavailable, Incomplete, Altered, Rolled back, Conflict, Retired, Cannot verify, Inconsistent),
never an unqualified "valid". - Storage and durable confirmation (#91):
PersistingAuditSinkwrites append-only segments
through aStorageMedium, publishes a durable position only after a sync answered durable, and
reports every storage failure through its health signal, never as an audit event. - Restart, rotation and retention (#92): a ledger per adapter start, chain state recovery with a
continuity check against the anchor, prefix rotation bounded by the anchor, whole-stream and
ledger retention, andLogVerifier, which reports each stream's verdict and every boundary. - End-to-end validation (#93): every validation scenario of ADR-004 Decision 5 and every
criterion of milestone C runs from producer admission to the reader's report, in
docs/audit-persistence-validation.md.
Breaking changes
LogLevel::Auditand the positionallogAudit(...)overloads are removed; use
logAudit(AuditInput)(docs/migration/audit-admission.md).- Producer admission refuses every action beginning with
mddlog., reserved for the persistence
ledger (AuditRefusalReason::ReservedAction).
Known limits, stated because they are easy to mistake for defects
- Not certified or validated. Nothing here qualifies mddlog as medical-device software or
validates it for production use. - Durability depends on the medium. The library ships only
InMemoryStorageMedium, a test
double. Whether a real file, flash or device-log medium meets ADR-004 Decision 9, and so whether
"durably confirmed" holds on it, is for the integrator to establish. - Tamper evidence is relative to an independent anchor, never tamper-proof. The library ships
onlyInMemoryAnchorProvider. Records past the last anchor can be altered or truncated
undetectably; a rollback of log and anchor together is detected only with a retained position; a
compromised provider defeats the mechanism. Nothing is signed, so nothing proves who wrote a
record; signing, key management and an export format are deferred (ADR-004 Decision 11). - ADR-004's evidence awaits review. Its design is accepted; accepting the implementation's
evidence is a separate decision of the maintainer. - Single consumer.
AuditSinkAdapter,TransportConsumerandPersistingAuditSinkbelong to
one consumer thread; ThreadSanitizer still runs the RingLog scenarios only. - Host obligations. Stream identities are unique per consumer adapter and per log; across
adapters, processes and boot sessions they remain the host's obligation. TheLifecycleand
Operatorcategories have no runtime call site in a known consumer. - The allocating logger is unchanged.
SimpleLoggerstill uses an unbounded queue, and
TextLoggerrenders and calls back synchronously, allocating.
v0.1.0 — Epic #8: Allocation-free governed logging core
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.