Skip to content

test(miner-plan): dedicated branch coverage for the feasibility-gate composer #2313

Description

@JSONbored

Once buildFeasibilityVerdict (from the feasibility-gate composer issue) lands, it needs its own focused test file rather than incidental coverage — this repo's Codecov gate demands 97% patch coverage, branch-counted, and a pure composer with several discriminant inputs is exactly the kind of function that silently drops a branch (e.g. the ??/|| combining rule for two avoid-triggering signals firing at once) without dedicated tests. This is a small, purely mechanical, zero-risk test-authoring task — good for a first contribution.

Deliverables

  • test/unit/feasibility-gate-branches.test.ts exercising every claimStatus × duplicateClusterRisk × issue status combination that the composer's logic actually branches on (read the implementation first, don't guess)
  • Explicit test for TWO simultaneous avoid-triggering signals (verifies the combining rule doesn't silently drop one)
  • Explicit test for the all-"nothing wrong" happy path resolving to go
  • Reuse existing record builders/fixtures from test/unit/signals-coverage.test.ts where the input types overlap, rather than re-authoring fixture objects from scratch
  • Confirm via npm run test:coverage (unsharded, per this repo's contributing guide) that the new file closes any branch gap

References

  • test/unit/signals-coverage.test.ts (existing fixture/record-builder patterns to reuse)
  • The feasibility.ts module from the companion feasibility-gate-composer issue (depends on it landing first)

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:bugGittensor-scored bug fix — scores a 0.05x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions