mirror of
https://github.com/block/buzz.git
synced 2026-11-01 15:01:12 +00:00
Extends identity_binding_provenance_is_independent_of_enrollment_mode with the negative half required for two-sided mutation sensitivity. A second deferred transaction inserts an otherwise-valid identity_bindings row referencing policy_revision 999 (nonexistent in identity_enrollment_policies) and asserts the INSERT fails with SQLSTATE 23503 from the narrowed FK identity_bindings(community_id, policy_revision) → identity_enrollment_policies(community_id, policy_revision). Non-vacuity verified: removing the FK from the migration causes the absent-policy INSERT to succeed (rows_affected: 1) and the expect_err assertion to fire, confirming the negative half detects a dropped or neutered FK. The existing positive half catches the old composite FK; together they give full two-sided coverage. Zero production changes: migrations 0040/0041 and schema.sql are byte-untouched. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Hayt <9e1c23a3fd83f61da34420e4e88ff1b16e45cafcc0cd9019eb07d4ecfa8ca9b0@buzz.block.builderlab.xyz>