Skip to content

Validate bonus configuration limits - #104

Merged
Babak (babaknaderi) merged 3 commits into
masterfrom
fix/bonus-validation-clean
Oct 23, 2026
Merged

Babak (babaknaderi) merged 3 commits into
masterfrom
fix/bonus-validation-clean

Conversation

@babaknaderi

Copy link
Copy Markdown
Contributor

Warn when bonus thresholds fall outside the recommended range or cannot be reached because of study and worker HIT limits.

Warn when bonus thresholds fall outside the recommended range or cannot be reached because of study and worker HIT limits.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The validator raises KeyError when a previously optional worker HIT limit is omitted, preventing study generation.

1 open issue
What changed in this PR

This PR adds bonus-setting warnings to study generation, checking recommended thresholds and whether study or worker HIT limits make the quantity bonus unreachable.

Changes:

  • Extracts bonus validation into a reusable warning helper.
  • Reports inconsistent HIT limits and unreachable bonus thresholds.
  • Adds parameterized warning tests and updates an existing test configuration.
File Description
tests/​test_master_script.py Adds warning cases and supplies a worker HIT limit in an existing fixture.
src/​master_script.py Adds bonus-setting validation and prints its warnings during study generation.

Review effort: Balanced

Comment thread src/master_script.py Outdated
Apply the existing method-specific worker HIT defaults when validating bonus settings, avoiding failures for configurations that omit the optional limit.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

ACR validation uses a higher default worker limit than result analysis, allowing unreachable bonuses to pass without warnings.

1 open issue
1 resolved since last review

Review effort: Balanced

Comment thread src/master_script.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@babaknaderi
Babak (babaknaderi) merged commit 3fdd95e into master Oct 23, 2026
7 checks passed
@babaknaderi
Babak (babaknaderi) deleted the fix/bonus-validation-clean branch October 23, 2026 21:25
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.

3 participants