A ringbuffer filetype. Similar to a named pipe file (see: fifo(7)[^1]), but without consuming the contents on read and automatically rotating out the oldest lines.
Of course, there would be some complexities around handling read position as lines are being rotated out from under you.