Skip to content

fix(engine): computeMinerGoalLaneFit and computeLaneFit disagree on the "no preference configured" neutral score #8870

Description

@JSONbored

⚠️ Definition of Done: this issue must be completed in full, in a single PR. Do not split this
work across multiple PRs, and do not defer any Deliverable below to a follow-up issue. A PR that
satisfies only some of the Deliverables, stubs a required test, or leaves a checkbox
partially-done does NOT resolve this issue and will be closed.

Context

packages/loopover-engine/src/goal-model.ts's computeLaneFit (lines 116-120) explicitly documents the rule: no configured preference returns a fixed 0.5, "never 0 or 1." packages/loopover-engine/src/miner-goal-lane-fit.ts's computeMinerGoalLaneFit (lines 37-39), reached from the identical dispatcher (opportunity-metadata.ts:212) when an issue merely lacks candidatePaths metadata, returns 1 for the same conceptual "no preference" case -- an unexplained 2x scoring divergence feeding laneFit, which ranks candidate issues for autonomous targeting.

Requirements

Align the zero-preferredLabels/no-metadata branch in computeMinerGoalLaneFit to return 0.5, matching computeLaneFit's documented rule, and update test/miner-goal-lane-fit.test.ts:12 accordingly. If there is in fact a deliberate reason for the divergence, do not silently align the values -- instead add an explicit, cross-referenced comment in both files justifying why they differ. Default to alignment unless you find and document such a reason.

Deliverables

  • computeMinerGoalLaneFit's no-preference-configured branch returns 0.5, matching computeLaneFit, OR both functions carry an explicit cross-referenced comment justifying a real, deliberate divergence
  • test/miner-goal-lane-fit.test.ts:12 is updated to assert the corrected value

All of the above Deliverables are required in the same PR unless the deliverable text itself states otherwise.

Test Coverage Requirements

packages/loopover-engine/** -- 99%+ patch coverage, branch-counted, on the corrected/documented branch.

Expected Outcome

computeMinerGoalLaneFit and computeLaneFit agree on the neutral score for a candidate with no configured preference, removing an unexplained 2x scoring divergence in issue-ranking.

Links & Resources

  • packages/loopover-engine/src/goal-model.ts:116-120
  • packages/loopover-engine/src/miner-goal-lane-fit.ts:37-39
  • packages/loopover-engine/src/opportunity-metadata.ts:212
  • test/miner-goal-lane-fit.test.ts:12

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