An elegant, technical solution here would be nice.
What to Do
I have seen this happen, too. When the edit would have been helpful if it had been submitted earlier, I usually work around the problem by:
- Clicking Improve
- Replacing the edit with the source text from the current version (which is actually newer than the edit)
- Writing something in the edit summary to make clear what I have done (if I think it may not be clear)
- Keeping the "helpful" box checked
- Submitting the improvement
This recognizes the editors edit as valid, while immediately fixing the situation, which otherwise could get quite confusing. This method should only be used if the edit was good as applied to the version edited. If it is too minor, or has serious problems, it should simply be rejected.
Another, perfectly good way to deal with this is to reject the edit with a custom reject reason explaining the situation. It's unlikely any user will accumulate enough rejections this way to be edit-banned, and anyway edit-banning is only for a week.
- If one user does accumulate enough rejections this way to be unable to edit for a week, I'm not actually sure that's bad, because it would probably mean they're clicking edit, and then taking a very long time to apply a relatively minor edit, and not checking to see if has been rendered obsolete. However, I don't think anything like that is happening currently.
How to Identify Such Obsolete Edits
Of course, if you don't know what's going on, it's hard to respond well, which is central to your point and an excellent reason why the system should give us more help here. As things stand, there are a couple considerations to keep in mind:
- When anything seems strange, look into it. In this case, when an edit appears to be vandalism but very unusual vandalism, check the edit history (and comments and answers, though that wouldn't help in this specific instance).
- When editing reverses code formatting or unapplies hyperlinks, and the edit reason doesn't explain why, that's a clue that the edit was based on an earlier version of the post.
What the System Should Do
The system should notify reviewers when an edit appears to be based on a previous version.
In edge cases, this might require tough heuristics. But practically speaking, when an edit is based on a previous version, it's actually based on that version directly--that is, that's the version that was on the editor's screen when they clicked edit. So I don't think this would be difficult to implement.