[webui,api] move the rdiff function from webui

to api to avoid duplicatin a rather huge function
[api] comments don't use sources
[ci] make the publisher problem easier to debug by testing it alone