Thanks Jim and Eric for your replies.
In isolation, uniq prints the last instance of the duplicated line, and
uniq -u suppresses the output of the 4th line.
In isolation, -D says to
output the first three lines which are normally omitted because they
have duplicates, in addition to the 4th line that is printed by default.
So in combination, -Du says to print the lines with subsequent
duplicates (the first three lines) but to suppress the output line that
corresponds to the last input line that ends a sequence of duplicates
(the 4th line).
Perhaps we can document this behavior better. Or perhaps we can change
the behavior of -D (but at risk of breaking existing clients that depend
on the current behavior). But we can't change -u or -d behavior.
Put another way, per POSIX, the default behavior is subtractive (remove
any line with a subsequent duplicate), -d is subtractive (remove any
line with no duplicate), and -u is subtractive (remove any last line
that had a prior duplicate), and GNU -D is additive (print any line with
a subsequent duplicate, to counter the initial default).
At this point, I will claim that the behavior is intended, and therefore
close out the bug. But if you are willing to submit documentation
patches, or even code patches accompanied by extensive test cases to
demonstrate the corner cases of any new behavior, feel free to continue
to reply to this bug report.