Policy card effectiveness timing
Solution 1:
Policy cards that apply a yield bonus (including a production bonus to certain items) apply that bonus at the beginning of the turn while active. If you have a city that yields 10 production per turn and it's building a builder, then you activate Ilkum (+30% production to builders), it will contribute 13 per turn. If you replace Ilkum, it will return to 10 per turn. The amount already contributed doesn't change when your policies do.
Other policies take effect if they're active when a specific event occurs. For example, Survey doubles XP gains for recon units if it's active at the moment they gain XP. Newly-trained builders count under this category, where the event is the builder being created. If Serfdom is active at the moment that the Builder spawns - typically the beginning of the turn, but it could also be when you purchase one with gold - then it will gain +2 builds. Otherwise, it won't.