feat: S14.06 flip the SD vtable to SolidSyslogSdElement#556
Conversation
Change struct SolidSyslogStructuredData.Format (and the SolidSyslogStructuredData_Format dispatch wrapper) from receiving a raw struct SolidSyslogFormatter* to a struct SolidSyslogSdElement*. A custom-SD author's Format can no longer reach a raw formatter — the footgun is closed at the extension point itself. Move the SolidSyslogSdElement_FromFormatter wrap up into the SD-emission loop in SolidSyslogMessageFormatter: one element is built per message and passed to each configured SD in the existing order. The three SDs (MetaSd, OriginSd, TimeQualitySd) drop their now-redundant local wrap and emit straight onto the handed element; NullSd's no-op signature follows. Output is byte-for-byte identical (existing tests stand; SD test doubles' Format signatures updated, and the [spy]/[spy2] doubles now emit via _Begin/_End). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 12 minutes and 54 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (15)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
☀️ Quality Summary 🚦 build-linux-gcc: 100% successful (✔️ 1496 passed) Created by Quality Monitor v1.14.0 (#f3859fd). More details are shown in the GitHub Checks Result. |
Closes #546. Parent epic: #64.
What changes
Flips the SD extension point itself, the payoff of the S14.03–05 migrations.
struct SolidSyslogStructuredData.Formatand theSolidSyslogStructuredData_Formatdispatch wrapper now take a
struct SolidSyslogSdElement*instead of a rawstruct SolidSyslogFormatter*. A custom-SD author'sFormatcan no longer reach aformatter — the footgun is closed at the vtable.
SolidSyslogSdElement_FromFormatterwrap moves up intoMessageFormatter_FormatStructuredData: one element is built per message and passed toeach configured SD in the existing order (
_Beginresets the per-SD state, so a singleinstance hosts
[meta…][origin…]sequentially).onto the handed element (now including the public
SolidSyslogSdElement.hrather thanthe private header); NullSd's no-op signature follows.
Output is byte-for-byte identical — existing tests stand. SD test doubles'
Formatsignatures are updated; the
[spy]/[spy2]doubles now emit via_Begin/_End, and eachSD unit test's
format()helper +SolidSyslogNullSdTestbuild the element from theformatter via the private
_FromFormatter.Acceptance criteria
Formatmethod receives aSolidSyslogSdElement*; none receives or wraps aformatter
the existing order
Out of scope
SolidSyslogFormatter.hout of the public interface (S14.08)Checks
Debug green (1459 tests); BddTargetTests 66/66. clang-format applied; cppcheck-MISRA exit 0
(suppression anchors moved: MetaSd 11.3 64→60, OriginSd 11.3 61→57, TimeQualitySd 11.3
58→54, MessageFormatter 11.8 ×5 +1 and 5.7 19→20;
misra_renumber.pyclean).🤖 Generated with Claude Code