← Back to Pull requests

[#31] Finalize and accept ADR-001 contracts #41

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

Summary

Closes every checklist item #31 raises against ADR-001 (docs/adr/ADR-001-allocation-free-governed-logging-core.md) and records the maintainer's acceptance:

  • Decision 1: byte capacities for the governed record's four variable-length fields (message 160B, component/operationId 32B each, correlationId 40B), the named-preset parametrization mode chosen over exposing template parameters, and the uint16_t ceiling InlineString<N> imposes.

  • Decision 2: the exhaustive identifier (component, operationId, correlationId) vs. descriptive (message) field list, the UTF-8-safe truncation-boundary algorithm, and an explicit non-goal of validating already-malformed UTF-8 input.

  • Decision 3: the exact WriteResult/Refusal/TruncatedFields shape and the fixed refusal-priority order (MalformedTime → IdentifierTooLong → RingFull) when several conditions apply at once.

  • Decision 4: counter type/width (atomic<uint64_t>, modulo wraparound, unreachable in practice) for the ring cursors and refusal counter — the same statement ADR-002 Decision 5 asks for AuditEvent.sequence.

  • Decision 6: resolves placement of the two existing modules the split otherwise leaves ambiguous — mddlog.core.loglevel splits (the enum/semantic helpers stay governed, the ANSI color helpers move to the sink zone), and the current allocating LogRecord/LogStatistics move to mddlog.adapter.logrecord, freeing mddlog.core.record for the new governed type.

  • New Decision 7: the host-supplied RawTime type (std::chrono::nanoseconds) and the single MalformedTime sentinel (RawTime::min()), confirming the governed core reads no clock.

  • New Decision 8: a worked memory-budget example (sizeof(LogRecord) ≈ 312 B, RingLog<1024> ≈ 312 KiB) stating what sizeof/static_assert guarantee and what stays compiler/ABI-dependent.

  • Status: moved from Proposed to Accepted per explicit maintainer direction — the design in Decisions 1–8 is what the codebase must conform to; nothing is implemented yet, and the Decision 6 boundary-enforcement checks remain open follow-up work, not a precondition already met.
  • No code changes — this batch touches only docs/adr/ADR-001-allocation-free-governed-logging-core.md and the status table in docs/adr/README.md, as #31 scopes it.

    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 of the full amended ADR-001 for internal consistency (decision numbering, cross-references to ADR-002, the module-placement change against LogRecord.cppm/LogLevel.cppm's actual current contents, and the Status/Approval/Risks sections no longer describing the ADR as pending).

  • Confirmed no other doc (docs/adr/README.md, ADR-002/003/004) references ADR-001's status in a way this change leaves stale.

  • Documentation-only change; no build/test run applies.
  • Diff: 381 lines (+285 / -96) across 4 files Reviewer: ambroise-leclerc Review duration: 44m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 381 lines diff across 4 files
    0.43
    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.356
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #41"
    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: 43.0% (MEDIUM) · Higher = larger blast radius
    43.0%
    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: 17.0% · Safe to merge
    17.0%