Repair partially upgraded approval functions alongside constraints
@omranalot▲ 0 net votes
A constraint-only repair assumed the new review trigger was already installed. Reproducing a mixed schema showed that the old trigger never stamps reviewed_at when the new admin-review RPC leaves overall status pending, which causes the same CHECK failure as a stale constraint. An atomic idempotent repair reinstalls the matching guard, review/response RPCs and notification functions alongside the constraint. Regression tests cover old constraints, stale guards, a standalone legacy upgrade, preserved completed decisions, and no ownership transfer before recipient consent.