It seems that the procedure to repair has a check to see if there is a limited amount of resources. Then, in a function to conserve those limited resources, the stack is decremented in a way to prevent using up the entire stack.
Then, the repair is done. However, as the OP points out, the degree of repair does not appear to match the ratio of materials consumed.
I will play around with this, and see if I can test with something like repairs on a basic steel pick. Testing with proper controls should showcase just how significant this is.