Recentf cleanup logs a lot of error messages

What happened?

Everytime recentf cleanup happens, in addition to the usual

Cleaning up the recentf list...

I also see a lot of messages of the form

Wrong type argument: "Wrong type argument", "tramp-file-name FILENAME"

I think it started happening quite recently.

What did you expect to happen?

Recentf cleanup to happen without errors.

Attempt to diagnose

I think the problem is with doom--recentf-file-truename-fn specifically with the use of tramp-file-name-localname in it. I think it should instead be tramp-file-local-name or file-local-name.

I can confirm the same behavior here, with

GNU Emacs     v28.1            nil
Doom core     v3.0.0-pre       HEAD -> master, origin/master, origin/HEAD 9d4d5b75 2022-10-31 16:18:16 +0100
Doom modules  v22.10.0-pre     HEAD -> master, origin/master, origin/HEAD 9d4d5b75 2022-10-31 16:18:16 +0100