Skip to content

coverage: internal/fuse's floor has a 0.5-point margin on linux, and it flakes #438

Closed

Description

@scttfrdmn

What happened

Dependabot #426 (cargoship 0.18.0 → 0.23.0) failed the coverage job:

FAIL  internal/fuse — 71.8%, below its floor of 72%
coverage-gate: at least one package is below its floor

A rerun of the same commit passed with 72.5%. So it is a flake, not the bump — confirmed independently by the fact that internal/fuse does not import cargoship at all, directly or in test files, so the bump cannot change which of its lines execute.

Filing it anyway, because the flake is a property of the floor's margin rather than of that PR.

Why it flakes

main and the other four open Dependabot PRs all measure internal/fuse at exactly 72.5% on linux against a floor of 72. That is a 0.5-point margin — on a package where .coverage-floors:340-343 already records that two tests are load-dependent:

the second one is bounded with an explicit timeout because removing the arm makes the prefetch block on the read it was trimmed against rather than fetch too much — a parked prefetch worker, which no byte-count assertion can see

A timing-bounded test that does not reach its arm under load takes coverage with it. 71.8% vs 72.5% is 0.7 points, which is a handful of statements.

Also relevant, and already recorded in that file: the platform denominators differ. internal/fuse compiles unmount_path_linux.go (52 lines) on CI and unmount_path_darwin.go (44) locally, so darwin measures 72.2% for the same tree — confirmed again on a local run just now. The floor can therefore only be set from CI's own measurement, and the margin cannot be checked locally either.

Why this matters more than one red check

A gate that fails occasionally on unrelated PRs trains people to rerun a red job without reading it, which costs more than the gate is worth — the same argument .github/scripts/fuzz-smoke.sh makes for itself at :8-11. coverage is one of main's 19 required contexts, so each occurrence blocks a merge until someone notices and reruns.

Options

  1. Find and fix the load-dependent test. Identify which statements move between a 72.5% run and a 71.8% one — diffing two go tool cover profiles from the same commit would name them — and make the test deterministic. Best outcome: the floor keeps its meaning and the margin stops mattering.
  2. Raise the covered statements. The margin is thin because the number is 72.5, not because 72 is wrong. Points added anywhere in the package widen it.
  3. Lower the floor to 71. Cheapest and the wrong direction: it buys quiet by giving the package a point of permanent headroom, which is the hole this file's own notes argue against elsewhere.

Not proposing (3). Between (1) and (2), (1) fixes the cause.

Acceptance

  • Two runs of coverage on the same unchanged commit report the same internal/fuse percentage, or the difference is understood and named.
  • Any floor change is taken from CI's log, not a local run — internal/fuse is one of the two packages with a //go:build split, so a local number has a different denominator.

Activity

  1. added this to the Future Work milestone on Aug 14, 2026
  2. added
    type: bug
    priority: medium
    area: fuse
    area: tests
    area: ci-cd
    on Aug 14, 2026
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: ci-cdarea: fusearea: testspriority: mediumtype: bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions