Skip to content

docs(r15): The C++ toolbox — example 46 + chapter 46 (Appendices: Tooling) - #15

Merged
patterncatalyst merged 3 commits into
mainfrom
docs/r15-cpp-toolbox
Aug 2, 2026
Merged

patterncatalyst merged 3 commits into
mainfrom
docs/r15-cpp-toolbox

Conversation

@patterncatalyst

Copy link
Copy Markdown
Owner

Second chapter of Part 13 — Appendices: Tooling: the C++ toolchain at reference depth. Single-language (langs: [cpp]), local, cleanly CI-verifiable.

What's in it

  • Example 46-cpp-toolbox/ — a deterministic C++23 toolbox binary + toolchain artifacts, engineered so every tool produces a checkable effect. verify.lua → PASS 20/0.
  • Chapter _docs/46-cpp-toolbox.md (815 lines) — CMake presets in depth, Conan 2 lockfiles, GCC-vs-clang parity, gdb pretty-printers, lint/format/sanitize/ccache/mold recipes.
  • 2 diagrams — 46-cmake-preset-graph (preset inheritance) and 46-toolbox-pipeline (the tool pipeline around the parity gate).

The design idea

A "toolbox" example can't just prove tools ran. Each tool is pinned to a real assertion:

  • Dual-compiler byte parity — one source, GCC + clang builds, toolbox report output byte-identical (digest=0x481984990deee5ff, empty diff). This doubles as the chapter's cross-check.
  • UBSan recipe — asserts runtime error: signed integer overflow at toolbox.cpp:43.
  • gdb pretty-printer — a Python printer renders Digest(0x481984990deee5ff).
  • clang-tidy — asserts the pinned performance-unnecessary-value-param at smell.cpp:3.
  • clang-format --dry-run --Werror; Conan 2 with a committed conan.lock (fmt/11.0.2) in an isolated sub-target kept out of the default build so fedora CI smoke stays green.

Verification

Clean local run — no VM/root/podman. status--verified for the PASS 20/0 host run (GCC 16.1.1, clang 22.1.8, CMake 4.3.0, gdb 17.2, Conan 2.30.0). Only ccache/mold are status--unverified (absent on the reference host — demonstrated, not run). GCC-vs-clang diagnostic differences are framed as illustrative live-session asides, never gated.

Differentiation

Cross-references — not re-teaches — ch31 (profiling breadth), ch28 (gdb remote/core), ch29 (sanitizer matrix). ch46 is C++ build/debug depth.

Gate

  • verify.lua PASS 20/0 · scripts/validate.py → validate: OK · test-all-examples.py --only 46-cpp-toolbox → 1 passed
  • Authored via lgtm-relay (Opus plan → Sonnet execute → Opus validate: 12/12 MET, verdict SHIP).

Deterministic C++23 toolbox binary + toolchain artifacts. Hard gates:
GCC/clang byte-identical report parity, UBSan signed-overflow catch, gdb
Digest pretty-printer. Gated-if-present: clang-tidy
(performance-unnecessary-value-param), clang-format, Conan 2 with committed
lockfile (isolated sub-target). ccache/mold shown-not-gated (absent on host).
CMake presets in depth, Conan 2 lockfiles, GCC-vs-clang byte parity, gdb
pretty-printers, clang-tidy/clang-format, UBSan recipe; ccache/mold shown
(absent on host). Relay-authored, Phase-3 SHIP (12/12), verify PASS 20/0.
@patterncatalyst
patterncatalyst merged commit 095dee1 into main Aug 2, 2026
2 checks passed
@patterncatalyst
patterncatalyst deleted the docs/r15-cpp-toolbox branch August 2, 2026 19:35
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