Coverage: the headless harness and the eight gaps behind it #61

Open
opened 2026-08-02 18:34:51 -04:00 by tachikoma · 0 comments
Collaborator

Source: TODO.md, "Coverage status" and "Remaining work" (at bbb7b8f)

Line coverage 83.9%, function coverage 91.2% (2433/2901 lines, 176/193
functions), up from 79.6% / 87.2% before the 0.5.0 defect work and from a
39.6% / 44.3% baseline.

Regenerate with:

cmake -S . -B build-coverage -DAKGL_COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug
cmake --build build-coverage --parallel
ctest --test-dir build-coverage --output-on-failure

Reports land in build-coverage/coverage/. A coverage tree rebuilt after a source
edit fails coverage_reset with GCOV returncode was 5;
find build-coverage -name '*.gcda' -delete clears it.

Where the remaining 468 lines are:

File Lines Functions
src/assets.c 0/21 (0%) 0/1
src/game.c 142/243 (58%) 13/18
src/tilemap.c 276/444 (62%) 13/20
src/renderer.c 61/83 (74%) 8/8
src/registry.c 83/111 (75%) 12/13
src/actor.c 205/258 (80%) 16/18

Branch coverage reads 24.7% and should not be used as a target. The akerror
control-flow macros expand into large branch trees per call site, most of them
unreachable in normal operation -- src/game.c reports over 1700 branches across
230 lines. Track line and function coverage; treat branch coverage as a relative
signal within a file.

Mutation testing is the only thing that checks the macros, since they expand at
call sites. scripts/mutation_test.py, run when touching control flow, refcounting,
stack traces or handlers.

Files: tests/, CMakeLists.txt (AKGL_TEST_SUITES)

Items:


Filed by Tachikoma (Claude Code, Opus 5, 1M context)

**Source:** TODO.md, "Coverage status" and "Remaining work" (at bbb7b8f) **Line coverage 83.9%, function coverage 91.2%** (2433/2901 lines, 176/193 functions), up from 79.6% / 87.2% before the 0.5.0 defect work and from a 39.6% / 44.3% baseline. Regenerate with: ```sh cmake -S . -B build-coverage -DAKGL_COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug cmake --build build-coverage --parallel ctest --test-dir build-coverage --output-on-failure ``` Reports land in `build-coverage/coverage/`. A coverage tree rebuilt after a source edit fails `coverage_reset` with `GCOV returncode was 5`; `find build-coverage -name '*.gcda' -delete` clears it. Where the remaining 468 lines are: | File | Lines | Functions | |---|---|---| | `src/assets.c` | 0/21 (0%) | 0/1 | | `src/game.c` | 142/243 (58%) | 13/18 | | `src/tilemap.c` | 276/444 (62%) | 13/20 | | `src/renderer.c` | 61/83 (74%) | 8/8 | | `src/registry.c` | 83/111 (75%) | 12/13 | | `src/actor.c` | 205/258 (80%) | 16/18 | **Branch coverage reads 24.7% and should not be used as a target.** The akerror control-flow macros expand into large branch trees per call site, most of them unreachable in normal operation -- `src/game.c` reports over 1700 branches across 230 lines. Track line and function coverage; treat branch coverage as a relative signal within a file. **Mutation testing is the only thing that checks the macros**, since they expand at call sites. `scripts/mutation_test.py`, run when touching control flow, refcounting, stack traces or handlers. **Files:** `tests/`, `CMakeLists.txt` (`AKGL_TEST_SUITES`) **Items:** - [ ] #6 - [ ] #7 - [ ] #8 - [ ] #9 - [ ] #10 - [ ] #11 - [ ] #12 - [ ] #13 --- Filed by Tachikoma (Claude Code, Opus 5, 1M context)
tachikoma added this to the 0.9.x milestone 2026-08-02 18:34:51 -04:00
tachikoma added the test-coverageblast-radius:medium labels 2026-08-02 18:34:51 -04:00
tachikoma added the status::grooming label 2026-08-02 18:49:27 -04:00
Sign in to join this conversation.