refactor: S11.03 rename NullBuffer to PassthroughBuffer#398
Conversation
NullBuffer was misnamed -- it isn't a GoF Null Object, it's a passthrough that forwards Write directly into an injected Sender. Cross-tree rename observing docs/NAMING.md: - Tier 1: public functions, struct tag, include guard - Tier 2: file-scope statics (PassthroughBuffer_*) per the strip-only rule - Tests: TEST_GROUP(SolidSyslogPassthroughBuffer); test names unchanged - Files: git mv preserves history (test file rename detected; .h/.c pair rewritten too thoroughly for the 50% similarity threshold but history is intact via --find-renames) Adjacent doc honesty corrections forced by the rename: - CLAUDE.md null-object bullet drops PassthroughBuffer (it isn't one). - SKILL.md parenthetical "NullBuffer is the buffer null object" struck. - SolidSyslog.c nil-collaborators block drops the "different semantics (e.g. NullBuffer)" caveat -- without the example, the family is now uniform (NullMutex, NullStore, NullSecurityPolicy are genuine no-ops). Out of scope (no behaviour change, no structural change): - No 3-TU split, no PoolAllocator wiring, no _POOL_SIZE tunable. The Instance singleton, the void _Destroy, and the existing 11.3 storage-cast all carry forward unchanged. S11.04 retires them. - Two test names containing "NullBuffer" intentionally NOT renamed because they refer to NULL pointers, not the class: CreateWithNullBufferReportsError, SendWithNullBufferReportsErrorAndDoesNotSend. - DEVLOG.md historical entries + Bdd/Targets/FreeRtos/main.c historical S08.04 comment preserved as-is. Gates: debug, clang-debug, sanitize, coverage (PassthroughBuffer.c at 100%), tidy, cppcheck, clang-format. cppcheck-misra count 88 -- exactly matches main, zero new findings, zero entries against the renamed file. Refs #397.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (18)
💤 Files with no reviewable changes (2)
📝 WalkthroughWalkthroughA mechanical symbol rename of ChangesNullBuffer → PassthroughBuffer Symbol Rename
🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 (✔️ 1145 passed, 🙈 2 skipped) Created by Quality Monitor v1.14.0 (#f3859fd). More details are shown in the GitHub Checks Result. |
Purpose
Closes #397.
SolidSyslogNullBufferis misnamed — it isn't a GoF Null Object. ItsWriteforwards directly into an injectedSolidSyslogSender; its purpose is single-task targets where the application thread is willing to block on transport I/O. Calling itNull*has confused readers (theiec62443.mdSR 6.1 row had to spell out "single-task / synchronous Send" because the name didn't). E11 already plans to migrate every stateful Created class ontoSolidSyslogPoolAllocator; the rename belongs at some point in that work. Splitting it off from the Core sweep (S11.04) keeps both review surfaces small — the cross-tree identifier rename here, the pool semantics there.Change Description
Purely mechanical rename observing
docs/NAMING.md:git mv):Core/Interface/SolidSyslogNullBuffer.h,Core/Source/SolidSyslogNullBuffer.c,Tests/SolidSyslogNullBufferTest.cpp→ correspondingPassthroughBufferpaths. The test rename is detected at the 50% similarity threshold; the .h/.c pair fall under it because every line carries an identifier swap, but git history is intact via--find-renames.SolidSyslogNullBuffer_Create,_Destroy,struct SolidSyslogNullBuffer, include guardSOLIDSYSLOGNULLBUFFER_H→SolidSyslogPassthroughBuffer_*/SOLIDSYSLOGPASSTHROUGHBUFFER_H.NullBuffer_Read,_Write,_SelfFromBase,_Instance→PassthroughBuffer_*per the strip-only rule.TEST_GROUP(SolidSyslogPassthroughBuffer). IndividualTESTnames left alone — they describe behaviour.Tests/SolidSyslogTest.cpp(include + two Create/Destroy calls), twoCMakeLists.txtsource entries.CLAUDE.mdaudience-table row,README.md(two prose),SKILL.md(one prose),docs/iec62443.md(three SR rows),Core/Interface/SolidSyslogBlockStore.hrecursion-gotcha comment,Bdd/features/tcp_singletask.featureFeature description,Bdd/features/steps/syslog_steps.pyhistorical-context block.misra_suppressions.txt11.3 entry path updated (line number unchanged — same content).Three adjacent doc honesty corrections forced by the rename (substantive edits in an otherwise mechanical story — calling them out explicitly):
CLAUDE.mdDesign Patterns null-object bullet droppedPassthroughBufferfrom the list. Not a null object — keeping it would propagate the false framing the rename is trying to fix.NullSecurityPolicy+NullStoreremain (genuine no-ops).SKILL.mdArchitecture line "Null object pattern throughout (NullBuffer is the buffer null object)" — parenthetical struck. The remaining "Null object pattern throughout" stands (NullMutex / NullStore / NullSecurityPolicy genuinely are).Core/Source/SolidSyslog.cnil-collaborators comment block "(e.g. NullBuffer is a direct-send shim)" caveat removed. With the misleading example gone, the caveat no longer applies.Three deliberate non-renames to keep visible:
Tests/SolidSyslogTest.cpp::TEST(SolidSyslogLifecycle, CreateWithNullBufferReportsError)— NULL pointer, not the class.Tests/SolidSyslogUdpSenderTest.cpp::TEST(SolidSyslogUdpSenderBadSetup, SendWithNullBufferReportsErrorAndDoesNotSend)— NULL pointer, not the class.Bdd/Targets/FreeRtos/main.c:6historical S08.04 comment — preserved as historical narrative.Test Evidence
TEST_GROUP(SolidSyslogPassthroughBuffer)) carry over byte-for-byte except for the group identifier.SolidSyslogPassthroughBuffer.cat 100% line (matchesSolidSyslogNullBuffer.c's prior coverage — identical code, different name).SolidSyslogPassthroughBuffer.c. (Side-note: S11.02's closing notes recorded the baseline as "60". Re-running the identical CI command onmainin isolation produces 88 — the earlier number was non-deterministic or a partial run. The true invariant — "no new findings introduced by the rename" — is met. The story body's AC E01: Core Syslog Formatting #3 inherits the same stale number; the real bar is "unchanged from main".)Areas Affected
Core/Interface/,Core/Source/— the renamed pair plus three small touches (SolidSyslogBlockStore.hrecursion comment,SolidSyslog.cnil-collaborators comment,CMakeLists.txt).Tests/— renamed test file, group rename, two call sites inSolidSyslogTest.cpp,CMakeLists.txt.Bdd/features/— feature description + step file historical-context comment.CLAUDE.md,README.md,SKILL.md.docs/iec62443.md.misra_suppressions.txt.Out of scope (carrying forward to S11.04): the
Instancesingleton, thevoid _Destroy(void)signature, the existing 11.3 storage-cast suppression on theSelfFromBasehelper, the absence of aSOLIDSYSLOG_PASSTHROUGHBUFFER_POOL_SIZEtunable. S11.04 migrates this class ontoSolidSyslogPoolAllocatorand retires the cast in the same move.🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
Refactor
Tests