Ratchet seems to be off-by-one

A couple times recently I’ve tried to ratchet a do-more goal to zero, and I instead ended up with a safebuf of one.

In both cases I’ve fixed it using the graph editor.

(I called it an off-by-one error but I haven’t actually tried confirming that by ratcheting to a different amount)

2 Likes

Hmm, that sounds odd. I’ve tested and there’s definitely no widespread “off by one” issue; it’s working as expected for me.

I wonder – is it possible you had breaks scheduled in the graph? You can’t remove breaks fully in a single ratchet.

1 Like

I saw something similar. I used ratchet for a do less goal. When I put 0.7 it left 0.6 units only. If the beeminder team needs more details, let me know!

1 Like

I didn’t have any breaks in the future, no.

One possibly-relevant detail is that my deadline is after midnight.

This sounds like it could be a floating-point issue. (Compare How does a goal with a rate of 1 have +2 due?)

2 Likes

is it possible you had breaks scheduled in the graph? You can’t remove breaks fully in a single ratchet

Ah maybe this is it? I just did this on a goal that had derailed yesterday, so it was at safebuf=7 due to a flat spot.

I ratcheted to 0 once, and got to safebuf=1; then I clicked it again and got to safebuf=0.

So a bit of an edge case, but still surprising, and I can’t think of why it would need to work that way.

The reason you can’t remove breaks in a single ratchet is so that people can ratchet their goals without removing breaks, e.g. close to a planned break, but wanting it to be due the day before that break. For that reason, buffer is split into two types for these purposes: vertical buffer (how far you are above the line) and horizontal buffer. The first ratchet thus gets rid of vertical buffer, and a second is required to get rid of horizontal buffer. That protects any deliberately set breaks, while allowing ratcheting.

You can read about why that was implemented in more detail on the blog.

I would expect that respite would be probably ratchetable in one go since it would only have horizontal buffer, unless you’ve also added data that changed your vertical buffer before ratcheting. Without looking at the goal, it’s hard to say.

1 Like

Well now at least I find it less surprising because you’ve helped me understand why it’s complicated and subtle :joy:

Haha, it’s useful to hear it sounded weird, because it’s always possible to make things clearer! We briefly mention it in the help docs, but only very briefly. Perhaps I can add a section there, or at least add a link to the blog post.

Arguably the most egregious aspect is that the UI explicitly says “New number of safe days” and “If you want today to be a beemergency, for example, enter 0.”, which are basically false.

I did have to go and check this, but that’s not actually what it says when that restriction applies. When there’s an issue with ratcheting a flat spot, here’s what it shows instead:

It links to the mentioned blog post. Do you think there’s a way we could make that clearer, from your point of view? It doesn’t look like it says anything false to me, except in that you can select zero and only once you hit “ratchet” will we check whether we can do it. I’d perhaps like it to say “you may not be able to remove all your buffer in one go” up front, at least.

Once you’ve hit the ratchet button, we do then pop up a blue banner at the top explaining what happened and telling you to ratchet again, if we weren’t able to ratchet all the way.

For comparison, here’s what it usually says:

1 Like

I was about to take your word for it since my goal isn’t in the same state anymore, but fortunately for this conversation I derailed on two goals yesterday, so I actually have another one I can use for comparison (caveat: this one has respite=3 instead of the usual 7).

Anyhow, for some reason mine does not say what yours does, though it does acknowledge the flat spot:

1 Like

Ah, that’s a third, different state, where the break has already begun (and probably also doesn’t have vertical buffer and/or the vertical buffer doesn’t matter). The one I showed was not yet on the flat spot, but had it upcoming.

As you see, your screenshot also doesn’t say “if you want today to be a beemergency, for example, enter 0”.

I would expect that that one could be ratcheted in one step – though, again, it’s difficult to be sure without seeing the goal. :sweat_smile:

That’s as far as I can really go though without seeing each graph, so if you’d like to report it so we can dig in and be sure there’s no bug, you can email support@beeminder.com with the details as always. We’d need the links to each separate goal (and in case it’s not me who answers, since it’s 9pm here and I’m not supposed to be working, linking to this thread might be helpful to give context).

1 Like

Just sent.

1 Like