Skip to content

feat(scoring): reconcile linked-issue multipliers with solved_by_pr truth #91

Description

@JSONbored

Parent roadmap: #82

Background

Linked issue assumptions only matter if they match upstream mirror truth. Gittensory should not over-credit invalid issue links or confuse raw issue references with solved-by-PR evidence.

Goal

Model linked-issue multiplier eligibility using solved-by-PR truth when available.

Current Behavior

Current preflight can detect linked issues, but may not fully distinguish raw links, solved issue state, and valid solved-by-PR linkage.

Desired Behavior

Private previews show whether linked issue context is raw, plausible, validated, invalid, or unavailable.

Implementation Requirements

  • Extend issue quality/linkage records with solved-by-PR state.
  • Feed linkage validity into score preview scenarios.
  • Preserve raw linked issue hygiene guidance for public packets.
  • Use official/mirror data before GitHub cache where available.

Public/Private Output Boundaries

Private MCP/API can include multiplier reasoning. Public comments/packets can say linked issue context is missing or unclear, but must not mention score multipliers or reward impact.

Acceptance Criteria

  • Raw link without solved-by-PR does not receive validated multiplier status.
  • Valid solved-by-PR link receives validated status.
  • Unavailable mirror data produces a caution.
  • Public output stays sanitized.

Testing Requirements

  • npm run test:ci must pass.
  • Global coverage must remain at or above 97% for lines, statements, functions, and branches.
  • Aim for 98%+ branch coverage locally to avoid CI variance.
  • Add tests for every new branch, fallback path, sanitizer rule, and regression.
  • Add invariant/property-style tests when behavior depends on sorting, gating, scoring, queue pressure, source-upload safety, public/private boundaries, or upstream drift.
  • Public GitHub output must be tested against forbidden language: wallet, hotkey, raw trust score, payout, reward estimate, farming, private reviewability, and public score estimate.
  • MCP/local tooling must prove source contents are not uploaded.

Additional Test Scenarios

  • Valid solved issue fixture.
  • Raw-only linked issue fixture.
  • Closed-not-solved fixture.
  • Mirror unavailable fallback.
  • Public forbidden-language regression.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions