To be clear -- that was Eric Kay answering that SO article :) and there were references to chrome source code, so I think its trustworthy.

I'm looking into writing a JS solution of mapping chrome.runtime.id to appId, I'll try to give you something asap.