Skip to content

refactor!: prefix the public error sources - #801

Merged
DavidCozens merged 2 commits into
feature/tls-reworkfrom
refactor/prefix-public-error-sources
Sep 1, 2026
Merged

refactor!: prefix the public error sources#801
DavidCozens merged 2 commits into
feature/tls-reworkfrom
refactor/prefix-public-error-sources

Conversation

@DavidCozens

@DavidCozens DavidCozens commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Purpose

The second half of the naming work #800 began, and the half that costs an API
break. Every *ErrorSource object is declared in a public *Errors.h header, so
docs/NAMING.md puts it at Tier 1 and requires the SolidSyslog prefix. Only the
whole-library SolidSyslogErrorSource carried it.

This has to land in the 0.2.0 window. Integrators match on source identity —
event->Source == &UdpSenderErrorSource — so renaming these objects breaks the
API, and E39 is the one break 0.2.0 gets. Deferring it either costs a second break
later or leaves the violation permanent.

No issue behind this; it was found reviewing #799.

Stacked on #800. The branch is #800's branch plus one commit, but the base is
feature/tls-rework: CI triggers only on pull requests targeting main or that
branch, so a PR based on #800's branch would get no checks at all. The cost is that
the diff below carries #800's rename too until #800 merges — read the two commits
separately, refactor!: prefix the public error sources is this PR's own work.

Change Description

Forty-four objects renamed to SolidSyslog<Class>ErrorSource across the public
headers, the vtable translation units that define them, the _Report inlines that
reference them, and the tests that match on them. Mechanical prefix addition — the
matching rule, the error events and the detail enums are untouched.

docs/NAMING.md had no rule to cite. Tier 1 covered functions, types and tag names
but said nothing about exported objects, so the rename would have rested on
inference. It now states the form: the class name runs straight into the object's
own name, with no underscore, because that separator introduces a function name and
an object has none. SolidSyslogUdpSender_ErrorSource is named as the spelling
that is wrong, which is how the page teaches everywhere else.

CLAUDE.md's *Errors.h row is corrected to match.

No documentation page names any of these objects — checked before assuming it —
so docs/ needs nothing else. misra_suppressions.txt needed no renumbering:
nothing the sweep touched moved a suppressed line.

Test Evidence

No new tests — a rename with no behaviour change, covered by the existing suites.

  • debug preset, gcc image: 1526 tests, 3659 checks, 0 failures.
  • debug preset, cpputest-freertos image: eleven suites, all green, covering the
    FreeRTOS, lwIP, Plus-TCP, Plus-FAT, FatFs and mbedTLS trees the gcc image skips.
  • CI's own cppcheck-misra invocation reproduced locally: exit 0, the same six
    pre-existing findings as refactor: prefix the cross-TU lifecycle functions #800 and no new ones.
  • check_references.py, check_platform_docs.py, check_spdx_headers.py,
    check_headers_c89.py: green.
  • markdownlint-cli2 v0.22.1 over both changed pages: 0 errors.
  • The sweep introduced no line over the 120-column limit: the forty that exceed it
    are the SPDX headers and long-standing comments, identical to refactor: prefix the cross-TU lifecycle functions #800's tree.

refactor! was verified to work rather than assumed, since refactor is
hidden: true in release-please-config.json. Running release-please 17.11.2 —
the version range the pinned action declares — against this repository's own
changelog sections: a breaking refactor! bumps 0.1.0 to 0.2.0 exactly as feat!
does, and renders both a ⚠ BREAKING CHANGES entry and a Refactoring entry,
because the preset keeps any commit carrying notes whatever its section says. A
non-breaking refactor is still dropped.

One thing to confirm: if the E39 branch reaches main as a single squashed commit,
release-please sees that PR's title and not this one, so the ! and the breaking
note have to be carried there too.

Areas Affected

Public: every Core/Interface/*Errors.h and Platform/*/Interface/*Errors.h.
Internal: the matching source trees and unit tests. Documentation: docs/NAMING.md,
CLAUDE.md. The example repositories vendor the library and are regenerated from
their commit stack, so they pick this up with the rest of 0.2.0.

DavidCozens and others added 2 commits September 1, 2026 17:01
Every <Class>_Initialise and <Class>_Cleanup has external linkage and is
declared in a *Private.h header, so docs/NAMING.md puts it at Tier 1 and
requires the SolidSyslog prefix. Eighty-seven functions across Core and the
nine platform packs carried the Tier 2 form instead.

The _Report helpers in the same headers are static inline, so they keep the
Tier 2 form and are untouched.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Every *ErrorSource object is declared in a public *Errors.h header, so
docs/NAMING.md puts it at Tier 1 and requires the SolidSyslog prefix. Only
the whole-library SolidSyslogErrorSource carried it; the other forty-four
did not.

NAMING.md had no rule to cite: Tier 1 covered functions, types and tag
names, but not exported objects. It now states the form - the class name
runs straight into the object's own name, no underscore, since that
separator introduces a function name.

BREAKING CHANGE: every *ErrorSource object declared in a public *Errors.h
header gains the SolidSyslog prefix, so UdpSenderErrorSource becomes
SolidSyslogUdpSenderErrorSource and the rest follow. An error handler that
matches on source identity, event->Source == &UdpSenderErrorSource, must be
updated to the new name. The matching rule itself is unchanged.

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

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (2)
  • main
  • feature/tls-rework

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Essentials

Run ID: 33677cbc-ea04-4702-a7a9-72ed3529a6d0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

Base automatically changed from refactor/prefix-cross-tu-lifecycle-functions to feature/tls-rework September 1, 2026 16:16
@DavidCozens DavidCozens closed this Sep 1, 2026
@DavidCozens DavidCozens reopened this Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

☀️   Quality Summary

   JUnit   build-linux-gcc (Whole Project): ✅ successful — 1560 passed
   JUnit   build-freertos-host-tdd-plustcp (Whole Project): ✅ successful — 1936 passed
   JUnit   build-linux-clang (Whole Project): ✅ successful — 1491 passed
   JUnit   sanitize-linux-gcc (Whole Project): ✅ successful — 1491 passed
   JUnit   integration-linux-openssl (Whole Project): ✅ successful — 17 passed
   JUnit   integration-linux-mbedtls (Whole Project): ✅ successful — 17 passed
   JUnit   integration-windows-openssl (Whole Project): ✅ successful — 17 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 — 1333 passed
   JUnit   build-linux-tunable-override (Whole Project): ✅ successful — 1491 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 047d94a into feature/tls-rework Sep 1, 2026
38 checks passed
@DavidCozens
DavidCozens deleted the refactor/prefix-public-error-sources branch September 1, 2026 16:32
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