Skip to content

🐔 fix(boost): Limit chicken runs for nerfed seasonal scoring#1984

Merged
mkmccarty merged 1 commit intomainfrom
mm-branch-1
Dec 24, 2025
Merged

🐔 fix(boost): Limit chicken runs for nerfed seasonal scoring#1984
mkmccarty merged 1 commit intomainfrom
mm-branch-1

Conversation

@mkmccarty
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings December 24, 2025 18:29
@mkmccarty mkmccarty merged commit 383685d into main Dec 24, 2025
14 checks passed
@mkmccarty mkmccarty deleted the mm-branch-1 branch December 24, 2025 18:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR attempts to limit chicken runs for contracts with nerfed seasonal scoring by changing how the chicken runs cap is calculated. However, the implementation introduces a critical bug.

Key Changes:

  • Modified the chicken runs calculation for nerfed seasonal scoring to use a hardcoded value of 20 instead of the previously calculated c.ChickenRuns value

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/boost/boost_import.go
c.ChickenRuns = int(min(20.0, math.Ceil((days*float64(c.MaxCoopSize))/2.0)))
if c.SeasonalScoring == ei.SeasonalScoringNerfed {
c.ChickenRuns = min(c.ChickenRuns, c.MaxCoopSize-1)
c.ChickenRuns = min(20, c.MaxCoopSize-1)
Copy link

Copilot AI Dec 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change introduces a bug by using the hardcoded value 20 instead of the calculated c.ChickenRuns value. When c.ChickenRuns is less than 20 (which can happen for shorter contracts based on line 225's calculation), this will incorrectly increase the chicken runs limit.

For example, if a 1-day contract with MaxCoopSize=10 calculates ChickenRuns=5 on line 225, the old code would correctly keep it at min(5, 9)=5, but the new code will incorrectly set it to min(20, 9)=9.

The original code min(c.ChickenRuns, c.MaxCoopSize-1) should be kept to ensure the calculated value from line 225 is preserved when it's already below the threshold.

Suggested change
c.ChickenRuns = min(20, c.MaxCoopSize-1)
c.ChickenRuns = min(c.ChickenRuns, c.MaxCoopSize-1)

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants