← Back to Pull requests

[#32] Split mddlog-core/mddlog targets; move SimpleLogger to mddlog.adapter.logger #42

Closed
unknown closed this pull request without merging on Sep 24, 2026 18:13 UTC
View on GitHub
unknown unknown commented on Sep 24, 2026 12:15 UTC
Author

Summary

Materializes ADR-001 Decision 6's governed/adapter boundary in the build — two CMake targets with a one-way dependency, and module names where mddlog.core. only means governed code — per #32, which depended on #31's module-placement decisions (now merged). Structural refactor; no behavioral change.

  • New mddlog-core target (alias mddlog::core), containing only mddlog.core.loglevel today — mddlog.core.record/mddlog.core.ring (ADR-001 Decision 1) join it once implemented. mddlog links mddlog-core PUBLIC; a configure-time assertion fails the build if that dependency is ever reversed.

  • mddlog.core.logger → mddlog.adapter.logger (include/mddlog/adapter/), mddlog.core.logrecord → mddlog.adapter.logrecord (same directory). No compatibility shim under the old module names. SimpleLogger and LogRecord keep their mddlog::core namespace unchanged — only the module name and file location moved, per #32's "class unchanged" requirement.

  • mddlog.core.loglevel split: the enum and its constexpr helpers stay governed; getColorCode()/getResetColorCode() (ANSI console styling) move to mddlog.sinks.console, their only caller — per ADR-001 Decision 6 as resolved in #31.

  • Both targets registered in the install export and package config; mddlog::core gets its own EXPORT_NAME so the installed imported target matches the in-tree alias.

  • build.core.boundary (tests/CMakeLists.txt, LABELS "build"): a source-level ctest scan that fails if any mddlog-core module imports a mddlog.sinks./mddlog.adapter.* module — the first (weakest) of the three verification strengths ADR-001 Decision 6 names.

  • TestInstallConsumer.cmake: a second consumer executable now links only mddlog::core and imports mddlog.core.loglevel, proving the installed package exposes it independently of mddlog::mddlog.

  • README's module-architecture section and file-path references updated to the new layout.
  • No import changes needed in tests/ or examples/: every spec and example already imports the mddlog umbrella module, never a submodule directly — verified by grep before starting.

    Invitation and contributor agreement

    Not applicable — this PR is the project steward's own change, made directly by the maintainer (ambroise-leclerc); there is no external contributor or CLA issue involved.

    Verification

  • Read through every touched .cppm file end-to-end after editing, and grepped the whole tree for any remaining reference to the old module names (mddlog.core.logrecord, mddlog.core.logger, core::getColorCode, core::getResetColorCode) — none found.

  • Rendered the embedded file(WRITE ...) consumer-project strings in TestInstallConsumer.cmake back to real CMake/C++ to check brace/quote balance and logic by eye.

  • Not locally build-verified before pushing (this sandbox's CMake/compilers are below the project's floors) — confirmed green on CI instead: all 6 jobs passed on the current head (bf9183f) — Linux (GCC 16.1), Linux (Clang 21, libc++), Windows (MSVC), macOS 15 arm64 (Clang 21.1.8), ASan+UBSan (GCC 16.1, Debug), and clang-format 21.
  • Acceptance criteria (from #32)

  • Tous les scénarios SpecLab existants passent sans modification autre que les imports — no import changes were needed; confirmed by all 4 platform builds/test-suites passing in CI.

  • InstallTreeConsumer compile, lie et s'exécute contre le package installé exposant les deux cibles — consumer (mddlog::mddlog) + consumer_core (mddlog::core) both implemented and passing as part of the green CI runs.

  • Compilation, édition de liens et exécution des tests rapportées séparément sur la matrice de #5 — all four toolchain jobs (Linux GCC16.1, Linux Clang21/libc++, Windows MSVC, macOS arm64 Clang21.1.8) green, plus ASan+UBSan and clang-format.
  • All CodeRabbit and Copilot review findings (5 total, across two rounds) fixed and confirmed addressed.

    Diff: 496 lines (+372 / -124) across 6 files Reviewer: ambroise-leclerc Review duration: 357m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.47) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.47 · 496 lines diff across 6 files
    0.47
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.371
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #42"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 47.5% (MEDIUM) · Higher = larger blast radius
    47.5%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 18.8% · Safe to merge
    18.8%