See https://awesomewm.org/apidoc/documentation/03-declarative-layout.md.html
vs.
https://awesomewm.org/doc/api/documentation/03-declarative-layout.md.html
Another problem I see is that the SVG are now full of base64 png images. As far as I recall, it was fully vector based until recently. This is a bit problematic for debugging since the old SVG + WebBrowser introspection mode was very useful to track the results.
Maybe we could revert these commit and think outside the box to solve the problem (ei, more fine grained APIs). The notification pull requests adds a commit to mitigate the border offset from the shape, just that is enough to make some instances of the problem go away (but it isn't enough, making the border mode user selectable will fix another class of issues).
Uhm. Seems to be a bug in cairo.
Reproducer in C: repro.c.txt
This does basically the same thing as the drawing code. Besides producing a SVG file, this also draws a PNG file. Theoretically, they should have the same content. Practically... (had to convert the SVG to PNG for GitHub and apparently Imagemagick picked a difference resolution for the image)

diff --git a/lib/wibox/widget/init.lua b/lib/wibox/widget/init.lua
index 4793206f1..36f2c5e1f 100644
--- a/lib/wibox/widget/init.lua
+++ b/lib/wibox/widget/init.lua
@@ -52,6 +52,7 @@ end
-- @tparam[opt={dpi=96}] table context The context information to give to the widget.
function widget.draw_to_svg_file(wdg, path, width, height, context)
local img = cairo.SvgSurface.create(path, width, height)
+ img:restrict_to_version(cairo.SvgVersion["1_2"])
local cr = cairo.Context(img)
widget.draw_to_cairo_context(wdg, cr, width, height, context)
img:finish()

Yay, the border works correctly again. -.-
Edit: I reported a bug to cairo: https://gitlab.freedesktop.org/cairo/cairo/issues/361
Most helpful comment
Yay, the border works correctly again. -.-
Edit: I reported a bug to cairo: https://gitlab.freedesktop.org/cairo/cairo/issues/361