Skip to content

feat: Convert per-repo weight from unbounded multiplier to emission_share#1223

Closed
jonathanchang31 wants to merge 1 commit into
entrius:testfrom
jonathanchang31:feat/convert-per-repo-weight
Closed

feat: Convert per-repo weight from unbounded multiplier to emission_share#1223
jonathanchang31 wants to merge 1 commit into
entrius:testfrom
jonathanchang31:feat/convert-per-repo-weight

Conversation

@jonathanchang31
Copy link
Copy Markdown

Summary

This update changes repository allocation from per-PR weight multiplier to per-repo emission_share pool slicing.

  • RepositoryConfig.weightRepositoryConfig.emission_share ([0,1])
  • Added RepositoryConfig.issue_discovery_share ([0,1], default 0.5)
  • Enforced registry invariant: sum(emission_share) <= 1.0
  • Removed repo-weight factor from per-PR/per-issue multiplier chains
  • Moved allocation control to round aggregation (allocate-then-distribute)
  • Recycle now comes from:
    • unclaimed repo slices (repo inactive on both PR + issue sides)
    • registry slack (1 - sum(emission_share))
  • Top-level emissions collapsed to:
    • OSS_EMISSION_SHARE = 0.90
    • ISSUES_TREASURY_EMISSION_SHARE = 0.10
    • removed fixed RECYCLE_EMISSION_SHARE baseline

Related Issue

Closes: #1215

Change Type (select all)

  • Feature
  • Behavior change
  • Refactor
  • Config schema change
  • Validation/invariant hardening
  • Monetary policy update
  • Test coverage update
  • Breaking API change (external)
  • Security fix
  • Performance optimization only

Real Behavior Proof

Use these expected outcomes as acceptance checks:

  1. All repos active, sum(emission_share)=1.0

    • OSS scoring: 90%
    • Treasury: 10%
    • Recycle: 0%
  2. No activity on any repo, sum(emission_share)=1.0

    • OSS scoring: 0%
    • Treasury: 10%
    • Recycle: 90%
  3. All repos active, sum(emission_share)=0.8

    • OSS scoring: 72% (0.9 * 0.8)
    • Treasury: 10%
    • Recycle: 18% (registry slack)
  4. Repo with issue_discovery_share=0.3, PR active, issue inactive

    • Full repo slice stays in repo and spills to PR side
    • No recycle for that repo
  5. Repo has no eligible nonzero scorers on both sides

    • Entire repo slice goes to recycle in same round
    • No rollover, no redistribution to other repos

@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

Issue #1215 deliverables missed: D7 (SQL schema changes ship without a migration script), D11 (within-repo spill tested in only one direction; spec says 'vice versa'), D6 (no issue_discovery_share=0 short-circuit test). 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