Skip to content

coverage: include/morph/offline is the library's worst subsystem at 85.20%, and one header inside it reads 57.04% #409

Description

@Yaraslaut

What is wrong

include/morph/offline is the worst-covered subsystem in the library, and one
file carries almost all of it.

Measured on master (Codecov API), include/morph by subsystem:

coverage hits/lines miss partial subsystem
85.20% 426/500 56 18 include/morph/offline
86.66% 13/15 2 0 include/morph/qt
94.37% 1158/1227 41 28 include/morph/forms
97.08% 2461/2535 22 52 include/morph/core
97.48% 774/794 2 18 include/morph/util
97.53% 198/203 2 3 include/morph/session
99.25% 266/268 1 1 include/morph/journal
100% 115/115 0 0 include/morph/detail
100% 59/59 0 0 include/morph/render
include/morph/netabsent from the report (morph#403)

Library total: 95.69% (5,470/5,716).

Within offline, one file accounts for the great majority of the gap:

include/morph/offline/sqlite_offline_queue.hpp   57.04%   52 misses, 12 partials

52 of the subsystem's 56 misses are in that single header.

The reason to read that number sceptically first

morph_offline_sqlite_tests is a dedicated test executable for exactly this
file, it is coverage-instrumented under AF_COVERAGE, and
scripts/coverage.sh never passes it to llvm-cov (morph#403). So 57.04%
is the coverage this file gets from morph_tests alone, with its own suite's
contribution discarded.

The honest first step is therefore to re-measure with morph#403 fixed, not to
start writing tests. Two outcomes, and they lead different places:

  • the number rises sharply — the gap was a reporting defect, and what remains is
    a smaller, real gap;
  • the number barely moves — morph_offline_sqlite_tests is thin, which is a
    worse finding than the percentage suggested and belongs in its own right.

What this is aiming at

The goal is include/morph at ≥ 99% lines. From 95.69%, that means closing
about 190 of the 246 currently-unhit lines. offline holds 74 of those 246,
the largest single share of any subsystem, so it is where the target is won or
lost.

Verification status: reproduced

Codecov API for LASTRADA-Software/morph, branch master
(/totals/?branch=master), aggregated per directory. Per-file figures from the
same response.

Not verified: the split between untested and unreachable within those 74
lines. codecov.yml documents a class of llvm-cov closing-brace artifacts that
inflate such counts, and offline's share of them is unknown.

What would close this

  1. include/morph/offline reaches ≥ 99% lines, measured after morph#403 —
    or, if it cannot, every remaining line is recorded as unreachable with its
    reason, in the form codecov.yml's existing artifact audits use.
  2. sqlite_offline_queue.hpp's figure is re-measured with
    morph_offline_sqlite_tests profiled, and both the before and after
    numbers are recorded
    , so it is visible how much of the gap was reporting
    and how much was tests.
  3. The subsystem carries a codecov.yml component with a target derived from
    its measured ceiling, so the result does not silently regress.

Blocked by morph#403.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions