carroll-ccsd
If the ruby source is set to create IDs up to 10 Trillion, wouldn't 60 Quadrillion be too much? 60,780,000,000,000,037
You're misreading that. Each shard gets up to 10 trillion IDs.
That means that the shard ID is multiplied by 10T to avoid conflicts and then the ID is added. If you're in shard 64, you would have 64*10T=640T. The example of Shards in the LTI Variable Substitutions uses 1234, to that would be 1234*10T=12Q 340T
According to Number.MAX_SAFE_INTEGER - JavaScript | MDN , you're safe up to about 9 quadrillion, so 60 quadrillion would experience the problem. The actual maximum safe number is 9,007,199,254,740,991.
Basically, a Canvas ID is a string made up of digits instead of letters. If your system can't handle it as a number, then you have to treat it like a string.
We're on shard 1 and so all of our long IDs are between 10T <= ID < 20T and they fit without worrying about data loss since they're less than 9 quadrillion. Like you, all of mine come through without the extra padding and the included shard. But you're correct that I should probably watch out more for people in other Shards. It's one of those things that you don't think about because it's not your experience. Experiences drive beliefs and my experience was that all the Canvas IDs are short. Others may have trouble running some of the things I've written because I try to coerce them into numbers because I would rather work with numbers that strings (occupational hazard).
A conversation related to the problems that happened when the length of the keys occurred can be found here: Increased length of surrogate keys .
I hope that's enough explanation -- I've got to go pick up my daughter right now and have to stop writing.