Skip to content

feat(signals): add bounty and opportunity stale-source reconciliation #112

Description

@JSONbored

Parent roadmap: #82

Background

Bounty/opportunity context can become stale, completed, cancelled, or ambiguous. Miners should not be guided toward dead work.

Goal

Reconcile bounty and opportunity sources with issue/PR state and feed stale-state warnings into opportunity ranking.

Current Behavior

Bounty lifecycle work exists as a direction, but source freshness and stale-opportunity reconciliation need stronger modeling.

Desired Behavior

MCP/API guidance distinguishes active, stale, completed, cancelled, ambiguous, and linked-PR bounty/opportunity states.

Implementation Requirements

  • Ingest or refresh bounty/opportunity source metadata.
  • Link issues and PRs where discoverable.
  • Mark stale/completed/cancelled/ambiguous states.
  • Feed state into issue quality and next-work ranking.
  • Avoid public score/reward language.

Public/Private Output Boundaries

Signal data can inform private API/MCP outputs. Public GitHub output must use only sanitized, maintainer-friendly summaries and must not expose private scoreability or contributor scoring internals.

Acceptance Criteria

  • Active context is distinguished from historical context.
  • Dead opportunities are not recommended as top work.
  • Ambiguous state produces caution.
  • Linked PR state is included when available.

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

  • Active fixture.
  • Completed fixture.
  • Cancelled fixture.
  • Stale fixture.
  • Linked PR fixture.
  • Public wording regression.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions