Skip to content

feat: S11.07 Windows adapters onto PoolAllocator#408

Merged
DavidCozens merged 8 commits into
mainfrom
refactor/s11-07-windows-sweep
May 20, 2026
Merged

feat: S11.07 Windows adapters onto PoolAllocator#408
DavidCozens merged 8 commits into
mainfrom
refactor/s11-07-windows-sweep

Conversation

@DavidCozens

@DavidCozens DavidCozens commented May 20, 2026

Copy link
Copy Markdown
Owner

Purpose

Second platform-adapter sweep in E11 (#29). Applies the canonical 3-TU split + SolidSyslogPoolAllocator to every stateful Windows adapter class: WindowsMutex, WindowsFile, WinsockTcpStream (storage-cast), and WinsockDatagram, WinsockResolver (file-scope singleton).

S11.07 is a pure migration sweep — no new public GoF nulls. The four needed (NullStream / NullDatagram / NullFile / NullResolver) all landed in S11.06; NullMutex already migrated to _Get(void) there too.

Closes #406.

Change Description

Five per-class migration commits + a DEVLOG entry. Each per-class migration:

  • drops the public <Class>Storage typedef and SOLIDSYSLOG_*_SIZE enum (where applicable)
  • switches _Create to take void (where applicable)
  • adopts the _Destroy(base) shape for the previously _Destroy(void) singletons
  • splits the .c into vtable+logic / Private.h / Static.c per the S11.04/S11.06 precedent
  • adds a Pool TEST_GROUP of 9 tests mirroring the POSIX siblings

Three decisions worth surfacing:

  • WinsockResolver pool-migrated, not _Get. It's truly stateless today, but FreeRtosStaticResolver (S11.08) carries IPv4 octet state and needs the pool. Mixed _Get / _Create within the Resolver base class would force integrators to remember which sibling wants which lifecycle. Same precedent as S11.06's GetAddrInfoResolver.

  • WinsockDatagram_Initialise and WinsockTcpStream_Initialise explicitly set Fd = INVALID_SOCKET. Pool slots are zero-initialised but SOCKET 0 is a valid handle on Windows, not invalid. Same root cause as S11.06's PosixDatagram fix.

  • WindowsMutex_Initialise has no partial-init guard. InitializeCriticalSection is void and the pre-migration code didn't handle failure; refactor-only preserves that. Unlike PosixMutex_Initialise which guards pthread_mutex_init's return.

The ten WinsockTcpStream_* and six Winsock_* (Datagram) and two Winsock_* (Resolver) function-pointer test seams stay in the per-class .c files per the C4232 __declspec(dllimport) forwarder workaround. The corresponding Internal.h headers continue to expose them to WinsockFake.

One incidental fix in WinsockTcpStream: mstcpip.h was being parsed correctly only because Internal.h transitively pulled in winsock2.h first. The new TU layout makes that ordering explicit via a documented #include <winsock2.h> ahead of <mstcpip.h>.

Verification

  • MSVC msvc-debug preset (local): full 1131-test suite green; per-class Pool TEST_GROUPs add 45 tests (9 × 5 classes).
  • Linux gcc devcontainer: full tidy preset clean.
  • Linux clang devcontainer: full iwyu target clean — 1060 files audited, 0 actionable findings.
  • BDD targets and BddTargetTlsSender_OpenSsl_WinsockTcp updated for the new API.
  • DEVLOG entry on the work branch (per feedback_devlog_in_pr).

Out of scope

Per the E11 epic sequence: WindowsAtomicCounter defers to S11.09 ("AtomicCounter family + TLS + FatFs") so it migrates alongside StdAtomicCounter. SolidSyslogAddress (Windows variant) is a utility struct, no Create/Destroy. FreeRTOS adapters land in S11.08.

Summary by CodeRabbit

  • Breaking Changes

    • Windows mutex, file, TCP stream, datagram, and resolver creation functions now take no arguments.
    • Corresponding destroy functions now require the resource instance as a parameter.
  • New Features

    • Five new compile-time tunable constants for Windows resource pool sizes.
    • Pool exhaustion returns fallback implementations for continued operation.
  • Documentation

    • Updated Windows API contract documentation.

Canonical 3-TU split + SolidSyslogPoolAllocator, mirroring S11.06's
PosixMutex migration. Public _Create now takes void; _Destroy keeps
its base-handle parameter. The SolidSyslogWindowsMutexStorage typedef
and SOLIDSYSLOG_WINDOWS_MUTEX_SIZE enum are gone from the public header.

Pool size default 1U, override via SOLIDSYSLOG_WINDOWS_MUTEX_POOL_SIZE.
Pool exhaustion returns the shared SolidSyslogNullMutex with ERROR
report; Destroy of unknown/stale handle emits WARNING.

The BddTargetWindows caller drops mutexStorage; the test file drops the
storage local and the HandleEqualsStorageAddress test (no longer
meaningful when the slot is library-internal) and gains a Pool TEST_GROUP
of 9 tests mirroring SolidSyslogPosixMutexPool.
Canonical 3-TU split + SolidSyslogPoolAllocator. The six file-scope
Winsock_* function-pointer test seams (Winsock_socket /sendto /closesocket
/connect /setsockopt /getsockopt) stay in WinsockDatagram.c per the
C4232 __declspec(dllimport) workaround that production code relies on.
The Internal.h header continues to expose those externs to WinsockFake.

WinsockDatagram_Initialise explicitly sets Fd = INVALID_SOCKET and
Connected = false rather than relying on pool zero-init — SOCKET fd = 0
is a valid handle on Windows, not invalid. Same root cause as the
PosixDatagram fix in S11.06; documented in this commit so future
TcpStream / FileBlockDevice slot migrations don't re-trip on it.

Public _Destroy(void) → _Destroy(base) shape. SOLIDSYSLOG_WINSOCK_DATAGRAM_POOL_SIZE
default 1U. Pool exhaustion returns shared SolidSyslogNullDatagram with
ERROR; unknown/stale destroy emits WARNING.

BddTargetWindows caller updated; test file rewires teardown and gains a
Pool TEST_GROUP of 9 tests mirroring SolidSyslogPosixDatagramPool.
Canonical 3-TU split + SolidSyslogPoolAllocator. Mirrors S11.06's
GetAddrInfoResolver migration: the class is truly stateless, but the
pool is kept for lifecycle symmetry with FreeRtosStaticResolver (S11.08)
which carries IPv4 octet state. Mixed _Get/_Create shape within the
Resolver base class would force integrators to remember which sibling
wants which lifecycle; uniform pool semantics wins.

The two file-scope Winsock_getaddrinfo / Winsock_freeaddrinfo function-
pointer test seams stay in WinsockResolver.c per the C4232 forwarder
workaround. The Internal.h header continues to expose them to WinsockFake.

Public _Destroy(void) → _Destroy(base). SOLIDSYSLOG_WINSOCK_RESOLVER_POOL_SIZE
default 1U. Pool exhaustion returns shared SolidSyslogNullResolver with
ERROR; unknown/stale destroy emits WARNING.

BddTargetWindows caller updated; test file rewires teardown and gains a
Pool TEST_GROUP of 9 tests mirroring SolidSyslogGetAddrInfoResolverPool.
Canonical 3-TU split + SolidSyslogPoolAllocator, mirroring S11.06's
PosixFile migration. The DEFAULT_INSTANCE / DESTROYED_INSTANCE static
const structs (the storage-cast variant's vtable-and-Fd seed values)
are gone — Initialise wires the vtable + sets Fd = INVALID_FD
explicitly; Cleanup overwrites the base with the shared NullFile vtable.

Public _Create(void) shape; _Destroy keeps its base-handle parameter.
SolidSyslogWindowsFileStorage typedef and SOLIDSYSLOG_WINDOWS_FILE_SIZE
enum gone from the public header.

SOLIDSYSLOG_WINDOWS_FILE_POOL_SIZE default 1U. Pool exhaustion returns
shared SolidSyslogNullFile with ERROR; unknown/stale destroy emits
WARNING.

BddTargetWindows caller drops the local fileStorage; test file drops
the storage local and the CreateReturnsHandleInsideCallerSuppliedStorage
test (no longer meaningful when the slot is library-internal) and gains
a Pool TEST_GROUP of 9 tests mirroring SolidSyslogPosixFilePool.
Canonical 3-TU split + SolidSyslogPoolAllocator. Refactor-only: every
behaviour preserved verbatim — the non-blocking connect with select()
timeout, keepalive setsockopt cluster, TCP_NODELAY, ioctlsocket FIONBIO,
WSAEWOULDBLOCK handling in Read, fail-fast Send-then-Close. All ten
WinsockTcpStream_* function-pointer test seams stay in WinsockTcpStream.c
per the C4232 __declspec(dllimport) workaround.

WinsockTcpStream_Initialise explicitly sets Fd = INVALID_SOCKET to avoid
pool zero-init giving a valid SOCKET handle (Windows SOCKET 0 is not
INVALID_SOCKET, matching the PosixDatagram / WinsockDatagram lesson).
The DEFAULT_INSTANCE / DESTROYED_INSTANCE static const structs are gone;
Cleanup calls Close then overwrites the base with the shared NullStream
vtable.

Public _Create(void) shape; _Destroy keeps its base-handle parameter.
SolidSyslogWinsockTcpStreamStorage and SOLIDSYSLOG_WINSOCK_TCP_STREAM_SIZE
gone from the public header.

SOLIDSYSLOG_WINSOCK_TCP_STREAM_POOL_SIZE default 2U — matches the POSIX
sibling so the BDD target's plain-TCP + TLS-underlying-TCP pair share
one pool. Pool exhaustion returns shared SolidSyslogNullStream with
ERROR; unknown/stale destroy emits WARNING.

mstcpip.h now explicitly preceded by an explicit winsock2.h include
(the prior include order worked by accident — Internal.h transitively
pulled in winsock2.h before mstcpip.h; the new TU layout exposes the
ordering and makes it explicit).

BddTargetWindows + BddTargetTlsSender_OpenSsl_WinsockTcp callers updated
(both drop their *Storage locals). Test file drops the storage local and
the CreateReturnsHandleInsideCallerSuppliedStorage test, and gains a
Pool TEST_GROUP of 9 tests mirroring SolidSyslogPosixTcpStreamPool.
@coderabbitai

coderabbitai Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@DavidCozens has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 50 minutes and 4 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 310d5dd1-3eb7-4032-b3c3-37525dc033c2

📥 Commits

Reviewing files that changed from the base of the PR and between 3dbe504 and 8b7084d.

📒 Files selected for processing (2)
  • Bdd/Targets/Windows/BddTargetWindows.c
  • DEVLOG.md
📝 Walkthrough

Walkthrough

This PR migrates five Windows adapter classes (Mutex, File, Winsock TCP Stream, Datagram, and Resolver) from storage-based lifecycle APIs to pool-backed allocation patterns. Each adapter follows a consistent 3-TU split with pool-size tunables, no-argument creation and pointer-based destruction, new private headers with internal struct definitions, and comprehensive error handling for pool exhaustion and unknown destroy requests.

Changes

Windows adapters onto PoolAllocator

Layer / File(s) Summary
Pool configuration and error messages
Core/Interface/SolidSyslogTunablesDefaults.h, Core/Source/SolidSyslogErrorMessages.h
New pool size macros (WINDOWS_MUTEX_POOL_SIZE=1, WINSOCK_DATAGRAM_POOL_SIZE=1, WINSOCK_RESOLVER_POOL_SIZE=1, WINDOWS_FILE_POOL_SIZE=1, WINSOCK_TCP_STREAM_POOL_SIZE=2) and error message constants for pool exhaustion and unknown destroy across all five components.
Windows Mutex pool-backed lifecycle
Platform/Windows/Interface/SolidSyslogWindowsMutex.h, Platform/Windows/Source/SolidSyslogWindowsMutex.c, SolidSyslogWindowsMutexPrivate.h, SolidSyslogWindowsMutexStatic.c, Tests/SolidSyslogWindowsMutexTest.cpp
Create API changed from _Create(storage) to _Create(void) with pool allocation; Destroy API updated to _Destroy(base) with explicit handle. New lifecycle functions initialise vtable and CRITICAL_SECTION, cleanup overwrites with null mutex vtable on destroy. Pool tests validate filling, overflow to fallback, lock/unlock behavior, and warning on unknown destroy.
Windows File pool-backed lifecycle
Platform/Windows/Interface/SolidSyslogWindowsFile.h, Platform/Windows/Source/SolidSyslogWindowsFile.c, SolidSyslogWindowsFilePrivate.h, SolidSyslogWindowsFileStatic.c, Tests/SolidSyslogWindowsFileTest.cpp
Create API changed from _Create(storage) to _Create(void) with pool allocation; Destroy remains _Destroy(base). New lifecycle functions initialise vtable and reset file descriptor, cleanup closes descriptor and overwrites with null file vtable. Pool tests validate filling, fallback open failure, lock/unlock counts, and warnings for unknown handles.
Winsock TCP Stream pool-backed lifecycle
Platform/Windows/Interface/SolidSyslogWinsockTcpStream.h, Platform/Windows/Source/SolidSyslogWinsockTcpStream.c, SolidSyslogWinsockTcpStreamPrivate.h, SolidSyslogWinsockTcpStreamStatic.c, Tests/SolidSyslogWinsockTcpStreamTest.cpp
Create API changed from _Create(storage) to _Create(void) with pool allocation; Destroy changed from no-arg to _Destroy(base). Fixed winsock2.h include order. New lifecycle functions initialise vtable and socket, cleanup closes socket and overwrites with null stream vtable. Pool tests validate filling, fallback send no-op, and lock/unlock behavior.
Winsock Datagram pool-backed lifecycle
Platform/Windows/Interface/SolidSyslogWinsockDatagram.h, Platform/Windows/Source/SolidSyslogWinsockDatagram.c, SolidSyslogWinsockDatagramPrivate.h, SolidSyslogWinsockDatagramStatic.c, Tests/SolidSyslogWinsockDatagramTest.cpp
Destroy API changed from no-arg to _Destroy(base) with pool-backed handle tracking. New lifecycle functions initialise vtable and socket/connected state, cleanup closes socket and overwrites with null datagram vtable. Pool tests validate filling, fallback SendTo no-op, config lock behavior, and warnings on unknown/stale destroy.
Winsock Resolver pool-backed lifecycle
Platform/Windows/Interface/SolidSyslogWinsockResolver.h, Platform/Windows/Source/SolidSyslogWinsockResolver.c, SolidSyslogWinsockResolverPrivate.h, SolidSyslogWinsockResolverStatic.c, Tests/SolidSyslogWinsockResolverTest.cpp
Destroy API changed from no-arg to _Destroy(base) with pool-backed handle tracking. New lifecycle functions initialise Resolve vtable, cleanup overwrites with null resolver vtable. Pool tests validate distinct fallback allocation, no-op fallback resolve, correct lock/unlock counts, and warning reporting on unknown/stale handles.
Build configuration and BDD target integration
Platform/Windows/CMakeLists.txt, Bdd/Targets/Windows/BddTargetWindows.c, Bdd/Targets/Common/BddTargetTlsSender_OpenSsl_WinsockTcp.c
CMake updated to include new _Static.c pool implementations for all five Windows adapters. BDD Windows target removes file-scope storage and updates create/destroy calls to use new no-arg create and pointer-based destroy. TLS sender removes underlying stream storage and creates stream via no-arg factory.
Development documentation
CLAUDE.md, DEVLOG.md
CLAUDE.md documents updated API contracts (no-arg create, base-pointer destroy). DEVLOG.md S11.07 entry records migration scope, lifecycle decisions (null-object fallback, pool exhaustion handling, no new public null APIs), deferred items (atomic counter, address Windows variant), and open questions about socket/timeout semantics.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related issues

Possibly related PRs

  • DavidCozens/solid-syslog#396: Introduced the SolidSyslogPoolAllocator helper that backs the pool slot acquire/free mechanism used by all five Windows adapter implementations.
  • DavidCozens/solid-syslog#400: Updated BDD lifetime and storage handling to use pointer-based destroy calls with stored handles, aligning with the lifecycle pattern changes in this PR.
  • DavidCozens/solid-syslog#407: Refactored the OpenSSL TLS sender's underlying TCP stream setup with analogous storage removal and no-argument stream creation.

Poem

🐰 Five Windows adapters heed the pool's call,
From static storage to allocators small,
Initialise, cleanup, and null-object grace,
Safe no-ops abound in each fallback place!
The rabbit hops onward, one PoolAllocator strong! 🌟

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 12.70% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'feat: S11.07 Windows adapters onto PoolAllocator' is specific and directly describes the main change: migrating Windows adapter classes to use the PoolAllocator pattern.
Description check ✅ Passed The PR description comprehensively covers Purpose (5 adapter classes, pure migration), Change Description (3-TU split, pool allocation pattern, API shape changes, three key decisions), and Verification (test results, multiple platforms, DEVLOG entry), with clear sections aligned to the template.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/s11-07-windows-sweep

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown
Contributor

☀️   Quality Summary

   🚦   build-linux-gcc: 100% successful (✔️ 1263 passed, 🙈 2 skipped)
   🚦   build-freertos-host-tdd: 100% successful (✔️ 1383 passed, 🙈 2 skipped)
   🚦   build-linux-clang: 100% successful (✔️ 1215 passed, 🙈 2 skipped)
   🚦   sanitize-linux-gcc: 100% successful (✔️ 1215 passed, 🙈 2 skipped)
   🚦   integration-linux-openssl: 100% successful (✔️ 9 passed)
   🚦   integration-windows-openssl: 100% successful (✔️ 9 passed)
   🚦   bdd-linux-syslog-ng: 94% successful (✔️ 46 passed, 🙈 3 skipped)
   🚦   bdd-windows-otel: No test results available
   🚦   bdd-freertos-qemu: 73% successful (✔️ 36 passed, 🙈 13 skipped)
   🚦   build-windows-msvc: 100% successful (✔️ 1104 passed, 🙈 1 skipped)
   🚦   build-linux-tunable-override: 100% successful (✔️ 1215 passed, 🙈 2 skipped)
   ⚠️   Clang-Tidy: 3 warnings (normal: 3)
   ⚠️   CPPCheck: No warnings


🚧   Error Messages

Quality Monitor Errors:
No matching report files found when using pattern '**/junit-bdd-windows-otel/TESTS-*.xml'! Configuration error for 'bdd-windows-otel'?

Created by Quality Monitor v1.14.0 (#f3859fd). More details are shown in the GitHub Checks Result.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
Platform/Windows/Source/SolidSyslogWinsockResolverStatic.c (1)

16-18: ⚡ Quick win

Align helper declarations/definitions with the source helper placement rule.

WinsockResolver_IndexFromHandle and WinsockResolver_CleanupAtIndex are declared as static and defined at file end. The project rule asks for helper functions in .c files to be static inline and placed immediately beneath the first caller.

As per coding guidelines, **/*.c: Forward-declare helper functions at the top of source files (after constants/types) as static inline and define immediately beneath the function that first calls them.

Also applies to: 54-72

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Platform/Windows/Source/SolidSyslogWinsockResolverStatic.c` around lines 16 -
18, The two helper functions WinsockResolver_IndexFromHandle and
WinsockResolver_CleanupAtIndex are currently declared static and defined at the
end of the file; change them to static inline, move their full definitions to
immediately beneath the first function that calls them, and remove the trailing
forward declarations at the file end so the helper placement follows the
project's rule; apply the same change for the other helper declarations
identified (the ones referenced around lines 54-72) so all helper functions are
declared static inline and defined immediately after their first caller (update
any callers to rely on the new inline definitions).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Bdd/Targets/Windows/BddTargetWindows.c`:
- Around line 222-223: The DestroySender function references an undeclared local
variable resolver; move the resolver handle to file-scope like udpDatagram and
plainTcpStream so DestroySender can access it. Declare a file-scope variable
(e.g., static SolidSyslogWinsockResolver* resolver;), update CreateSender to
assign to that file-scope variable instead of creating a new local resolver, and
ensure DestroySender calls SolidSyslogWinsockResolver_Destroy(resolver) and
clears the file-scope variable during teardown.

---

Nitpick comments:
In `@Platform/Windows/Source/SolidSyslogWinsockResolverStatic.c`:
- Around line 16-18: The two helper functions WinsockResolver_IndexFromHandle
and WinsockResolver_CleanupAtIndex are currently declared static and defined at
the end of the file; change them to static inline, move their full definitions
to immediately beneath the first function that calls them, and remove the
trailing forward declarations at the file end so the helper placement follows
the project's rule; apply the same change for the other helper declarations
identified (the ones referenced around lines 54-72) so all helper functions are
declared static inline and defined immediately after their first caller (update
any callers to rely on the new inline definitions).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d7db4ef8-22d9-49ce-9b43-ce4425c69e2e

📥 Commits

Reviewing files that changed from the base of the PR and between f9bb025 and 3dbe504.

📒 Files selected for processing (32)
  • Bdd/Targets/Common/BddTargetTlsSender_OpenSsl_WinsockTcp.c
  • Bdd/Targets/Windows/BddTargetWindows.c
  • CLAUDE.md
  • Core/Interface/SolidSyslogTunablesDefaults.h
  • Core/Source/SolidSyslogErrorMessages.h
  • DEVLOG.md
  • Platform/Windows/CMakeLists.txt
  • Platform/Windows/Interface/SolidSyslogWindowsFile.h
  • Platform/Windows/Interface/SolidSyslogWindowsMutex.h
  • Platform/Windows/Interface/SolidSyslogWinsockDatagram.h
  • Platform/Windows/Interface/SolidSyslogWinsockResolver.h
  • Platform/Windows/Interface/SolidSyslogWinsockTcpStream.h
  • Platform/Windows/Source/SolidSyslogWindowsFile.c
  • Platform/Windows/Source/SolidSyslogWindowsFilePrivate.h
  • Platform/Windows/Source/SolidSyslogWindowsFileStatic.c
  • Platform/Windows/Source/SolidSyslogWindowsMutex.c
  • Platform/Windows/Source/SolidSyslogWindowsMutexPrivate.h
  • Platform/Windows/Source/SolidSyslogWindowsMutexStatic.c
  • Platform/Windows/Source/SolidSyslogWinsockDatagram.c
  • Platform/Windows/Source/SolidSyslogWinsockDatagramPrivate.h
  • Platform/Windows/Source/SolidSyslogWinsockDatagramStatic.c
  • Platform/Windows/Source/SolidSyslogWinsockResolver.c
  • Platform/Windows/Source/SolidSyslogWinsockResolverPrivate.h
  • Platform/Windows/Source/SolidSyslogWinsockResolverStatic.c
  • Platform/Windows/Source/SolidSyslogWinsockTcpStream.c
  • Platform/Windows/Source/SolidSyslogWinsockTcpStreamPrivate.h
  • Platform/Windows/Source/SolidSyslogWinsockTcpStreamStatic.c
  • Tests/SolidSyslogWindowsFileTest.cpp
  • Tests/SolidSyslogWindowsMutexTest.cpp
  • Tests/SolidSyslogWinsockDatagramTest.cpp
  • Tests/SolidSyslogWinsockResolverTest.cpp
  • Tests/SolidSyslogWinsockTcpStreamTest.cpp

Comment thread Bdd/Targets/Windows/BddTargetWindows.c
WinsockResolver_Destroy now needs the handle, but the previous void-arg
shape let resolver live as a CreateSender local. DestroySender doesn't
see that local — the build failed on CI's MSVC job at
BddTargetWindows.c(223,40): 'resolver': undeclared identifier.

Match the file-scope-static pattern the surrounding code already uses
for udpDatagram, plainTcpStream, and the senders. Belongs logically
in the S11.07 WinsockResolver commit; landing as a follow-up because
the original was already pushed.

Build verified with --target SolidSyslogBddTarget locally (missed in
the original commit — only SolidSyslogTests was being built per
commit; default-target build catches this).
@DavidCozens

Copy link
Copy Markdown
Owner Author

CodeRabbit findings — disposition

Bdd/Targets/Windows/BddTargetWindows.c:223 (Critical — resolver undeclared in DestroySender)

Confirmed. Fixed in bab5fc8 — lifted resolver to a file-scope static alongside udpDatagram / plainTcpStream. Matches your proposed diff verbatim. The miss locally was that I built --target SolidSyslogTests per commit but never --target SolidSyslogBddTarget, which is what CI built and what surfaced the error.

SolidSyslogWinsockResolverStatic.c:16-18 (Nitpick — helpers should be static inline, defined beneath first caller)

The CLAUDE.md rule is correct, but the established *Static.c pattern from S11.01/S11.04/S11.05/S11.06 (just merged in #407) all use forward-declare-at-top + define-at-end. My five new Windows *Static.c files mirror that established precedent so the per-class delta target the E11 epic mandates stays one-to-one comparable across platforms.

Fixing only S11.07 would create cross-class inconsistency with the eleven already-merged *Static.c files. Carved out as the next standalone cleanup story so it ships across the whole *Static.c family in one PR — flagged in the DEVLOG's Deferred section in 8b7084d. Does not block S11.08.

@github-actions

Copy link
Copy Markdown
Contributor

☀️   Quality Summary

   🚦   build-linux-gcc: 100% successful (✔️ 1263 passed, 🙈 2 skipped)
   🚦   build-freertos-host-tdd: 100% successful (✔️ 1383 passed, 🙈 2 skipped)
   🚦   build-linux-clang: 100% successful (✔️ 1215 passed, 🙈 2 skipped)
   🚦   sanitize-linux-gcc: 100% successful (✔️ 1215 passed, 🙈 2 skipped)
   🚦   integration-linux-openssl: 100% successful (✔️ 9 passed)
   🚦   integration-windows-openssl: 100% successful (✔️ 9 passed)
   🚦   bdd-linux-syslog-ng: 94% successful (✔️ 46 passed, 🙈 3 skipped)
   🚦   bdd-windows-otel: 90% successful (✔️ 44 passed, 🙈 5 skipped)
   🚦   bdd-freertos-qemu: 73% successful (✔️ 36 passed, 🙈 13 skipped)
   🚦   build-windows-msvc: 100% successful (✔️ 1104 passed, 🙈 1 skipped)
   🚦   build-linux-tunable-override: 100% successful (✔️ 1215 passed, 🙈 2 skipped)
   ⚠️   Clang-Tidy: 3 warnings (normal: 3)
   ⚠️   CPPCheck: No warnings


Created by Quality Monitor v1.14.0 (#f3859fd). More details are shown in the GitHub Checks Result.

@DavidCozens DavidCozens merged commit a54d8a9 into main May 20, 2026
20 checks passed
@DavidCozens DavidCozens deleted the refactor/s11-07-windows-sweep branch May 20, 2026 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

S11.07: Sweep — Windows adapters onto PoolAllocator

1 participant