@Club Sandwich can CA cops legally force you to uncase (or retrieve from a locked trunk) a firearm to check if it's loaded?
yes and no.
yes in the limited circumstance that the locked container is in the passenger compartment in plain view (for example a locked hard case in the back seat that has magpul stickers or something on it) where it can be argued probable cause or something to search the vehicle. this isn't likely to be reasonable, but opening your glovebox to get your insurance and registration paperwork and your handgun is there is very likely to trigger an inspection demand as well as not to touch it - the officer will ask you to get out of the vehicle so he can retrieve your documents for officer safety.
for the sake of completeness, all firearms in CA must be transported unloaded and separated from ammunition. it is
handguns that specifically require a locked container alongside certain concealable weapons (the weapon on your concealed carry permit for example). shotguns and rifles are not required to be in a locked container during transport. this is CPSC 25400. transport through a school gun-free zone is specifically allowed as well as long as you do not stop in that zone during transport.
however in most circumstances, no - not if there isn't probable cause or a warrant or supervisory order from a court (for example if you're under a court order that abrogates your ability to possess a firearm your probation officer can conduct or request to be conducted a search and request you to unlock a locked container or provide a passcode or other minor assistance - not doing so can be probable cause in and of itself). pre-arrest questioning that results in suspicious answers or possibly incriminating behaviors should trigger a Mirandizing of the suspect for formal questioning so the arrest is clean however not all officers do this and it gets very hazy on how the court will deal with pre-arrest questioning that results in evidence collection of a felony - is the search that found the evidence based on actual good faith probable cause (behavioral cues, matching descriptions from a briefing, et c), admitted to by the detainee (so their own fault which will then generate probable cause for a search), or plain view?
while i can't comment on the example reddit post particular described situation, a vehicle stop can in some situations be probable cause for a search (for example dangerous or reckless driving or some other violation that isn't a moving violation). when the officer received the answer that prompted the inspection of the locked trunk (a legal way to transport weapon in CA is the trunk of a vehicle), and the guy volunteered that info, it can be probable cause that might stand up to scrutiny (as bullshit as it is, the officer is likely to claim that the guy volunteered the information and agreed to the search, and was then caught with the legally-defined assault weapon, which simple possession is a felony in CA).
if the person didn't volunteer that info, it's possible the officer would not have been interested in a vehicle search and if the officer had forced a vehicle search, a 4th Amendment argument is very possible as the pressure would be on the officer to establish probable cause for searching and obtaining that evidence.
amusingly, if he was transporting the legally defined assault weapon in a locked container (trunk) separated from ammunition and unloaded, he cannot be charged for illegal transport of a firearm - only the possession of it under CPSC 30605,
edit:
i also wanted to add that now that felony possession of a CA assault weapon is established it is likely that a warrant can be secured to search his home for additional weapons violations, plain view contraband, et c. he isn't a felon yet, but as per the "gun violence restraining orders" that have been signed into law over the years, CA LEO are authorized (and most of time specifically required) to confiscate and hold firearms from persons that fall into specific categories (the GVRO requires a signature from the court for execution) such as convictions of certain crimes, or under the "red flag" laws, before trial as well. it is also required that should the trial not occur or the person is otherwise not prohibited, that their property be returned within 30 days of the conclusion of court's decision (barring any contraband that cannot be returned, which is then destroyed).