← Back to Pull requests

[#7] Renommer les niveaux de log (TRACE…AUDIT → Trace…Audit) et migrer les usages #27

Closed
unknown closed this pull request without merging on Sep 23, 2026 14:40 UTC
View on GitHub
unknown unknown commented on Sep 23, 2026 14:32 UTC
Author

Summary


  • mddlog::core::LogLevel enumerators renamed TRACE, DEBUG, INFO, WARN, ERROR, FATAL, AUDIT → Trace, Debug, Info, Warn, Error, Fatal, Audit, per EnumConstantCase: CamelCase (#13). Direct rename: no deprecated aliases, the old identifiers are gone (assumed source-compat break).

  • Unchanged: numeric values (Trace = 0 … Audit = 6, std::uint8_t) and all produced/accepted text — toString() still returns "TRACE"…"AUDIT"/"UNKNOWN", fromString() still accepts them (INFO fallback), console output identical.

  • Diff is rename-only (reformatting was merged earlier in #14).
  • Closes #16.

    Scope


    LogLevel.cppm; all uses in Logger, Log, Sink, ConsoleSink (incl. Doxygen/comments naming the enumerators); examples/; tests/spec/; tests/framework/RecordingSink.hpp; README.md; ADR-001/002/003. CLAUDE.md is git-ignored: updated locally, not in this diff.
    ADR-003's WebFront↔mddlog table now has Error/Warn/Info/Debug on both sides with different numeric values, so both columns are qualified (webfront::log::X vs LogLevel::X), and the surrounding prose says so.

    Remaining occurrences of the old names (all intentional)


    git grep -wE 'TRACE|DEBUG|INFO|WARN|ERROR|FATAL|AUDIT' (excluding the MduX reference docs) now only hits:
  • the literal strings produced/accepted by toString()/fromString() in LogLevel.cppm and asserted in LogLevelSpec.cpp;

  • the prose of test scenario descriptions in FilteringSpec, RecordFidelitySpec, AuditPolicySpec (that text is the CTest entry name; left stable);

  • .clang-tidy (the rule's own comment naming the old constants).
  • Verification


  • #15 characterization scenarios pass with only LogLevel:: spellings changed.

  • ninja-gcc (gcc 16.1.0): build OK, 37/37. ninja-clang (Clang 21.1.8): build OK, 38/38. Both examples run.

  • clang-tidy readability-identifier-naming: no warning on LogLevel.cppm/Logger.cppm (enumerator rule now satisfied — unblocks #19's acceptance criterion).

  • clang-format-21 --dry-run --Werror: clean.
  • Note: ADR-003 still mentions minLevel_ (stale since #23); not touched here to keep this diff rename-only.

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    Summary by CodeRabbit

    Breaking Changes
    Log-level enum names now use PascalCase, such as LogLevel::Info and LogLevel::Audit, instead of uppercase names. Existing code that references the uppercase names must be updated. Numeric values and logging behavior are unchanged.
    Documentation
    * Updated usage examples and reference documentation to reflect the new log-level names.

    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 338 lines (+253 / -85) across 4 files Reviewer: ambroise-leclerc Review duration: 8m
    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 · 338 lines diff across 4 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: 98% · 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.349
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #27"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.1% 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.2% (MEDIUM) · Higher = larger blast radius
    47.2%
    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.1% · Lower = rushed or shallow review
    60.1%
    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.9% · Safe to merge
    18.9%