Skip to content

measure_conditions refuses a package with no condition, so a whole-tree run fails on cmd/internal/fileheader #1667

Closed

Description

@jmrplens

The whole-tree measurements dispatched on 31 October on main at 1ef08b1 (conditions.yml with tree=true, runs 41178598744 in branch mode and 41178600207 in condition mode) each failed on one shard, tree 15 of 20. ./cmd/internal/fileheader, added in #1562, has no condition at all, so gobco reports Branch coverage: 0/0. The script refuses a 0/0 report ("the report above measured no condition ..., which is what gobco prints when no test wrote its counts or when it declined to instrument every file"), and the shard and the run end red. The other 306 packages were measured, and the summary job still wrote both totals: 51919 of 51946 outcomes in branch mode and 62191 of 62246 in condition mode.

The guard is right to refuse a report it cannot tell from a failed instrumentation. But a package whose files hold no if, for, switch, && or || gives the same report legitimately, and the tree will keep gaining such packages.

What to change: let cmd/measure_conditions tell the two cases apart before refusing, for example by counting the conditions the package's own non-test files hold, the way gobco counts them, and recording a package with none as measured with nothing to measure (0 of 0) rather than as not measured. Then the whole-tree runs pass, and the summary counts 307 of 307 packages.

Activity

  1. added this to the 3.5.0 milestone on Oct 31, 2026
  2. added
    toolingThe audit and generator commands under cmd/, and the Makefile targets that run them
    on Oct 31, 2026
  3. added a commit that references this issue on Nov 4, 2026
    9abdaf5
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

    toolingThe audit and generator commands under cmd/, and the Makefile targets that run themv3.5.0Targeted at the 3.5.0 release

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions