Repository navigation
Commit e272a1b
fix(octopus): keep the current half hour out of the car-need gate
The surplus started at minutes_now, which usually falls mid-period, so the rest
of the current half hour lost its low rate once the car was full - even when
the car charged earlier in it, which makes Octopus bill the whole period cheap.
Surplus now starts at the next half-hour boundary. Clamping back to the start
of the current period instead would have marked elapsed minutes as surplus too,
and rate_add_io_slots() applies the skip to past minutes, misreporting today's
cost.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 1c3a836 commit e272a1b
2 files changed
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3819 | 3819 | | |
3820 | 3820 | | |
3821 | 3821 | | |
| 3822 | + | |
| 3823 | + | |
| 3824 | + | |
3822 | 3825 | | |
3823 | 3826 | | |
3824 | 3827 | | |
| |||
3828 | 3831 | | |
3829 | 3832 | | |
3830 | 3833 | | |
3831 | | - | |
| 3834 | + | |
3832 | 3835 | | |
3833 | 3836 | | |
3834 | 3837 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
97 | 106 | | |
98 | 107 | | |
99 | 108 | | |
| |||
0 commit comments