Skip to content

crm: ContactModel's and SavedViewModel's journaling paths are executed by no test, and rung 7 is below its own coverage target #412

Description

@Yaraslaut

What is wrong

Two crm models' journaling paths are executed by no test at all, and
codecov.yml already records it as an open finding rather than a closed one:

ContactModel::attachActionLog and SavedViewModel::attachActionLog are
called by no test at all (both headers score 0/4), so those two models'
journaling paths are entirely unverified -- while AccountModel, LeadModel,
OpportunityModel and QuoteModel each have an explicit "journals its edits
against the attached identity" test. That is the same shape of gap ledger's
own first measurement turned up (a documented obligation nothing executed),
and it is open, not closed.

Four of six crm models have the test; two do not.

Why this is a defect report and not a coverage chore

The identical gap in a sibling rung was a real, user-visible defect. From the
same file, on lims:

the audit trail's own classifier, whose VerifyResult branch was dead because
verifications were being journaled under an empty entity key. That second
one was a real defect, not a coverage artifact: a sample's audit trail
silently omitted the second pair of eyes.

An attachActionLog that nothing calls is exactly the state lims was in before
that was found. The claim "this model journals its edits" is currently supported
by no executed line in either model.

The second half: the component is below its own target

crm is at 87.67% on master against target: 89% in codecov.yml — below,
and green, because every status is informational: true (morph#402).

codecov.yml is candid that crm's entry is less worked-through than its
neighbours':

Unlike those two, this entry does NOT yet carry a per-miss audit establishing
which of the 148 uncovered lines are unreachable-by-design rather than merely
untested.

So crm has 148 uncovered lines, no audit of them, and a target it does not meet.

Verification status: reproduced

  • Codecov API, /components/?branch=master: crm → 87.67; codecov.yml on the
    same ref sets target: 89%.
  • The 0/4 finding and the 148-line figure are quoted from codecov.yml's own
    comments, written when the component was added.

Not verified: that ContactModel::attachActionLog and
SavedViewModel::attachActionLog are still uncalled. The quoted measurement
was taken when rung 7 entered the report and I did not re-run it. Confirming or
refuting that is step one, and a refutation means codecov.yml's comment needs
correcting — itself worth doing.

What would close this

  1. ContactModel and SavedViewModel each gain the "journals its edits against
    the attached identity" test its four sibling models already have, and each
    test fails without attachActionLog being called — proving the path is
    verified rather than merely reached.
  2. Whatever those tests turn up is reported. If either model journals under a
    wrong or empty key, as lims did, that is the finding and it is filed
    separately rather than quietly fixed inside this ticket.
  3. crm reaches its stated 89%, and the per-miss audit codecov.yml says is
    absent is written — each of the remaining uncovered lines classified as
    untested or unreachable-by-design, with reasons.

Not closable by calling attachActionLog from a test that asserts nothing
about what it wrote.

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

    area: ladderSubsystem: ladderbugSomething isn't workingtriage: validWell-framed; implement as written

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions