Conversation
|
CI is green, but I am not merging this without your look. It changes the totals every bylaw pays (the delay penalty goes 1/1/2/3/4 → 0/1/1/2/3 on Assigning to @yegor256. Generated by Claude Code |
|
CI is green and the reasoning holds, but this changes what contributors are actually paid, so I would rather not merge it unreviewed. Two things a human should sign off on:
Both look correct to me; neither is something I want to decide on your behalf. Assigning to @yegor256. Generated by Claude Code |
|
The apportioning approach here makes sense to me, but it's conflicting with master now, so it needs a rebase. Requesting a review too given it touches how every bill is totaled. Generated by Claude Code |
e25d7f5 to
d5a6ef3
Compare
Fixes #779.
Bill#pointsrounded every line on its own and then added them up, so a bylaw with a fractional rate paid something other than its own text promises, once per clause.resolved-bug-was-rewardedsays "deduct 0.5 points for each day of delay", and a one-day delay cost a whole point, while one day and two days cost exactly the same.Float#roundrounds half away from zero, so the bias was always against the contributor.The total is now the rounded sum instead of the sum of rounded parts.
That alone would have broken the invariant
test_lines_add_up_to_the_totalpins, so the per-line figures are apportioned: each line is rounded on its own, and the difference against the total goes to the lines with the largest remainders. The numbers in the greeting still add up to the number in front of them, and a clause that ends up worth nothing is no longer listed, which also takes away the+0that used to be printed for a negative clause.One more thing the issue names: a
${...}variable holding a float was interpolated raw, so the greeting carried sixteen digits of0.9791666666666666. It is now formatted to two decimals when it is not whole.For
anger 1, love 2, paranoia 4the delay penalty goes from 1/1/2/3/4 points at 1/2/3/5/7 days to 0/1/1/2/3, which is what "0.5 per day" adds up to.Four tests, all failing on master.