11

bug screenshot

This is the question and this is its revision history.

All I did in my edit, #3, is edit the first sentence. It seems obvious to me that my edits were combined with those that preceded it. I say "preceded" because as soon as I finished my edit, I saw an "edited" user whose edit is now no longer in the list of edits.

Is it wise to attribute someone else's edits to me?

What if their edits were incongruous to me?

What if their edits were awesome and they get no credit (forget reputation for the moment) and I get it all?


After reading ryanyuyu's answer, I have to amend my question (conversing about merging in the comments might be more confusing than merging itself).

The previous edit is no longer part of the history and I'm to blame for making edits I didn't make. Isn't that a bug? Wouldn't it have been better for my edit to be interposed so I could have an opportunity to review the previous edit and then complete my edit or toss it?

Alternatively, if edits are recorded in a manner that makes viewing less resource intensive, what if a rejected edit causes the edit history to be recalculated so that my edit would have been compared to the remaining prior edit?

0

4 Answers 4

7

A strategy other than merging edits (or rejecting less-substantiative in favor of substantiative) will ultimately depend on implementing some form of mutual exclusion, which is .. a major headache to contemplate for a case that doesn't really happen all that often. At some point a post will have to lock so revisions 'back up' against each other, so they can then be applied in sequence, which gets super messy, and doesn't automatically favor the beefier edit.

While one could argue the virtues of lock-free methods that would indeed be practical in this sort of setting, finding them is going to take a tremendous amount of work, and the bugs we encounter along the way are going to be crazy frustrating for everyone involved.

It's not optimal, I agree, but as you can see folks can see that you're not entirely 'to blame' :) It's just too rare to re-think from the ground up, which is what we'd need to do.

1
  • 2
    Could we do the inverse of what we are doing right now? Instead of showing the edit once it is approved, showing it immediately and editing that revision. Also, reviewing would approve/reject the last revision instead of the each one.
    – Braiam
    Sep 14, 2018 at 19:23
10

I think this is actually just a simple case where both you and another user tried to edit the same post at the same time. Basically a merge issue. Looking at the diff for your edit, it seems to mainly undo other improvements from the second edit in addition to your edit to improve the opening paragraph.

This is what probably happened:

  1. Both you and another user tried to edit the same post.
  2. The other edit was suggested before your suggestion. Normally, this results in an edit conflict that would not allow you to submit a second suggestion while the first one is pending. But in this case, I guess the other edit was approved even before you tried to submit your suggestion.
  3. You submitted your suggestion, which was based off revision 1, even though revision 2 was approved. This makes it look like you were trying to undo a bunch of the edits from revision 2 while also adding the sentence you were trying to.

Normally, this kind of conflict ends with the second edit suggestion being rejected (since it often undoes a lot of improvements from the first one). But in this case, the first suggestion wasn't great, and undoing its "improvements" actually looks ok which allowed your outdated suggestion to be approved.

2
  • 2
    "wasn't great" Does that mean a human intervened to resolve the merge conflict or does it mean an automaton (e.g., reputation-based) did it? In any case, shouldn't evidence of that act persist? Or would that expose something that too many people consider more confusing?
    – Jeff Holt
    Sep 14, 2018 at 15:54
  • The first suggestion added some bad formatting that wasn't great. When your edit came along and undid those "improvements" it seemed reasonable. That is, undoing the other edit did not make the post appear worse (for example by re-introducing spelling errors or going back to bad formatting).
    – ryanyuyu
    Sep 14, 2018 at 15:57
8

Like the other answers note, what happened here was almost certainly an edit conflict. Specifically, from the timeline of that question, we can reconstruct the following likely sequence of events:

  • 13:23:53 UTC: The OP posts the question.
  • Some time within the following two minutes: Both you and another user (whom I'll call User X here, because their identity is really not relevant) find the question, decide that it needs editing and click the edit button.
  • 13:26:11 UTC (= 2 minutes and 18 seconds after the question was asked): User X submits their edit suggestion, while you're still editing.
  • 13:26:46 UTC (= 35 seconds later): User X's edit suggestion is approved by the OP, while you're still editing.
  • 13:30:36 UTC (= 3 minutes and 50 seconds later): You submit your own edit suggestion, which naturally does not include the changes made by User X.
  • 13:33:00 UTC (= 2 minutes and 24 seconds later): Your edit suggestion is approved by the OP, effectively undoing User X's edit and replacing it with your version.

At this point, there are three versions of the question stored in the database, in this order:

  1. the OP's original version,
  2. the version edited by User X, and
  3. the version independently edited by you.

Since the revision history just shows the difference between consecutive versions, the resulting history view looks the same as if you'd deliberately undone User X's edits before making your own. But to anyone familiar with how the revision history works, the timestamps and the content of the edits make it pretty clear what actually happened.


Now, the natural followup question is whether this should have been possible.

Arguably, it shouldn't, and it would be technically quite easy to prevent this: just have the software record the timestamp and/or the internal ID of the version being edited in a hidden field on the edit form, and have it check that it's still the latest version when the edit is submitted. If it's not, show both versions to the editor and tell them to merge them by hand (or even offer some kind of an automatic merge option, like you get when merging changes in git / hg / svn / whatever). But unfortunately, the Stack Exchange software does not yet include such a feature.

It does, however, provide several other features that try to reduce the likelihood of such edit conflicts. In particular, I believe you should have seen a notice pop up above the edit box when User X's edit was accepted, stating that the question has been edited by someone else. Of course, there are several possible reasons (like spotty Internet connectivity) why that might not have worked as intended, or you might have simply missed the notification.

Also, if you had tried to start editing, or to submit your edit, after User X had submitted their edit suggestion but before it was approved, then I believe that you would have received an error saying that a post can only have one pending edit suggestion at a time. Of course, in this case, the time window between User X's edit being submitted and it being approved was only 35 seconds, so it all came and went while you were still happily making your own edits.


In any case, if you notice something like this happening, the best way to handle it is simply to look at both edited versions, see if there's a way to combine the best parts of each into something that's even better, and then submit that as an edit with a comment like "merging mine and User X's simultaneous edits to resolve edit conflict". Besides improving the post, that should also serve to clarify the situation for anyone looking at the revision history later.

3

I think the fact your edit got accepted is an issue - It makes two parts ambiguous when they originally weren't (using only "it works" and referring to "millisecond resolution") and lowers the English quality throughout (For example the bad usage of the word "below" and reversal of title by adding more words 'as a simplification'). It absolutely should have got a flat reject as "No Improvement Whatsoever".

However, what seems to have happened is that another user was actively editing at the same time as you. As the OP is a new user they have just accepted every suggestion and the system just shows a merged view when viewing edit history (as explained by Ilmari Karonen.

You do not have to worry though, most people who cared would look at the history and understand what has happened, so you would not be 'blamed' for anything, the most that would happen is a rollback

1
  • On the one hand, Joel's thoughts on software seem pretty clear in that more code needs to execute in the machine instead of people's heads. On the other hand, I like your answer because it convinces me that if my edit had been better and more complete, then the edit history would not be confusing and there would be less need of a complicated process to handle these rare (Tim says) events.
    – Jeff Holt
    Sep 17, 2018 at 14:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .