twoStoresOverOneMediumAreOneDevice

Two stores open over one medium at once — the app called the platform default twice, or two processes share a directory — are one device: one key between them, and neither store's grants lost to the other's write.

The first calls overlap through the gate, so both stores are inside DeviceKeyStore.deviceKey before either has made a key. A store whose stores each cached the medium would make two keys here, and the second store's grant write would drop the first's.