Skip to content

Coverage follow-ups from #4591 #4593

Description

@snopoke

Follow-ups deliberately left out of #4591, which gave the repo a real coverage config and started reporting coverage on PRs. Project coverage now reads 85.21% (it read 94.41% when test files, factories and migrations were in the denominator).

1. Make the patch status block PRs

Both Codecov statuses are informational in codecov.yml. They were left that way because the baseline reset the moment #4591 merged, and nobody had seen what a real patch number looks like on an ordinary PR.

Once a week or two of PRs have reported, drop informational: true from the patch default so new code that lands untested fails the check. project can stay informational — it moves for reasons a PR author doesn't control.

Before flipping, sanity-check the 80% target and 5% threshold against what PRs have actually been scoring. A target the team routinely misses for legitimate reasons is worse than no gate.

2. Delete three unreferenced modules

Setting source means a module no test imports now reports at 0% instead of being dropped from the report. Three came back with no references anywhere in the repo — every symbol they define has exactly one hit, its own definition:

  • apps/api/helpers.py (get_user_from_request, get_team_from_request)
  • apps/service_providers/llm_service/adapters.py (BaseAdapter)
  • apps/files/utils.py (duplicate_files)

~105 lines. Worth a second pair of eyes on adapters.py in particular — the name suggests it was meant to be part of the LLM service path, so it may be an abandoned refactor rather than something that was always dead.

3. Revisit branch coverage on the Python 3.14 upgrade

Coverage runs line-only today. sys.monitoring can't measure branches before 3.14, so branch coverage currently means falling back to the C tracer: measured on a 205-test subset, line-only under sys.monitoring cost ~13% of runtime against ~37% for the C tracer with branches. On 3.14 that tradeoff goes away and branch coverage becomes close to free — flip branch = true in [tool.coverage.run] then.

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

    Type

    No type

    Fields

    Priority

    None yet

    Effort

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions