If I try it now, it doesn't seem to truncate the buffer as expected: for example
emacs -Q
M-: (add-to-list 'comint-output-filter-functions 'comint-truncate-buffer)
M-x term
C-c M-x set-variable comint-buffer-maximum-size 256 ; do this after M-x term because before comint-buffer-maximum-size is not defined
$ seq 1 1024
The entire output is retained, and not truncated. Truncation seems to happen at 2048 lines. This does not even correspond to the original value of the variable (1024).
However, I cannot detect any truncation at the bottom of the output.
If I run C-c M-x comint-truncate-buffer, the buffer is truncated as expected, to 256 lines.