Skip to content

fix: Issue discovery Credits merged into Non-scoring Branches#131

Open
jonathanchang31 wants to merge 1 commit into
entrius:testfrom
jonathanchang31:fix/issue-discovery-credits-into-non-scoring
Open

fix: Issue discovery Credits merged into Non-scoring Branches#131
jonathanchang31 wants to merge 1 commit into
entrius:testfrom
jonathanchang31:fix/issue-discovery-credits-into-non-scoring

Conversation

@jonathanchang31
Copy link
Copy Markdown

Summary

Fixes issue-discovery branch-gate parity by exposing solving PR branch metadata in the miner issues API.
The inline solving_pr object now includes:

  • base_ref
  • head_ref
  • head_repo_full_name
  • default_branch

This lets gittensor apply the same merged-PR branch eligibility checks to issue discovery that it already applies to normal OSS PR scoring.

Related Issue

Fixes: #130

Change Type

  • Bug fix
  • API response shape enhancement
  • Scoring-integrity fix
  • New feature
  • Refactor
  • Documentation only
  • Test-only change
  • Breaking change

Real Behavior Proof

Seeded local Postgres with:

  • repo default branch: main
  • issue author: 111
  • solving PR author: 222
  • solving PR merged into: scratch-do-not-score
  • issue state: CLOSED
  • issue solved_by_pr: 7

Then queried:

curl -fsS \
  'http://127.0.0.1:6970/api/v1/miners/111/issues?since=2026-05-01T00:00:00.000Z'

Observed response proof:

{
  "issueCount": 1,
  "solvingPr": {
    "pr_number": 7,
    "base_ref": "scratch-do-not-score",
    "head_ref": "feature/solver",
    "head_repo_full_name": "codex-smoke/non-scoring-branch",
    "default_branch": "main"
  }
}

The mirror now exposes enough metadata for gittensor to identify the non-scoring branch case.

Checklist

  • Analyzed das-github-mirror miner issue API path
  • Analyzed connected gittensor issue-discovery and PR branch-gate logic
  • Verified issue [Bug] Issue Discovery Credits Issues Solved by PRs Merged Into Non-Scoring Branches #130 behavior and required metadata
  • Added base_ref to inline solving_pr
  • Added head_ref to inline solving_pr
  • Added head_repo_full_name to inline solving_pr
  • Added default_branch to inline solving_pr
  • Ran formatting check
  • Ran lint
  • Ran build
  • Ran local runtime smoke test
  • Verified API response includes the new fields
  • Ran relevant gittensor compatibility tests
  • Confirmed temporary smoke-test DB rows were cleaned up

@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Issue Discovery Credits Issues Solved by PRs Merged Into Non-Scoring Branches

1 participant