feat: S13.5 promote prival and message_fields to Windows runner#158
Conversation
The Windows example now accepts --facility/--severity/--msgid/--message via a tiny argv parser. Extracted to its own translation unit (Example/Windows/ExampleWindowsCommandLine.c) so it has a unit-testable surface — TDD discipline mirroring the POSIX ExampleCommandLine.c + ExampleCommandLineTest.cpp pattern. Inline-in-main was a discipline miss caught in review. Tests/CMakeLists.txt now adds Tests/Example/ when either POSIX or (WINSOCK + Windows platform) is configured. Tests/Example/CMakeLists.txt conditionally pulls in the right test files and production sources per platform: ExampleAppNameTest always, the existing four POSIX tests when SOLIDSYSLOG_POSIX, and the new ExampleWindowsCommandLineTest when SOLIDSYSLOG_WINSOCK and HAVE_WINDOWS_PLATFORM. The ExampleTests target now builds and runs on the windows-build-and-test job too. parse_otel_jsonl_line now reads OTel's `message` and `msg_id` attributes (confirmed via the parser experiment in #156's discussion: OTel's RFC 5424 receiver is an independent oracle in the same role syslog-ng plays on Linux). Verified locally: - ExampleWindowsCommandLine unit tests on MSVC: 11 / 11 green - All ExampleTests on Linux gcc: 41 / 41 green - BDD on Windows via otelcol oracle: 5 features / 14 scenarios / 52 steps - BDD on Linux via docker-compose: 14 features / 31 scenarios / 160 steps unchanged - tidy, cppcheck, sanitize, format: all green Refs #129 (follow-up promotion work) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 40 minutes and 22 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, 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 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (10)
✨ 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 🚦 Unit Tests (GCC): 99% successful (✔️ 539 passed, 🙈 3 skipped) Created by Quality Monitor v1.14.0 (#f3859fd). More details are shown in the GitHub Checks Result. |
Summary
The Windows example now accepts `--facility` / `--severity` / `--msgid` / `--message`, and the OTel parser reads OTel's `message` / `msg_id` attributes — enough to promote two more features out of `@windows_wip`.
Discipline note: my first attempt put the CLI parser inline in `SolidSyslogWindowsExample.c` with no unit tests — caught in review against the POSIX `ExampleCommandLine` precedent which has `ExampleCommandLineTest.cpp` covering every flag. This commit extracts the parser into its own TU and adds the matching unit-test file.
What's new
Test infra changes
`Tests/CMakeLists.txt` previously gated `Tests/Example/` on `SOLIDSYSLOG_POSIX` only — meaning `ExampleTests.exe` didn't build on the windows-build-and-test job at all. Now gates on `SOLIDSYSLOG_POSIX OR (SOLIDSYSLOG_WINSOCK AND HAVE_WINDOWS_PLATFORM)`, and `Tests/Example/CMakeLists.txt` conditionally pulls in the right test files and production sources per platform. `ExampleAppNameTest` is now part of the test suite on both platforms; the existing POSIX-only tests remain POSIX-only.
Local verification
Remaining @windows_wip features
After this PR: `structured_data`, `origin`, `time_quality`. All three need OTel's nested SD kvlist re-rendered into `[name key="value"]` text form so the existing regex `Then` steps work unchanged. Single follow-up PR (Batch C).
Refs #129
Test plan
🤖 Generated with Claude Code