Yeah, I have tried to generate cycle routing in many engines and they all feel like beta versions. I wish there was an easy country-based solution to routing that didn't require everyone to jump through hoops, but I also believe OSM needs to be consistent not just at a country level but worldwide level to remain useful and competitive. Adding inconsistent data now will inevitably lead to maintenance for decades to come. I think this is the view held by most mappers with allowance for discrete exceptions. I guess I digress a little here, but since you mentioned motivations, I certainly err on the side of correct (whatever that means) in long-term.

You mention a trend to remove `bicycle=yes`. One thing I will disagree with is describing removing `bicycle=yes` as a trend rather than the trend that people have been *adding* `bicycle=yes` without broader discussion, without referring to any OSM guidelines and generally using personal experience. The few mappers I have asked either mentioned a specific router they had issues with, did not yet understand the traffic laws or just didn't really understand what access tags mean. In any case, there was never any broader discussion to fix such broad router issues with local OSM data changes. This sort of `bicycle=yes` tagging on sidewalks was literally everywhere from major trunk sidewalks to random living street sidewalks to sidewalks literally next to cycling infrastructure. So I did remove all of it fairly indiscriminately, although I did look at each place briefly and I'm more or less personally familiar with all of them. That said, places like bridges or your example are certainly one of the most likely candidates to be an exception.

I would be curious to see how mappers deal with what routers do in all the other countries that have similar rules to Latvia. In fact, Latvia is one of the last "developed" countries to actually add the explicit "no bicycles on sidewalks except..." and make an "official statement".[1] Many other countries have had this codified for a long time. And terrible routing is certainly not exclusive to Latvia.[2] "Avoid bicycles on sidewalks" is pretty much the default scoring for all routers. It's just that we have so little cycling infrastructure that it's incredibly obvious. And it's not even sidewalks, routers just bias roads a lot.[3] And given that this is a systemic problem with routers, I don't see how we can solve it on OSM end. Like, if every other sidewalk we map needs to be an exception, then clearly something else is fundamentally wrong.

The "solution" to connect the cycleway to the highway is technically how it's usually done, yes, at the end of cycleways that have to merge into traffic. It would be incredibly stupid here, but that is the legal "primary" route with sidewalk being the alternative. Although I should note in this particular example, I don't think any of the default routers will score the route to actually use the trunk road over other sidewalk "alternatives" and it's already connected to the trunk at the crossing. Even cycle.travel, which is arguably the best cycle router, does crazy stuff in this location (although it does actually route along the trunk road in this section if you put the points apart).

[1] https://www.lsm.lv/raksts/dzive--stils/motori/lukstins-ietve-ir-paredzeta-tikai-un-vienigi-gajejiem-velosipediem-iznemuma-gadijumos.a127199/
[2] https://www.openstreetmap.org/directions?engine=fossgis_valhalla_bicycle&route=60.384%252C23.127111%253B60.383931%252C23.125663
[3] https://www.openstreetmap.org/directions?engine=fossgis_osrm_bicycle&route=57.313513%252C24.41389%253B57.311653%252C24.412565
