Skip to content

feat(config): add gate.readiness.minScore round-trip test hardening #2053

Description

@JSONbored

The gate.readiness.minScore config field (src/signals/focus-manifest.ts:426) parses and serializes but lacks explicit boundary/branch tests for the round-trip and the score-clamp arms. Add focused tests so the parse↔gateConfigToJson round-trip and out-of-range warnings are branch-covered. Pure test hardening, no behavior change.

Deliverables

  • Add unit tests exercising normalizeOptionalScore at the boundaries (min, max, out-of-range warn, non-number warn, null passthrough) for gate.readiness.minScore
  • Add a parse→gateConfigToJson→parse round-trip test asserting readiness.minScore survives unchanged (src/signals/focus-manifest.ts:479)
  • Assert the present flag flips correctly when only minScore is set
  • Ensure 100% branch coverage on the readiness score arms

References

  • src/signals/focus-manifest.ts:426 (readinessMinScore parse)
  • src/signals/focus-manifest.ts:479 (readiness serialization)
  • part of #1959 / #1681 (epic #1953)

Part of #1681.


size: XS · gittensor:bug

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