What is a good margin of error on the diagonals for a 5x10 foot, square wood foundation? I have about 1/2" discrepancy on the diagonals. (for a shed).
I would say it's a little more than what's normally considered OK, but it isn't going to make the shed collapse or anything like that. It's going to make for gaps in the corners, trim might not fit quite right, stuff like that, but probably not an issue for a home built shed.
I would weigh the aggravation of fixing it against the aggravation of working around it, and correct it if I could without major surgery.
Since it is only the floor that is out, re-square the walls and add a little shim to get the floor flush with the walls at the edges. No need to get into a whole lot of concern or head scratching.... I have had to work with concrete foundations that were way out, and re squaring the floor system give it the foot print needed to go on. The same for you with squaring the walls over your floor
Getting the foundation plates square (or rectangular as the case may be) is essential to getting a building to assemble correctly from start to finish. The first part of this is to get all the lengths on like sides cut exactly the same (even down to less than 1/32". The diagonals should be as close to exact as you can measure. Make sure to even take into account any droop in the tape measure as you measure across the base plate frame. The droop can easily add an extra 1/4" or more to the measurement. If you need to lay put extra material along the diagonals to keep a floppy tape measure straight then do so. When I build I strive for the diagonal measurements to be well less than 1/16" even if it means that I have to repeatedly reposition the frame.
When you go to frame the walls it is also essential that you get the top plates to be exactly the same length as the base plate. Careful use of a level to get the corner studs plumb is equally important. Make sure to add diagonal bracing to the stud assemblies to hold things square before you apply any sheathing to the walls.
When the top plates are installed make sure to once again check that the diagonal measurements are the same across the top of the structure. If you have done everything carefully the diagonals at the top of the plates should be the same as what you measured for the base plates. A handy hint is to write down the base diagonal measurement so that you can refer to it when measuring the top plates. When the tops are squared up you should temporarily tack up a few sheets of the sheathing on the walls. Then recheck the top plate diagonals before committing to nailing all the sheathing in place. Once the sheathing is in place it can be difficult to re-square the top of the walls.
I go into this in so much detail because if the top plates are not square you will end up with difficulty dealing with setting rafters and getting the roof sheathing to lay down nicely on the center lines of the rafters. Even an 1/8" of error in the top plate squareness can translate to much more error on the roof sheathing.