Skip to content

Fix #1015: round award totals after summing - #1018

Merged
yegor256 merged 1 commit into
zerocracy:masterfrom
gemshrine:fix/1015-issue
Sep 26, 2026
Merged

yegor256 merged 1 commit into
zerocracy:masterfrom
gemshrine:fix/1015-issue

Conversation

@gemshrine

Copy link
Copy Markdown
Contributor

Fixes #1015.

Award::Bill#points now sums raw line values and rounds the final total once, so fractional lines are not independently rounded and inflated. Added coverage for two half-point lines.

Copy link
Copy Markdown
Member

The fix itself looks right and CI is green, but I am holding off on merging for two reasons.

First, #793 ("#779: round the total once, not every line of the bill") is already open for the same defect and assigned for review, so one of the two should be closed before either lands.

Second, greeting still prints each line through whole(l[:v]), so after this change the printed line values can add up to something other than the printed total: two lines of 0.5 render as "+1 ...; +1 ..." with a total of "+1". That may well be the intended trade-off, but since this decides what contributors are actually paid, it deserves a deliberate call rather than a drive-by merge.

Assigning to @yegor256.


Generated by Claude Code

@yegor256 yegor256 self-assigned this Sep 21, 2026
@yegor256
yegor256 merged commit f1ed464 into zerocracy:master Sep 26, 2026
10 checks passed

Copy link
Copy Markdown
Member

Thanks for the fix, merged.


Generated by Claude Code

@0crat

0crat commented Sep 26, 2026

Copy link
Copy Markdown

@gemshrine Thanks for the contribution! You've earned +20 points: +24 as the base award, minus 4 points for contributing fewer than 30 hits-of-code (9 in this case), as per policy. Please keep them coming. Your running score is +6206; don't forget to check your Zerocracy account too.

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.

Award Bill rounds each line before summing, inflating fractional totals

3 participants