Parent epic: #40
Goal
Wire the Windows BDD harness to exercise the buffering path end-to-end via the new portable ring buffer (SolidSyslogCircularBuffer, S04.05). Prove the ring buffer behaves identically on Windows (MSVC, Winsock) as on POSIX, and unblock the cross-platform UDP and TCP buffered scenarios on the Windows runner.
Out of scope for this story:
- Retiring
PosixMessageQueueBuffer from the Linux Threaded example — stays as-is.
- Adding
SwitchingSender, file-backed BlockStore, or TLS to the Windows example — those land later.
Plan / slices
-
BDD prompt-protocol portability (test-side fix). Replace select.select + os.read in wait_for_prompt (Bdd/features/steps/syslog_steps.py) with a thread-based stdout reader so the prompt protocol works on both POSIX and Windows pipe fds. Same Python signature; no production change. Verified by the Linux BDD container staying green.
Rationale: chosen over a production drain-on-shutdown path so the library/example don't bake test convenience into shipped semantics, and so ungraceful shutdown remains a real testable scenario.
-
Windows example: NullBuffer → CircularBuffer + service thread. Replace SolidSyslogNullBuffer_Create(sender) (Example/Windows/SolidSyslogWindowsExample.c:105) with caller-allocated SolidSyslogCircularBuffer storage backed by SolidSyslogWindowsMutex. Add a Windows service-thread launcher (_beginthreadex driving the existing ExampleServiceThread_Run). Wire shutdown_flag + thread-join into the destruction path, mirroring the Linux Threaded example. Reuse Example/Common/ helpers wherever possible; flag any factory code that wants hoisting from per-platform main.c files into Common/ rather than silently widening this story's scope.
-
Tag + step-prose adjustments. Drop the @buffered exclusion from the two cross-platform features so they run on Windows:
Bdd/features/buffered.feature (UDP)
Bdd/features/tcp_transport.feature (TCP)
Rename the step text in those two features from the threaded example… to the buffered example…. The other @buffered features stay as-is — they really are pthread-specific (file store, switching sender, TLS, syslog-ng UNIX-socket reload) and keep the the threaded example prose. Update the step layer to dispatch the new wording: route to THREADED_BINARY on the Linux runner and context.example_binary (the buffered Windows binary) on the Windows runner. Update CI exclusion in .github/workflows/ci.yml accordingly.
-
DEVLOG entry + close-out.
Acceptance
bdd-windows-otel runs Bdd/features/buffered.feature and Bdd/features/tcp_transport.feature and they pass.
bdd-linux-syslog-ng continues to pass — both features still work via the Linux Threaded binary.
- Other
@buffered features (store, switching, mtls, tls, reconnect, etc.) continue to be excluded on the Windows runner via tags and remain green on Linux.
- Windows example uses
SolidSyslogCircularBuffer + SolidSyslogWindowsMutex + a Windows service thread; no NullBuffer reference left in Example/Windows/.
Dependencies
Parent epic: #40
Goal
Wire the Windows BDD harness to exercise the buffering path end-to-end via the new portable ring buffer (
SolidSyslogCircularBuffer, S04.05). Prove the ring buffer behaves identically on Windows (MSVC, Winsock) as on POSIX, and unblock the cross-platform UDP and TCP buffered scenarios on the Windows runner.Out of scope for this story:
PosixMessageQueueBufferfrom the Linux Threaded example — stays as-is.SwitchingSender, file-backedBlockStore, or TLS to the Windows example — those land later.Plan / slices
BDD prompt-protocol portability (test-side fix). Replace
select.select+os.readinwait_for_prompt(Bdd/features/steps/syslog_steps.py) with a thread-based stdout reader so the prompt protocol works on both POSIX and Windows pipe fds. Same Python signature; no production change. Verified by the Linux BDD container staying green.Rationale: chosen over a production drain-on-shutdown path so the library/example don't bake test convenience into shipped semantics, and so ungraceful shutdown remains a real testable scenario.
Windows example: NullBuffer → CircularBuffer + service thread. Replace
SolidSyslogNullBuffer_Create(sender)(Example/Windows/SolidSyslogWindowsExample.c:105) with caller-allocatedSolidSyslogCircularBufferstorage backed bySolidSyslogWindowsMutex. Add a Windows service-thread launcher (_beginthreadexdriving the existingExampleServiceThread_Run). Wireshutdown_flag+ thread-join into the destruction path, mirroring the Linux Threaded example. ReuseExample/Common/helpers wherever possible; flag any factory code that wants hoisting from per-platformmain.cfiles intoCommon/rather than silently widening this story's scope.Tag + step-prose adjustments. Drop the
@bufferedexclusion from the two cross-platform features so they run on Windows:Bdd/features/buffered.feature(UDP)Bdd/features/tcp_transport.feature(TCP)Rename the step text in those two features from
the threaded example…tothe buffered example…. The other@bufferedfeatures stay as-is — they really are pthread-specific (file store, switching sender, TLS, syslog-ng UNIX-socket reload) and keep thethe threaded exampleprose. Update the step layer to dispatch the new wording: route toTHREADED_BINARYon the Linux runner andcontext.example_binary(the buffered Windows binary) on the Windows runner. Update CI exclusion in.github/workflows/ci.ymlaccordingly.DEVLOG entry + close-out.
Acceptance
bdd-windows-otelrunsBdd/features/buffered.featureandBdd/features/tcp_transport.featureand they pass.bdd-linux-syslog-ngcontinues to pass — both features still work via the Linux Threaded binary.@bufferedfeatures (store, switching, mtls, tls, reconnect, etc.) continue to be excluded on the Windows runner via tags and remain green on Linux.SolidSyslogCircularBuffer+SolidSyslogWindowsMutex+ a Windows service thread; noNullBufferreference left inExample/Windows/.Dependencies
SolidSyslogCircularBuffer,SolidSyslogMutex,SolidSyslogPosixMutex,SolidSyslogWindowsMutex,SolidSyslogNullMutexall available.