Skip to content

docs: S23.22 hold the Posix page to what the adapters do - #741

Merged
DavidCozens merged 2 commits into
mainfrom
docs/posix-triage
Aug 10, 2026
Merged

docs: S23.22 hold the Posix page to what the adapters do#741
DavidCozens merged 2 commits into
mainfrom
docs/posix-triage

Conversation

@DavidCozens

@DavidCozens DavidCozens commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Purpose

The Posix platform triage — the fifth of eight platforms, and the same treatment
the Windows page had in #739: every claim on the page read out of the adapter,
and the things the page was silent about stated.

It also carries the FreeRTOS uptime correction that #739's review raised late.
That was deferred deliberately rather than pushed to a merging PR, because a
prose fix is not worth a review cycle of its own.

Part of #708.

Change Description

Linking guidance that was half-stated. setup.md said selecting this
platform "links rt publicly … you do not have to add it yourself". That is true
for a CMake consumer — Core/Source/CMakeLists.txt links rt PUBLIC under
SOLIDSYSLOG_POSIX — and not true for a consumer of libSolidSyslog.a directly,
which on glibc before 2.34 must add -lrt itself. The page now draws that
distinction, and index.md drops its contradicting parenthetical so the linking
advice has one home.

I first read this as the linkage not existing at all, and pushed a correction
that made an accurate page wrong; review caught it and 4ed1b27 fixes it. The
cause is worth recording: three greps, each read through head, and the line
that mattered was below the cut every time.

A limit the caller cannot see. SolidSyslogPosixMessageQueueBuffer_Create
passes maxMessages / maxMessageSize straight to mq_open, and an
unprivileged process cannot exceed fs/mqueue/msg_max (10) or msgsize_max
(8192) — verified in the gcc container, where mq_maxmsg = 11 already fails
EINVAL. The failure path is correct (slot released, ERROR reported,
SolidSyslogNullBuffer returned) but nothing told the integrator that a
100-record queue is not theirs to ask for.

Two statements the page owed the reader, both matching the shape agreed for
Windows: nothing calls fsync, so durability belongs to the volume; and the
dead-peer window is 30 to 85 seconds — keepalive at 45 s idle plus 4 × 10 s, with
TCP_USER_TIMEOUT bounding the write-in-flight case at 30 s. Records handed to
the kernel inside that window are reported delivered and lost with the
connection, which is the consequence worth stating.

Corrections. "Forwarded unmodified" named neither source; it is gethostname
and getpid.

Checked, and deliberately unchanged: the Datagram adapter meets its contract
with no exception (EMSGSIZEOVERSIZE, MaxPayload from IP_MTU), so #736
does not reach it; the store file really is created 0600; the UDP socket really
is left blocking while the TCP one is not; and BUFFER_BACKEND_FAILED is
deliberately ERROR rather than CRITICAL under docs/error-severity.md, since
raising a sysctl is an operator action rather than a code change.

Test Evidence

Documentation only; no production code is touched.

Check Result
markdownlint-cli2 v0.22.1, changed files 0 errors
mkdocs build --strict built
scripts/check_platform_docs.py 10 platforms, 12 roles, boundary clean

The mq_open ceiling was verified by probing it in the gcc container rather
than asserted from documentation: msg_max 10, msgsize_max 8192, and
mq_maxmsg of 11, 100 and 1000 all rejected with EINVAL.

Areas Affected

docs/platforms/posix/, and one paragraph of docs/platforms/freertos/setup.md.

No production code is touched, and no decision is left open — the rt linkage
already behaves correctly; only its description needed fixing.

Adds the three things the page was silent on — writes are not fsynced, the
dead-peer window is 30 to 85 seconds, and the message queue is capped by
fs/mqueue rather than by the caller — and corrects the host-identity wording.

The link guidance said the build links rt for you. Nothing in the CMake tree
does; glibc 2.34 moved the message-queue functions into libc, so the promise
has never been tested by a container new enough to run CI.

Also carries the FreeRTOS uptime unit correction deferred from #739's review.

Part of #708.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

The PR updates FreeRTOS uptime semantics and POSIX documentation. It clarifies glibc linking requirements, host identity sources, filesystem durability, TCP failure detection, and POSIX message-queue limits.

Changes

Platform documentation

Layer / File(s) Summary
FreeRTOS uptime semantics
docs/platforms/freertos/setup.md
Documents SolidSyslogFreeRtos_GetSysUpTime as hundredths of a second since boot, scaled from FreeRTOS ticks.
POSIX requirements and runtime behaviour
docs/platforms/posix/index.md, docs/platforms/posix/setup.md
Updates glibc linking guidance. Documents host identity sources, filesystem durability limits, TCP keepalive timing, write timeouts, and message-queue failure behaviour and limits.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Description check ✅ Passed The description completes all required sections and clearly explains the documentation changes, affected areas, and validation results.
Title check ✅ Passed The title clearly identifies the POSIX documentation change and its alignment with adapter behaviour.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/posix-triage

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

@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

🤖 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 `@docs/platforms/posix/setup.md`:
- Around line 16-19: Update the POSIX message-queue linking guidance to
distinguish CMake consumers, which receive the PUBLIC rt dependency
automatically when SOLIDSYSLOG_POSIX is enabled, from direct libSolidSyslog.a
consumers, which must add -lrt on glibc versions before 2.34; remove the blanket
claim that no extra linking is needed.
🪄 Autofix

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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 906c248d-1104-4211-a916-6a605977915d

📥 Commits

Reviewing files that changed from the base of the PR and between cb351e5 and 13156b3.

📒 Files selected for processing (3)
  • docs/platforms/freertos/setup.md
  • docs/platforms/posix/index.md
  • docs/platforms/posix/setup.md

Comment thread docs/platforms/posix/setup.md Outdated
@DavidCozens

Copy link
Copy Markdown
Collaborator Author

@coderabbitai pause

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Reviews paused.

Core/Source/CMakeLists.txt links rt PUBLIC under SOLIDSYSLOG_POSIX, so a CMake
consumer inherits it. Only a direct consumer of the archive adds -lrt, and only
on glibc before 2.34.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

☀️   Quality Summary

   JUnit   build-linux-gcc (Whole Project): ✅ successful — 1529 passed
   JUnit   build-freertos-host-tdd-plustcp (Whole Project): ✅ successful — 1881 passed
   JUnit   build-linux-clang (Whole Project): ✅ successful — 1460 passed
   JUnit   sanitize-linux-gcc (Whole Project): ✅ successful — 1460 passed
   JUnit   integration-linux-openssl (Whole Project): ✅ successful — 16 passed
   JUnit   integration-linux-mbedtls (Whole Project): ✅ successful — 14 passed
   JUnit   integration-windows-openssl (Whole Project): ✅ successful — 16 passed
   JUnit   bdd-linux-syslog-ng (Whole Project): ✅ successful — 49 passed, 3 skipped
   JUnit   bdd-windows-otel (Whole Project): ✅ successful — 46 passed, 6 skipped
   JUnit   bdd-freertos-qemu-plustcp (Whole Project): ✅ successful — 45 passed, 7 skipped
   JUnit   bdd-freertos-qemu-lwip (Whole Project): ✅ successful — 45 passed, 7 skipped
   JUnit   build-windows-msvc (Whole Project): ✅ successful — 1302 passed
   JUnit   build-linux-tunable-override (Whole Project): ✅ successful — 1460 passed
   ⚠️   Clang-Tidy (Whole Project): No warnings
   ⚠️   CPPCheck (Whole Project): No warnings


Created by Quality Monitor v4.15.0 (#82d77af). More details are shown in the GitHub Checks Result.

@DavidCozens
DavidCozens merged commit a42e121 into main Aug 10, 2026
37 checks passed
@DavidCozens
DavidCozens deleted the docs/posix-triage branch August 10, 2026 21:04
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.

1 participant