I'm curious to see how this works. There's no way China will let anyone in without a visa. The flight to SIN would also be leaving from the international side of E so I don't think the OP would need to clear immigration. I'm happy to be corrected on this because it's interesting how this might work. I'd be even more interested to see how the luggage does getting off of UA, onto CA, then onto SQ (I assume) going to Bali without re-checking.