Skip to content

natscallout: answer's error path is covered only on some runs, so unit coverage flakes below 100% #1973

Backlog

Description

@retr0h

CI unit shard 1 on #1943 (which does not touch internal/natscallout) reported internal/natscallout/natscallout.go:179 answer at 66.7%, and total coverage 99.9%, below the 100% gate: https://github.com/osapi-io/osapi/actions/runs/47616686437/job/145978381115

The error branch of answer (Reply fails, warn, return) is reached only when a test's timing makes it run. Give it a deterministic test row that makes Reply fail, so the coverage of that branch does not depend on timing.

🤖 Generated with Claude Code

Activity

  1. added
    bug
    side-finding
    on Dec 6, 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

    bugside-finding

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions