Skip to content

v12.0 — Code Quality Bar

Choose a tag to compare

@danmcleran danmcleran released this 08 Jun 19:02
· 177 commits to master since this release
cc40959

tinymind v12.0 sets a formal, enforced code-quality bar. Every push and pull request to master now runs a multi-gate static + dynamic analysis pipeline, and the bar is documented for contributors in the README and on the Pages site. Along the way the new gates caught and fixed several latent correctness bugs in the core library.

Code Quality Bar (headline)

A CI pipeline (.github/workflows/analysis.yml + codeql.yml) now gates every change. Blocking gates fail the merge; advisory gates surface findings as artifacts without blocking.

Gate Tool Status
Memory / UB sanitizers Clang ASan + UBSan over all runtime suites + int8 examples Blocking
Static analysis cppcheck (warning + portability), all headers Blocking
Coverage floor gcov + lcov, cpp/ line/function floors Blocking
Formal proofs CBMC over the fixed-point qformat saturation/rounding kernels Blocking
Fuzzing libFuzzer over int8 kernels, time-boxed, ASan+UBSan Blocking
Semantic code scan GitHub CodeQL (C/C++) Blocking
MISRA C:2012 cppcheck MISRA addon Advisory
Lint + Clang Static Analyzer clang-tidy (bugprone-*, cert-*, clang-analyzer-*, narrowing/init) Advisory
  • clang-tidy runs the Clang Static Analyzer in-process via its clang-analyzer-* checks — no separate scan-build pass needed.
  • The cppcheck hard gate was widened from lookupTables.cpp only to all headers.
  • Each gate ships with a make target that reproduces it locally (make sanitize, make cppcheck, make coverage && make coverage-check, make -C formal prove, make -C fuzz fuzz-ci, make misra, make tidy).
  • The bar is documented: a Quality Gates section in the README and a Code Quality section on the Pages landing page, both with live status badges.

Correctness fixes (surfaced by the new gates)

  • Eliminated undefined behavior across the core library flagged by ASan/UBSan (misalignment, out-of-bounds indexing, signed-shift UB).
  • int8 QLayerNorm: prevented int32 overflow in the gamma multiply.
  • WrapPolicy::saturate: value-initialize the result (was a uninitialized-read path).
  • CodeQL: fixed a wider-type comparison in the int8 QLayerNorm fuzz path.
  • KolmogorovArnoldNetwork: made non-copyable via = delete (owned-pointer copy hazard).
  • Fixed a no-return operator= and computed the perf_matrix checksum in unsigned arithmetic.
  • Added a libFuzzer harness for the int8 QLayerNorm kernel and CBMC proofs for the qformat fixed-point kernels.

Documentation & knowledge graph

  • Split the long-form architecture reference out of CLAUDE.md into docs/ARCHITECTURE.md.
  • Added a Knowledge Graph of the repository (graphify) with a Pages page and a maintenance guide; the graph is regenerated during the Pages build (community-aggregated view, not the full hairball) rather than tracked in git.
  • Recolored white-background diagrams to match the dark site theme.

Examples

  • Added decision-surface (predicted-vs-actual) plots to the XOR, KAN-XOR, and GRU-XOR examples, including a dense-trained KAN surface.

Full changelog: v11.0...v12.0