Skip to content

feat(rewards): allocate OSS emissions by repository emission share#1219

Closed
volcano303 wants to merge 1 commit into
entrius:testfrom
volcano303:feat/issue-1215-emission-share
Closed

feat(rewards): allocate OSS emissions by repository emission share#1219
volcano303 wants to merge 1 commit into
entrius:testfrom
volcano303:feat/issue-1215-emission-share

Conversation

@volcano303
Copy link
Copy Markdown

Summary

  • Convert repository allocation from per-PR weight multiplier semantics to bounded repo-level emission_share allocation semantics.
  • Add issue_discovery_share per repository and apply within-repo PR/issue sub-slice spill logic.
  • Collapse top-level emissions to scoring pool + treasury (OSS_EMISSION_SHARE = 0.90, ISSUES_TREASURY_EMISSION_SHARE = 0.10) and route slack to recycle via allocation-time logic.
  • Neutralize per-PR repo multipliers in OSS and issue-discovery scoring paths (repo_weight_multiplier / discovery_repo_weight_multiplier set to 1.0 in scoring).
  • Add load-time validation and tests for share bounds and sum invariants, plus allocation behavior tests for spill and recycle routing.
  • Migrate master_repositories.json to emission_share and issue_discovery_share fields.

Related Issues

Closes #1215

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other (describe below)

Testing

  • Tests added/updated
  • Manually tested

Commands run:

uv run pytest tests/validator/test_load_weights.py tests/validator/test_emission_allocation.py tests/validator/oss_contributions/mirror/test_scored_pr.py tests/validator/oss_contributions/mirror/test_scoring.py tests/cli/test_miner_score.py -q
uv run ruff check gittensor/validator/utils/load_weights.py gittensor/validator/forward.py tests/validator/test_load_weights.py tests/validator/test_emission_allocation.py
uv run ruff format --check gittensor/validator/utils/load_weights.py gittensor/validator/forward.py tests/validator/test_load_weights.py tests/validator/test_emission_allocation.py

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Changes are documented (if applicable)

Recycle Behavior Note

This changes recycle from a fixed baseline (RECYCLE_EMISSION_SHARE) to derived slack behavior:

  • Registry-level slack: if sum(emission_share) < 1.0, shortfall is routed to recycle.
  • Repo-level inactivity: if both PR and issue-discovery sides are inactive/non-scoring for a repo, its repo slice is routed to recycle.
  • If registry sums to 1.0 and all repos are active on at least one side, recycle receives 0 from the scoring pool path.

@xiao-xiao-mao xiao-xiao-mao Bot added the enhancement New feature or request label May 12, 2026
@anderdc
Copy link
Copy Markdown
Collaborator

anderdc commented May 13, 2026

Not advancing for #1215 review. Closing.

@anderdc anderdc closed this May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Convert per-repo weight from unbounded multiplier to emission_share (bounded pool slice)

2 participants