I've been mulling this over a little more, and even more convinced that there's essentially no downside and it's a Good_Idea™.
Looking at this has me wondering if it would be better to actually completely eliminate the forum_id param (f) for viewtopic.php. It does seem rather redundant, although I could possibly be missing some killer feature that it enables (and isn't so amazing that everything seems basically ok when you call viewtopic.php with just a combination of t and p). Edit: Having thought about this point a bit more, I withdraw it — the forum ID does have some use in terms of logfile/traffic analysis, targetting adverts based on the URL, etc.
I'm also in two minds whether the canonical URLs should be presented fully qualified (http://…) or relative (./…). I think either is valid under the relevant RFCs and from what Google have posted about it.
It would, of course, be better to simply eliminate duplicates entirely, to the extent of issuing 301 redirects for any non-canonical URLs which are not sort results, but that would be much harder than an interim quick enhancement of adding canonical links. As long a there are situations where the sid can end up in the URL, the duplicate space remains infinite, so all that can really be done is to minimise it and mitigate the remaining cases with canonical links, I guess.
It also seems that, as per usual, there's another school of thought on the "correct" way to present the canonical URL - the
Content-Location HTTP response header. Google, Yahoo, and MS seem to be backing rel="canonical" for now, so it's clearly the more important one at present, but it probably couldn't hurt to generate both.
Just a bunch of thinking out loud on it, tbh. I'd welcome any counter viewpoints for why this is either not needed, not feasible, or causes some other issue.
Here's a nice example of duplicates making it into Google:
http://www.google.com/search?q=site:are ... K&filter=0
I deliberately chose an older topic to ensure that Googlebot has had plenty of time to digest it properly. I see 4 viewtopic URLs and 2 viewforum URLs there, where there ideally would be only one of each.
This topic has already been picked up twice (after only 4 days), once with "start=0", and once without:
http://www.google.com/search?q=site:are ... K&filter=0