Skip to content

feat(cpp): enforce bounded Clang static analysis - #1369

Merged
0x4007 merged 6 commits into
developmentfrom
codex/contract-v1-gedc0b659ea
Nov 13, 2026
Merged

0x4007 merged 6 commits into
developmentfrom
codex/contract-v1-gedc0b659ea

Conversation

@0x4007

@0x4007 0x4007 commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Adds bounded Clang 14 static analysis to the existing C++ pilot without changing runtime C++ source. It preserves the selected core/C++/move checks and adds exactly clang-analyzer-unix.Malloc and clang-analyzer-unix.MismatchedDeallocator, following the one completed GPT Pro recommendation. The prerequisite metadata/recovery-rule repair shipped in gpt-pro-skill PR24, with59 local tests; no extra research submission was used.

Normal Pi complete and an always-run CMake target enforce all13 real TUs. Three opt-in analysis-only control TUs never execute undefined behavior; eleven wrapper tests cover missing/foreign inputs, unsupported checks, frontend/profile/report/process failures and exception mutation boundaries. Exact checker catalogs, compilation coverage and fresh per-TU profiles are required. Emitted YAML uses the pinned Bun built-in parser. No new analyzer dependency, SDK installation, root Bun gate or hosted job is added.

The original complete scan FAILED on four pinned Boost.Beast/Asio yield-reentry false positives (233.814s capture;568,934,400B group peak). That receipt remains failed. A reduced actual-Asio static probe identified the path-sensitivity issue; genuine first-party same-invocation misuse remained fatal. Classification is restricted to those four exact checker/path/location/message/note/count fingerprints and pinned tool/frontend/header/policy hashes. Raw child exit1, diagnostics and profiles remain visible; there is no broad vendor/checker suppression or zero-warning claim.

Final independent qualification on 959bc0c643b0a1611313087665a964988358e37e, tree 9d7eade3059069f242eec7bd9c7816995c01361b, passed all13 source profiles with classified:4, new:0, missing:0, unclassified_exit:0; all3 real controls/seven expected dirty diagnostic records and11 wrapper tests passed. Native ASan/UBSan/leak checkpoint and all6 CTests passed. Captures were20.538s controls,219.879s scan,143.953s checkpoint and26.789s CTest; workload clock/resources and exact receipt IDs are documented in cpp/docs/static-analysis.md. Scan peak565,817,344B; native build peak1,068,220,416B under actual1GiB cap, with0memory.max/OOM/swap events. The near-cap build is not uncapped demand; ending free2,673,020,928B remained above2GiB.

Clang14 does not prove absence of shared-pointer cycles, POSIX-FD/resource leaks, deferred coroutine use-after-free or every cancellation path. Existing dynamic tests remain complementary. Earlier local review of draft6a timed out without a terminal verdict or ingested findings and remains non-gating. No workflow dispatch/rerun/enable, provider generation, production operation or new model call is part of this delivery.

@ubiquity-os

ubiquity-os Bot commented Nov 13, 2026

Copy link
Copy Markdown

Important

Ownership check: this pull request is left open.

@ubiquity-os

ubiquity-os Bot commented Nov 13, 2026

Copy link
Copy Markdown

Important

Ownership check: this pull request is left open.

@0x4007
0x4007 marked this pull request as ready for review November 13, 2026 16:02
@0x4007
0x4007 merged commit 002fe15 into development Nov 13, 2026
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