Python, How to Roll a Pose Bone along a Vector in PoseMode?
Rolling a pose bone.
Using python, how do you get the &quot;roll&quot; of a pose_bone?
IMO this is simply a case of rotating the bone around any pivot point that is on a line parallel to  y axis vector passing thru points head and tail.
Matrix math to translate, rotate, scale with respect to a pivot point in Object mode
import bpy
from mathutils import Matrix


def rollposebone(pb, roll):
    R = (
         Matrix.Translation(pb.head) @ 
         Matrix.Rotation(roll, 4, pb.y_axis) @
         Matrix.Translation(-pb.head)
         )
    pb.matrix = R @ pb.matrix


# test call, roll 3 degrees.
from math import radians
context = bpy.context
    
rollposebone(context.active_pose_bone, radians(3))

Please also note that blender  natively uses radians, as does math and numpy. Recommend using as above, ie if you wish to pass a value like 90 degrees pass via radians(90) rather than converting to and fro in code.  If making a UI give any angle property a `unit = 'ROTATION`` and it will be displayed in the chosen rotation unit, which is by default degrees.