I don't think the bone in the lower part of the upper arm ought to be influencing the lat area on the torso. Doing so causes a abnormal bulge when the arm is abducted upward and causes the lat area to cave in when the arm is lowered.
After removing that influence it looks a lot better:
(subsurf fixes that straight corner segment nicely)
Trimming back the influence of the upper bone in the upper arm improves it further:
Now that I'm getting more familiar with Blender's Python API I think that I could generate a list of the changed vertices and their new values.