Skip to content

refactor: centralize and test score arithmetic - #370

Open
yanglluo wants to merge 4 commits into
interviewstreet:mainfrom
yanglluo:agent/deterministic-score-arithmetic
Open

refactor: centralize and test score arithmetic#370
yanglluo wants to merge 4 commits into
interviewstreet:mainfrom
yanglluo:agent/deterministic-score-arithmetic

Conversation

@yanglluo

Copy link
Copy Markdown

What changed

  • Extracted score arithmetic into a pure calculate_total_score helper.
  • Kept category caps, bonus points, deductions, and the overall maximum deterministic.
  • Added regression tests for category caps, deductions, and the total-cap branch.

Validation

python -m unittest -v test_scoring.py
Ran 3 tests — OK (including the total-cap branch)

python -m py_compile scoring.py test_scoring.py score.py
PASS

This is intentionally a small refactor: it improves testability without changing the scoring contract.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant