Skip to content

Cover the Message badge-variant arms and header repair paths #299

Open

Description

@codingjoe

services/email/message/models.py has 93% statement coverage (measured while validating #289). The uncovered lines are all pre-existing and all in the decode and repair family:

  • L173, L200: Message badge-variant match arms that no test drives.
  • L219-238, L265: header and body repair paths.
  • L368-370: a headers_from_raw path.
  • L628-629, L639: further repair branches.

When an incoming message is malformed, these branches run. A test can synthesize that input for free. These are also the branches where a silent regression is hardest to notice in production. The page still renders, only wrong.

Found while validating the slimming cut on #289:

side quest: Message badge-variant match arms and header repair paths (L173, L200, L219-238, L265, L368-370, L628-629, L639) are uncovered. Untouched by this pass. [services/email/message/models.py]

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

    side questOut-of-scope finding, deferred to its own issuetestCoverage, ghost and delulu branches

    Projects

    • Status
      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions