Skip to content

feat: S13.18 Windows BDD on the portable ring buffer#264

Merged
DavidCozens merged 6 commits into
mainfrom
feat/s13.18-windows-bdd-circular-buffer
May 4, 2026
Merged

feat: S13.18 Windows BDD on the portable ring buffer#264
DavidCozens merged 6 commits into
mainfrom
feat/s13.18-windows-bdd-circular-buffer

Conversation

@DavidCozens

@DavidCozens DavidCozens commented May 4, 2026

Copy link
Copy Markdown
Owner

Closes #244.

Wires the Windows BDD runner to exercise the buffering path end-to-end via the new portable ring buffer (SolidSyslogCircularBuffer, S04.05). The cross-platform UDP and TCP buffered scenarios (buffered.feature, tcp_transport.feature) now run on both bdd-linux-syslog-ng and bdd-windows-otel.

Slices

  1. test: portable wait_for_prompt for cross-platform BDD — replace select.select + os.read in the Python step layer with a daemon-thread + queue.Queue reader. Same Python signature; works on POSIX and Windows pipe fds. Picked over a production drain-on-shutdown contract so the library doesn't bake test convenience into shipped semantics, and so ungraceful shutdown stays a real testable scenario.

  2. feat: Windows example uses CircularBuffer + service thread — replace SolidSyslogNullBuffer_Create(sender) with caller-allocated SolidSyslogCircularBuffer storage backed by SolidSyslogWindowsMutex. Add a Win32 service thread launched via _beginthreadex driving the existing Common/ExampleServiceThread.c (now linked into the Windows binary as well as Linux Threaded). shutdownFlag + WaitForSingleObject mirror the Linux pthread_join. <windows.h> pinned after <winsock2.h> with a comment so a future cleanup can't alphabetise it back.

  3. test: enable buffered + tcp_transport on the Windows BDD runner — drop @buffered from buffered.feature and tcp_transport.feature; rename their step text to the buffered example…. Step layer routes the new prose to THREADED_BINARY on the Linux oracle and context.example_binary on the Windows oracle. Other @buffered features (file store, switching, mtls/tls, tcp_reconnect) keep their tag and prose — they really are pthread/syslog-ng-specific. tcp_singletask.feature tagged @windows_wip (Linux-only now) since tcp_transport covers Windows TCP via the buffered example.

  4. docs: update README/SKILL/bdd/iec62443 + DEVLOG — README/SKILL drop "planned" wording on CircularBuffer and update the Windows example description. docs/bdd.md rewrites the @buffered tag meaning. docs/iec62443.md updates SR 6.1, the bare-metal/RTOS deployment recipe, and the SL1 starter components to position CircularBuffer as the portable threaded buffer. DEVLOG records decisions, deferred items, and open questions.

Out of scope (deferred)

  • Retiring SolidSyslogPosixMessageQueueBuffer from the Linux Threaded example — explicitly scoped out by the user.
  • Hoisting per-platform CreateSender/DestroySender factories into Example/Common/ — the shapes diverge too much (SwitchingSender vs single-sender) without first widening the Windows example. Flagged for a follow-up refactor.
  • Adding SolidSyslogSwitchingSender, file-backed SolidSyslogBlockStore, or TLS to the Windows example — those are S13.19 / later epic-13 stories.
  • Drain-on-shutdown semantics for ExampleServiceThread_Run and a SolidSyslogBuffer.HasPending probe — deliberate API decision not taken in this story.
  • Tightening ExampleInteractive_Run's stdin handling against a leading UTF-8 BOM (.NET StreamWriter quirk; the BDD harness uses Python which doesn't emit one, so not a CI hazard).

Acceptance

  • bdd-windows-otel runs Bdd/features/buffered.feature (2 scenarios) and Bdd/features/tcp_transport.feature (1 scenario), all green.
  • bdd-linux-syslog-ng continues green — both features still work via the Linux Threaded binary.
  • Other @buffered features remain excluded on Windows via tags and stay green on Linux.
  • No NullBuffer reference left in Example/Windows/.

Local validation

  • MSVC msvc-debug build clean; Linux debug examples (SolidSyslogExample, SolidSyslogThreadedExample) still build cleanly.
  • clang-format + IWYU (clang devcontainer) green.
  • All 11 prompt-protocol Linux BDD scenarios pass against the syslog-ng oracle (buffered, tcp_transport, switching_transport, mtls_transport, tls_transport, block_lifecycle).
  • Linux full BDD not @wip: 16/16 features pass (5 errors are the pre-existing syslog-ng.conf chmod issue on Windows-host bind mounts, unrelated to this PR).
  • Python prompt-protocol smoke against the new Windows binary: sendSent 1 message + prompt → UDP datagram arrives on 127.0.0.1:5514 with proper RFC 5424 framing → quit → exit 0.

Test plan

  • bdd-windows-otel CI job passes (the new acceptance signal).
  • bdd-linux-syslog-ng CI job passes.
  • All other status checks (build-linux-gcc, build-linux-clang, build-windows-msvc, sanitize-linux-gcc, coverage-linux-gcc, analyze-tidy, analyze-cppcheck, analyze-format, analyze-iwyu, integration-linux-openssl) green.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Windows platform now supports buffered message delivery with thread-safe circular buffer and service thread.
    • Cross-platform buffered delivery available as an alternative to single-task null buffer.
  • Documentation

    • Updated buffer abstraction documentation to clarify buffering options and platform support.
    • Updated BDD test scenarios and feature descriptions for buffered delivery.

Replace the select.select + os.read pattern in wait_for_prompt with a
daemon thread that reads stdout byte-by-byte into a queue. Same Python
signature; same return shape; works on POSIX and Windows pipe fds.

Slice 1 of S13.18: prerequisite for letting the Windows runner drive
buffered.feature and tcp_transport.feature via the same prompt
protocol the Linux runner uses today.

Verified: all six prompt-protocol-using features (buffered,
tcp_transport, switching_transport, mtls_transport, tls_transport,
block_lifecycle) pass against the Linux syslog-ng oracle.
Replace SolidSyslogNullBuffer with SolidSyslogCircularBuffer (10
messages, backed by SolidSyslogWindowsMutex) and add a Win32 service
thread launched via _beginthreadex driving the existing
ExampleServiceThread_Run. Shutdown-flag and WaitForSingleObject
mirror the pthread join in the Linux Threaded example.

Slice 2 of S13.18: prerequisite for letting the Windows BDD runner
exercise the buffering path end-to-end. ExampleServiceThread.c now
links into the Windows binary alongside the existing Common helpers.

Verified: msvc-debug build clean, clang-format clean, IWYU clean
(Windows-only file isn't in the Linux compile_commands.json so the
gate is unaffected), Linux examples still build. Smoke-tested via a
Python prompt-protocol harness — UDP datagram arrives on 127.0.0.1:5514
and the example exits cleanly.
Drop @Buffered from buffered.feature and tcp_transport.feature so
they run on bdd-windows-otel — both now resolve to the buffered
example prose, which routes to THREADED_BINARY on the Linux
runner and the (S13.18) Win32-thread-driven binary on the
Windows runner.

Step layer:

- Add run_buffered_example, the cross-platform sibling of
  run_threaded_example. Both share _run_with_prompt_protocol;
  the only difference is binary selection (oracle_format).
- Add three new "the buffered example..." @when steps for the
  shapes used by the two cross-platform features.
- Existing "the threaded example..." steps still resolve to
  THREADED_BINARY for the genuinely Linux-only features
  (file store, switching, mtls/tls, tcp_reconnect).

tcp_singletask.feature: tag @windows_wip. Its purpose was to
validate Windows TCP via the SingleTask/NullBuffer binary;
post-S13.18 the Windows binary is buffered, and tcp_transport
already covers Windows TCP. The single-task feature stays Linux-only
as the bare-metal/synchronous-send pin.

CI tag filter unchanged — `not @buffered` still excludes the right
set on Windows after the @Buffered drop on the two cross-platform
features.

Verified: Linux BDD `not @wip` (16/16 features pass via syslog-ng);
Windows-effective filter (`not @wip and not @windows_wip and not
@buffered`) dry-run shows the new scenarios included and
tcp_singletask excluded.
README, SKILL, and the bdd / iec62443 guides now reflect
that SolidSyslogCircularBuffer is the cross-platform threaded
buffer (replacing "planned" wording from S04.05) and that the
Windows example is buffered + service-thread, not single-task.

@Buffered tag description in docs/bdd.md rewritten to its post-
S13.18 meaning: "needs a Linux-only buffered capability beyond
a basic ring buffer + service thread" (file store, switching
sender, TLS/mTLS, syslog-ng UNIX-socket reload). The cross-
platform "single message via UDP/TCP through a real buffer"
path is now untagged and runs on both runners.

DEVLOG records the test-side-fix-over-production-semantics
choice, the Windows example wiring, the @Buffered re-scoping,
and the deferred refactors (CreateSender hoisting, drain-on-
shutdown semantics, PosixMessageQueueBuffer retirement).
@coderabbitai

coderabbitai Bot commented May 4, 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 42 minutes and 48 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ 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: fc6e80b3-978c-43b1-916d-e02b34c96f7a

📥 Commits

Reviewing files that changed from the base of the PR and between 6284412 and 62c68a7.

📒 Files selected for processing (2)
  • Bdd/features/steps/syslog_steps.py
  • docs/iec62443.md
📝 Walkthrough

Walkthrough

Windows BDD support is added for the portable ring buffer by refactoring cross-platform prompt handling in Python tests, updating the Windows example to use SolidSyslogCircularBuffer with SolidSyslogWindowsMutex and a Win32 service thread, and adjusting BDD feature tags and step prose to run buffered scenarios on both Linux and Windows runners.

Changes

Windows Ring Buffer BDD & Example Integration

Layer / File(s) Summary
BDD Infrastructure (Cross-Platform Prompt Protocol)
Bdd/features/steps/syslog_steps.py
_start_stdout_reader(process) adds a daemon thread to read process.stdout into a queue; wait_for_prompt refactored to consume from that queue with timeouts instead of POSIX select.select, replacing platform-specific file descriptor polling. _run_with_prompt_protocol centralizes prompt-driven binary interaction. run_threaded_example delegates to the shared protocol; new run_buffered_example selects binary by oracle format and also delegates.
Windows Example Threading & Buffering
Example/Windows/SolidSyslogWindowsExample.c, Example/CMakeLists.txt
SolidSyslogWindowsExample.c replaces SolidSyslogNullBuffer with SolidSyslogCircularBuffer + SolidSyslogWindowsMutex. Adds ServiceThreadEntry and shutdownFlag to spawn a Win32 service thread via _beginthreadex that drains the buffer, with thread join and mutex/buffer cleanup on shutdown. CMakeLists.txt includes Common/ExampleServiceThread.c in Windows example sources and updates documentation.
BDD Feature & Step Updates
Bdd/features/buffered.feature, Bdd/features/tcp_transport.feature, Bdd/features/tcp_singletask.feature
buffered.feature and tcp_transport.feature drop @buffered tag exclusion and change step prose from "threaded example" to "buffered example" (routes to buffered Windows binary or Linux threaded binary per oracle format). tcp_singletask.feature adds @windows_wip tag and clarifies Linux-only single-task scope. Feature descriptions specify real (non-Null) buffers and platform-specific wiring.
Documentation & Design Record
README.md, SKILL.md, docs/bdd.md, docs/iec62443.md, DEVLOG.md
README lists CircularBuffer as a portable threaded buffer option; SKILL clarifies buffer implementations (NullBuffer, CircularBuffer with injected mutex, PosixMessageQueueBuffer); docs/bdd.md redefines @buffered as Linux-only advanced features; docs/iec62443.md expands portable buffering guidance for RTOS/bare-metal; DEVLOG.md documents S13.18 decisions, deferred items, and open questions.
sequenceDiagram
    participant Main as Main Thread
    participant CB as CircularBuffer
    participant MT as Mutex
    participant ST as Service Thread
    participant Send as Sender

    Main->>CB: initialize with storage
    Main->>MT: create WindowsMutex
    Main->>ST: spawn via _beginthreadex
    rect rgba(0, 100, 200, 0.5)
      Main->>MT: lock
      Main->>CB: enqueue message
      Main->>MT: unlock
    end
    ST->>MT: lock
    ST->>CB: dequeue message
    ST->>MT: unlock
    ST->>Send: send via syslog
    Main->>Main: set shutdownFlag = true
    Main->>ST: WaitForSingleObject (join)
    Main->>MT: destroy
    Main->>CB: destroy
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 A rabbit's hop through buffers new,
CircularRings on Windows too!
Mutexes guard the hopping thread,
Cross-platform syslog feasts ahead. 🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 52.94% 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 title clearly summarizes the main change: Windows BDD integration using the portable ring buffer (S13.18), which is the primary objective of this PR.
Description check ✅ Passed The description comprehensively covers Purpose (closes #244, wires Windows BDD), Change Description (detailed slices), Test Evidence (acceptance criteria and validation), and Areas Affected (BDD, Windows example, docs).
Linked Issues check ✅ Passed All four planned slices from issue #244 are fully addressed: (1) portable wait_for_prompt with daemon thread + queue, (2) Windows example uses CircularBuffer + service thread, (3) buffered/tcp_transport features run cross-platform with proper routing, (4) docs updated and DEVLOG recorded.
Out of Scope Changes check ✅ Passed All changes are scoped to S13.18 objectives. Out-of-scope items (PosixMessageQueueBuffer retirement, factory hoisting, switching sender/file store/TLS, drain-on-shutdown API, stdin BOM handling) are explicitly deferred and documented in DEVLOG.

✏️ 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 feat/s13.18-windows-bdd-circular-buffer

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
Review rate limit: 0/1 reviews remaining, refill in 42 minutes and 48 seconds.

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

@github-actions

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

☀️   Quality Summary

   🚦   build-linux-gcc: 100% successful (✔️ 1049 passed, 🙈 3 skipped)
   🚦   build-linux-clang: 100% successful (✔️ 998 passed, 🙈 3 skipped)
   🚦   sanitize-linux-gcc: 100% successful (✔️ 998 passed, 🙈 3 skipped)
   🚦   integration-linux-openssl: 100% successful (✔️ 9 passed)
   🚦   bdd-linux-syslog-ng: 100% successful (✔️ 46 passed)
   🚦   bdd-windows-otel: 7% successful (❌ 25 failed, ✔️ 3 passed, 🙈 18 skipped)
   🚦   build-windows-msvc: 100% successful (✔️ 911 passed, 🙈 1 skipped)
   ⚠️   Clang-Tidy: No warnings
   ⚠️   CPPCheck: No warnings


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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
Bdd/features/steps/syslog_steps.py (1)

309-318: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Raise immediately if stdout closes before the prompt arrives.

When the queue yields None, this helper returns partial output as if the handshake succeeded. That turns an example crash/early exit into a later timeout or BrokenPipeError in unrelated steps instead of failing at the real point of breakage.

Suggested fix
         try:
             data = process._solidsyslog_byte_queue.get(timeout=min(remaining, 0.5))
         except queue.Empty:
             continue
         if data is None:
-            break
+            raise EOFError(
+                "Process exited before emitting the prompt. "
+                f"Output so far: {output.decode(errors='replace')}"
+            )
         output += data
         if output.endswith(b"SolidSyslog> "):
             return output.decode()
-    return output.decode()
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Bdd/features/steps/syslog_steps.py` around lines 309 - 318, When the helper
reads from process._solidsyslog_byte_queue and sees data is None it should fail
immediately instead of returning partial output; change the branch that
currently breaks on None to raise an exception (e.g., RuntimeError with a clear
message like "stdout closed before prompt") so callers see the real early-exit
point; keep the rest of the loop (the queue.get, output accumulation, and the
output.endswith(b"SolidSyslog> ") prompt check) unchanged.
Example/Windows/SolidSyslogWindowsExample.c (1)

157-171: ⚠️ Potential issue | 🟠 Major

Check _beginthreadex() return value before using as a HANDLE.

_beginthreadex() returns 0 on failure (not INVALID_HANDLE_VALUE). The current code does not check for failure, so if thread creation fails, serviceThread becomes a NULL handle. Subsequent WaitForSingleObject() and CloseHandle() calls will fail, and the service thread never runs—so buffered messages accumulate and never drain. Add an error check after line 158 and fail fast with cleanup instead of proceeding to the interactive loop.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Example/Windows/SolidSyslogWindowsExample.c` around lines 157 - 171, Check
the return value from _beginthreadex when assigning to serviceThread (it returns
0 on failure, not INVALID_HANDLE_VALUE); if _beginthreadex returns 0, set
shutdownFlag=true, perform any necessary cleanup and fail fast instead of
calling ExampleInteractive_Run. Specifically, after calling _beginthreadex that
creates serviceThread for ServiceThreadEntry, verify serviceThread != 0, and on
failure avoid calling ExampleInteractive_Run with an invalid handle and skip
WaitForSingleObject/CloseHandle; log/report the error and cleanup resources
before returning.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/iec62443.md`:
- Line 40: Update the SR 6.1 table row to stop claiming SolidSyslog_Log is
non-blocking for all buffers and instead state that non-blocking behavior
applies only when using buffered implementations (SolidSyslogCircularBuffer or
SolidSyslogPosixMessageQueueBuffer); explicitly note that SolidSyslogNullBuffer
performs sends on the caller's thread (synchronous single-task behavior) and
that SolidSyslog_Service performs blocking I/O on the integrator's chosen thread
bounded by SO_SNDTIMEO, referencing SolidSyslog_Log, SolidSyslogNullBuffer,
SolidSyslogCircularBuffer, SolidSyslogPosixMessageQueueBuffer, and
SolidSyslog_Service to clarify which components are synchronous vs buffered.

---

Outside diff comments:
In `@Bdd/features/steps/syslog_steps.py`:
- Around line 309-318: When the helper reads from
process._solidsyslog_byte_queue and sees data is None it should fail immediately
instead of returning partial output; change the branch that currently breaks on
None to raise an exception (e.g., RuntimeError with a clear message like "stdout
closed before prompt") so callers see the real early-exit point; keep the rest
of the loop (the queue.get, output accumulation, and the
output.endswith(b"SolidSyslog> ") prompt check) unchanged.

In `@Example/Windows/SolidSyslogWindowsExample.c`:
- Around line 157-171: Check the return value from _beginthreadex when assigning
to serviceThread (it returns 0 on failure, not INVALID_HANDLE_VALUE); if
_beginthreadex returns 0, set shutdownFlag=true, perform any necessary cleanup
and fail fast instead of calling ExampleInteractive_Run. Specifically, after
calling _beginthreadex that creates serviceThread for ServiceThreadEntry, verify
serviceThread != 0, and on failure avoid calling ExampleInteractive_Run with an
invalid handle and skip WaitForSingleObject/CloseHandle; log/report the error
and cleanup resources before returning.
🪄 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: 7c8e4cdc-a727-476d-ae4a-02deee4eb3cb

📥 Commits

Reviewing files that changed from the base of the PR and between 7b5bd01 and 6284412.

📒 Files selected for processing (11)
  • Bdd/features/buffered.feature
  • Bdd/features/steps/syslog_steps.py
  • Bdd/features/tcp_singletask.feature
  • Bdd/features/tcp_transport.feature
  • DEVLOG.md
  • Example/CMakeLists.txt
  • Example/Windows/SolidSyslogWindowsExample.c
  • README.md
  • SKILL.md
  • docs/bdd.md
  • docs/iec62443.md

Comment thread docs/iec62443.md Outdated
The pre-S13.18 run_example wrote `send N\nquit\n` upfront via
process.communicate() and relied on NullBuffer's synchronous Send
to guarantee delivery before exit. After S13.18 the Windows
SolidSyslogExample.exe is buffered (CircularBuffer + service
thread); `quit` could land before the service thread had drained,
losing the UDP packet. Effect on the first push: 9 features that
use "the example program sends..." regressed on Windows
(header_fields, message_fields, origin, prival, structured_data,
syslog, time_quality, timestamp, udp_mtu) — all reporting
"oracle received 0 of 1 messages within 5 seconds".

Same fix as the cross-platform `the buffered example` step from
the previous slice: route through _run_with_prompt_protocol so
the oracle confirms receipt before `quit`. The Linux SingleTask
binary supports the prompt protocol identically — its NullBuffer
just makes the Sent N message print immediately, so wait_for_messages
returns instantly.

Verified: Linux 12 features × 30 scenarios pass against syslog-ng
(syslog, header_fields, timestamp, structured_data, time_quality,
origin, prival, message_fields, udp_mtu, buffered, tcp_singletask,
tcp_transport).
@github-actions

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

☀️   Quality Summary

   🚦   build-linux-gcc: 100% successful (✔️ 1049 passed, 🙈 3 skipped)
   🚦   build-linux-clang: 100% successful (✔️ 998 passed, 🙈 3 skipped)
   🚦   sanitize-linux-gcc: 100% successful (✔️ 998 passed, 🙈 3 skipped)
   🚦   integration-linux-openssl: 100% successful (✔️ 9 passed)
   🚦   bdd-linux-syslog-ng: 100% successful (✔️ 46 passed)
   🚦   bdd-windows-otel: 61% successful (✔️ 28 passed, 🙈 18 skipped)
   🚦   build-windows-msvc: 100% successful (✔️ 911 passed, 🙈 1 skipped)
   ⚠️   Clang-Tidy: No warnings
   ⚠️   CPPCheck: No warnings


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

`SolidSyslogNullBuffer` performs the transport Send on the caller's
thread, so SolidSyslog_Log() with NullBuffer wired is synchronous —
bounded by SO_SNDTIMEO but blocking until the bytes leave the socket.
The non-blocking property only holds in buffered wirings
(CircularBuffer / PosixMessageQueueBuffer) where Service() drains
on a separate thread.

The pre-S13.18 row had the same fudge ("NullBuffer for immediate
send" buried in a non-blocking claim); rewriting the cell for S13.18
was the moment to correct it but I perpetuated it. CodeRabbit caught
on the PR review.

New SR 6.1 row makes the trade-off explicit: two wirings, two cost
models, caller picks per deployment.
@DavidCozens

Copy link
Copy Markdown
Owner Author

On the Docstring Coverage 52.94% < 80% pre-merge warning — leaving as-is, deliberately.

The new helpers added or rewritten in this PR all have docstrings explaining the why, not just the what: _start_stdout_reader, _run_with_prompt_protocol, run_buffered_example, the unified run_example, and the updated wait_for_prompt and run_threaded_example. The pre-existing wait_for_messages, syslog_ng_reload, syslog_ng_swap_config, wait_for_tcp_port_*, and similar helpers also already carry docstrings.

The 52.94% gap is almost entirely Behave step-decorator functions (@given / @when / @then) — by convention these don't carry docstrings because the step text supplied to the decorator IS the documentation; a redundant """Step: ...""" would just restate the decorator argument. Same convention is already used throughout this file (every step in the prior 1100+ lines is undocstring'd).

Adding throwaway docstrings to ~20 step functions just to hit the threshold would be noise — and it would obscure the fact that the helper functions, which actually need the why, do have substantive ones.

@github-actions

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

☀️   Quality Summary

   🚦   build-linux-gcc: 100% successful (✔️ 1049 passed, 🙈 3 skipped)
   🚦   build-linux-clang: 100% successful (✔️ 998 passed, 🙈 3 skipped)
   🚦   sanitize-linux-gcc: 100% successful (✔️ 998 passed, 🙈 3 skipped)
   🚦   integration-linux-openssl: 100% successful (✔️ 9 passed)
   🚦   bdd-linux-syslog-ng: 100% successful (✔️ 46 passed)
   🚦   bdd-windows-otel: 61% successful (✔️ 28 passed, 🙈 18 skipped)
   🚦   build-windows-msvc: 100% successful (✔️ 911 passed, 🙈 1 skipped)
   ⚠️   Clang-Tidy: No warnings
   ⚠️   CPPCheck: No warnings


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

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.

S13.18: Windows BDD exercising the portable ring buffer

1 participant