feat(rewards): enforce bounded repo-level emission shares#1240
Draft
Desel72 wants to merge 1 commit into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
weighttoemission_sharewhile keeping a compatibility alias for existing callers.issue_discovery_sharewith same-repo PR/issue spill behavior: an active side receives the full repo slice, while fully inactive repo slices and registry slack recycle to UID 0.OSS_EMISSION_SHARE = 0.90andISSUES_TREASURY_EMISSION_SHARE = 0.10; removes the fixed recycle baseline.Related Issues
Fixes #1215
Clean History Note
This is a clean-history resubmission of #1236 after the maintainer flagged the preserved rebase author date. The branch was recreated from latest
upstream/testand committed once as a fresh commit with matching author and commit timestamps.Deliverable Coverage
emission_shareloads as a bounded[0, 1]repo allocation with registry sum<= 1.0.weighttoemission_share;entrius/oc-1opts out of issue discovery withissue_discovery_share = 0.0.RECYCLE_UID.issue_discovery_share = 0.0, full inactivity recycling, and registry slack recycling.Type of Change
Testing
Validation:
uv run pytest tests/validator/test_emission_share_allocation.py tests/validator/test_load_weights.py tests/validator/oss_contributions/mirror/test_scored_pr.py tests/validator/oss_contributions/mirror/test_scoring.py -q(133 passed)uv run pytest tests/ -q(737 passed)uv run pre-commit run --all-files --show-diff-on-failureSKIP=pytest uv run pre-commit run --all-files --hook-stage pre-pushChecklist
Notes
Recycle now receives only unclaimed repo slices and registry-level slack; it is no longer a fixed baseline. Round-level rewards remain bounded by the 90% scoring pool plus the 10% treasury allocation.